summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline_impl.h
diff options
context:
space:
mode:
authorkylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 18:51:52 +0000
committerkylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 18:51:52 +0000
commitdb190487d2bc37ef9a2852d948bd8dd4548a98bd (patch)
treebba60ce128d4e214663cbd45e6620224e2cf3ae4 /media/base/pipeline_impl.h
parent66f16b11638993ead4028e853d5565a74b9acba3 (diff)
downloadchromium_src-db190487d2bc37ef9a2852d948bd8dd4548a98bd.zip
chromium_src-db190487d2bc37ef9a2852d948bd8dd4548a98bd.tar.gz
chromium_src-db190487d2bc37ef9a2852d948bd8dd4548a98bd.tar.bz2
Pipeline will execute a callback whenever an run-time error has happened.
BUG=16738 TEST=pipeline_impl_unittest.cc Review URL: http://codereview.chromium.org/160298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline_impl.h')
-rw-r--r--media/base/pipeline_impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index e83822d..aee1f59 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -7,9 +7,9 @@
#ifndef MEDIA_BASE_PIPELINE_IMPL_H_
#define MEDIA_BASE_PIPELINE_IMPL_H_
+#include <set>
#include <string>
#include <vector>
-#include <set>
#include "base/message_loop.h"
#include "base/ref_counted.h"
@@ -84,6 +84,11 @@ class PipelineImpl : public Pipeline, public FilterHost {
virtual bool IsStreaming() const;
virtual PipelineError GetError() const;
+ // |error_callback_| will be executed upon an error in the pipeline. If
+ // |error_callback_| is NULL, it is ignored. The pipeline takes ownernship
+ // of |error_callback|.
+ virtual void SetPipelineErrorCallback(PipelineCallback* error_callback);
+
private:
// Pipeline states, as described above.
enum State {
@@ -323,6 +328,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
// Callbacks for various pipeline operations.
scoped_ptr<PipelineCallback> seek_callback_;
scoped_ptr<PipelineCallback> stop_callback_;
+ scoped_ptr<PipelineCallback> error_callback_;
// Vector of our filters and map maintaining the relationship between the
// FilterType and the filter itself.