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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 220113002: MSE: Pick frame processor in ChunkDemuxer::AddId; prepare unit tests to pick processor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments: refactored to land after Blink change https://codereview.chromium.org/220593010 Created 6 years, 9 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
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index caf15ba9b2bc8e56fe80919bc651829b43b28490..49a04f61c763754eba21a4ea55a0d2c4a4aedd16 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -138,7 +138,7 @@ class SourceState {
void SetSequenceMode(bool sequence_mode);
// Returns the range of buffered data in this source, capped at |duration|.
- // |ended| - Set to true if end of stream has been signalled and the special
+ // |ended| - Set to true if end of stream has been signaled and the special
// end of stream range logic needs to be executed.
Ranges<TimeDelta> GetBufferedRanges(TimeDelta duration, bool ended) const;
@@ -1106,9 +1106,11 @@ void ChunkDemuxer::CancelPendingSeek(TimeDelta seek_time) {
base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK);
}
-ChunkDemuxer::Status ChunkDemuxer::AddId(const std::string& id,
- const std::string& type,
- std::vector<std::string>& codecs) {
+ChunkDemuxer::Status ChunkDemuxer::AddId(
+ const std::string& id,
+ const std::string& type,
+ std::vector<std::string>& codecs,
+ const bool use_legacy_frame_processor) {
base::AutoLock auto_lock(lock_);
if ((state_ != WAITING_FOR_INIT && state_ != INITIALIZING) || IsValidId(id))
@@ -1133,6 +1135,10 @@ ChunkDemuxer::Status ChunkDemuxer::AddId(const std::string& id,
if (has_video)
source_id_video_ = id;
+ if (!use_legacy_frame_processor) {
+ DLOG(WARNING) << "New frame processor is not yet supported. Using legacy.";
+ }
+
scoped_ptr<FrameProcessorBase> frame_processor(new LegacyFrameProcessor(
base::Bind(&ChunkDemuxer::IncreaseDurationIfNecessary,
base::Unretained(this))));

Powered by Google App Engine
This is Rietveld 408576698