Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: chromecast/media/cma/filters/demuxer_stream_adapter.h

Issue 565973003: Fix Flush in DemuxerStreamAdapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test update. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/media/cma/filters/demuxer_stream_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/filters/demuxer_stream_adapter.h
diff --git a/chromecast/media/cma/filters/demuxer_stream_adapter.h b/chromecast/media/cma/filters/demuxer_stream_adapter.h
index 06f5a720b2915082d765b0728a7f72667c8b3fa4..47296288164b2386acadebfb6d89e1c538359f86 100644
--- a/chromecast/media/cma/filters/demuxer_stream_adapter.h
+++ b/chromecast/media/cma/filters/demuxer_stream_adapter.h
@@ -45,6 +45,7 @@ class DemuxerStreamAdapter : public CodedFrameProvider {
private:
void ResetMediaTaskRunner();
+ void ReadInternal(const ReadCB& read_cb);
void RequestBuffer(const ReadCB& read_cb);
// Callback invoked from the demuxer stream to signal a buffer is ready.
@@ -66,14 +67,21 @@ class DemuxerStreamAdapter : public CodedFrameProvider {
// Frames are provided by |demuxer_stream_|.
::media::DemuxerStream* const demuxer_stream_;
- // Indicate if there is a pending read on the demuxer.
+ // Indicate if there is a pending read.
bool is_pending_read_;
+ // Indicate if |demuxer_stream_| has a pending read.
+ bool is_pending_demuxer_read_;
+
+ // In case of a pending flush operation, this is the callback
+ // that is invoked when flush is completed.
+ base::Closure flush_cb_;
+
// Audio/video configuration that applies to the next frame.
::media::AudioDecoderConfig audio_config_;
::media::VideoDecoderConfig video_config_;
- scoped_ptr<base::WeakPtrFactory<DemuxerStreamAdapter> > weak_factory_;
+ base::WeakPtrFactory<DemuxerStreamAdapter> weak_factory_;
base::WeakPtr<DemuxerStreamAdapter> weak_this_;
DISALLOW_COPY_AND_ASSIGN(DemuxerStreamAdapter);
« no previous file with comments | « no previous file | chromecast/media/cma/filters/demuxer_stream_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698