summaryrefslogtreecommitdiffstats
path: root/media/base/filter_host.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 18:35:10 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 18:35:10 +0000
commit5a1db428d1e9b13adeda8f452cabe208ce9f15ad (patch)
tree42726884256e8f73fa21db778007e651bfc0334d /media/base/filter_host.h
parentbb65c88242cff032627558e8c22013f706cdeace (diff)
downloadchromium_src-5a1db428d1e9b13adeda8f452cabe208ce9f15ad.zip
chromium_src-5a1db428d1e9b13adeda8f452cabe208ce9f15ad.tar.gz
chromium_src-5a1db428d1e9b13adeda8f452cabe208ce9f15ad.tar.bz2
Free demuxed audio packets if audio device fails
BUG=17481 TEST=media_unittests Introduced a mesage broadcasting mechanism to notify filters of events from another filter. In particular this is used to notify all filters that the audio device has failed and special actions should be taken to handle it. In this case, demuxer should disable the audio stream and should free the demuxed audio packets instead of caching them. This will fix the memory leak that happens if audio device fails during playback. Review URL: http://codereview.chromium.org/159845 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/filter_host.h')
-rw-r--r--media/base/filter_host.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/base/filter_host.h b/media/base/filter_host.h
index 65aeebb..17e7631 100644
--- a/media/base/filter_host.h
+++ b/media/base/filter_host.h
@@ -18,6 +18,7 @@
#define MEDIA_BASE_FILTER_HOST_H_
#include "base/task.h"
+#include "media/base/filters.h"
#include "media/base/pipeline.h"
namespace media {
@@ -56,6 +57,9 @@ class FilterHost {
// Sets the flag to indicate that we are doing streaming.
virtual void SetStreaming(bool streaming) = 0;
+ // Broadcast a message of type |message| to all other filters from |source|.
+ virtual void BroadcastMessage(FilterMessage message) = 0;
+
protected:
virtual ~FilterHost() {}
};