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

Unified Diff: content/renderer/media/webmediasource_impl.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
« no previous file with comments | « content/renderer/media/webmediasource_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webmediasource_impl.cc
diff --git a/content/renderer/media/webmediasource_impl.cc b/content/renderer/media/webmediasource_impl.cc
index 365fc0166f19179d685d40875732f8aebf71406b..edca6e535d65e351914128f97a8bad00deafe7fd 100644
--- a/content/renderer/media/webmediasource_impl.cc
+++ b/content/renderer/media/webmediasource_impl.cc
@@ -36,14 +36,26 @@ WebMediaSourceImpl::~WebMediaSourceImpl() {}
WebMediaSource::AddStatus WebMediaSourceImpl::addSourceBuffer(
const blink::WebString& type,
const blink::WebVector<blink::WebString>& codecs,
+ const WebMediaSource::FrameProcessorChoice frame_processor_choice,
blink::WebSourceBuffer** source_buffer) {
std::string id = base::GenerateGUID();
std::vector<std::string> new_codecs(codecs.size());
for (size_t i = 0; i < codecs.size(); ++i)
new_codecs[i] = codecs[i].utf8().data();
+
+ bool use_legacy_frame_processor = true;
+ switch (frame_processor_choice) {
+ case UseLegacyFrameProcessor:
+ break;
+ case UseNewFrameProcessor:
+ use_legacy_frame_processor = false;
acolwell GONE FROM CHROMIUM 2014/04/02 18:03:15 nit: I would have expected a default of false and
wolenetz 2014/04/02 18:11:23 Done.
+ break;
+ }
+
WebMediaSource::AddStatus result =
static_cast<WebMediaSource::AddStatus>(
- demuxer_->AddId(id, type.utf8().data(), new_codecs));
+ demuxer_->AddId(id, type.utf8().data(), new_codecs,
+ use_legacy_frame_processor));
if (result == WebMediaSource::AddStatusOk)
*source_buffer = new WebSourceBufferImpl(id, demuxer_);
« no previous file with comments | « content/renderer/media/webmediasource_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698