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

Unified Diff: Source/modules/mediasource/MediaSourceBase.cpp

Issue 220593010: MSE: Allow requesting coded frame processor: legacy or new (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | public/platform/WebMediaSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSourceBase.cpp
diff --git a/Source/modules/mediasource/MediaSourceBase.cpp b/Source/modules/mediasource/MediaSourceBase.cpp
index 9f738bd3218a469d74cc40b75d7144d8a206e0cb..0f534b047c46f1ef9215d6ab5cd14126afae278f 100644
--- a/Source/modules/mediasource/MediaSourceBase.cpp
+++ b/Source/modules/mediasource/MediaSourceBase.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "modules/mediasource/MediaSourceBase.h"
+#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
@@ -310,7 +311,14 @@ void MediaSourceBase::stop()
PassOwnPtr<WebSourceBuffer> MediaSourceBase::createWebSourceBuffer(const String& type, const Vector<String>& codecs, ExceptionState& exceptionState)
{
WebSourceBuffer* webSourceBuffer = 0;
- switch (m_webMediaSource->addSourceBuffer(type, codecs, &webSourceBuffer)) {
+
+ // FIXME: Always use the new frame processor once it has stabilized enough. See http://crbug.com/249422.
+ WebMediaSource::FrameProcessorChoice frameProcessorChoice = RuntimeEnabledFeatures::mediaSourceExperimentalEnabled() ?
+ WebMediaSource::UseNewFrameProcessor : WebMediaSource::UseLegacyFrameProcessor;
+
+ WTF_LOG(Media, "MediaSourceBase::createWebSourceBuffer() %p : frameProcessorChoice = %i", this, frameProcessorChoice);
+
+ switch (m_webMediaSource->addSourceBuffer(type, codecs, frameProcessorChoice, &webSourceBuffer)) {
case WebMediaSource::AddStatusOk:
return adoptPtr(webSourceBuffer);
case WebMediaSource::AddStatusNotSupported:
« no previous file with comments | « no previous file | public/platform/WebMediaSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698