| Index: third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
|
| index 16149c109ac69d0b8115ab7b43ecbb26ccd1707d..eb97177426e962e22aca3e4f7b5a176ece60950a 100644
|
| --- a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
|
| @@ -51,11 +51,13 @@
|
| #include "wtf/text/CString.h"
|
| #include <memory>
|
|
|
| +#ifndef BLINK_MSLOG
|
| +#define BLINK_MSLOG DVLOG(3)
|
| +#endif
|
| +
|
| using blink::WebMediaSource;
|
| using blink::WebSourceBuffer;
|
|
|
| -#define MSLOG DVLOG(3)
|
| -
|
| namespace blink {
|
|
|
| static bool throwExceptionIfClosedOrUpdating(bool isOpen, bool isUpdating, ExceptionState& exceptionState)
|
| @@ -108,24 +110,24 @@ MediaSource::MediaSource(ExecutionContext* context)
|
| , m_liveSeekableRange(TimeRanges::create())
|
| , m_isAddedToRegistry(false)
|
| {
|
| - MSLOG << __FUNCTION__ << " this=" << this;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this;
|
| }
|
|
|
| MediaSource::~MediaSource()
|
| {
|
| - MSLOG << __FUNCTION__ << " this=" << this;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this;
|
| DCHECK(isClosed());
|
| }
|
|
|
| void MediaSource::logAndThrowDOMException(ExceptionState& exceptionState, const ExceptionCode& error, const String& message)
|
| {
|
| - MSLOG << __FUNCTION__ << " (error=" << error << ", message=" << message << ")";
|
| + BLINK_MSLOG << __FUNCTION__ << " (error=" << error << ", message=" << message << ")";
|
| exceptionState.throwDOMException(error, message);
|
| }
|
|
|
| SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionState& exceptionState)
|
| {
|
| - MSLOG << __FUNCTION__ << " this=" << this << " type=" << type;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this << " type=" << type;
|
|
|
| // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type
|
| // 1. If type is an empty string then throw an InvalidAccessError exception
|
| @@ -166,13 +168,13 @@ SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionState& e
|
| m_sourceBuffers->add(buffer);
|
|
|
| // 7. Return the new object to the caller.
|
| - MSLOG << __FUNCTION__ << " this=" << this << " type=" << type << " -> " << buffer;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this << " type=" << type << " -> " << buffer;
|
| return buffer;
|
| }
|
|
|
| void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionState& exceptionState)
|
| {
|
| - MSLOG << __FUNCTION__ << " this=" << this << " buffer=" << buffer;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this << " buffer=" << buffer;
|
|
|
| // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer
|
|
|
| @@ -240,7 +242,7 @@ bool MediaSource::isTypeSupported(const String& type)
|
| // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-MediaSource-isTypeSupported-boolean-DOMString-type
|
| // 1. If type is an empty string, then return false.
|
| if (type.isEmpty()) {
|
| - MSLOG << __FUNCTION__ << "(" << type << ") -> false (empty input)";
|
| + BLINK_MSLOG << __FUNCTION__ << "(" << type << ") -> false (empty input)";
|
| return false;
|
| }
|
|
|
| @@ -249,14 +251,14 @@ bool MediaSource::isTypeSupported(const String& type)
|
|
|
| // 2. If type does not contain a valid MIME type string, then return false.
|
| if (contentType.type().isEmpty()) {
|
| - MSLOG << __FUNCTION__ << "(" << type << ") -> false (invalid mime type)";
|
| + BLINK_MSLOG << __FUNCTION__ << "(" << type << ") -> false (invalid mime type)";
|
| return false;
|
| }
|
|
|
| // Note: MediaSource.isTypeSupported() returning true implies that HTMLMediaElement.canPlayType() will return "maybe" or "probably"
|
| // since it does not make sense for a MediaSource to support a type the HTMLMediaElement knows it cannot play.
|
| if (HTMLMediaElement::supportsType(contentType) == WebMimeRegistry::IsNotSupported) {
|
| - MSLOG << __FUNCTION__ << "(" << type << ") -> false (not supported by HTMLMediaElement)";
|
| + BLINK_MSLOG << __FUNCTION__ << "(" << type << ") -> false (not supported by HTMLMediaElement)";
|
| return false;
|
| }
|
|
|
| @@ -265,7 +267,7 @@ bool MediaSource::isTypeSupported(const String& type)
|
| // 5. If the MediaSource does not support the specified combination of media type, media subtype, and codecs then return false.
|
| // 6. Return true.
|
| bool result = MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.type(), codecs);
|
| - MSLOG << __FUNCTION__ << "(" << type << ") -> " << (result ? "true" : "false");
|
| + BLINK_MSLOG << __FUNCTION__ << "(" << type << ") -> " << (result ? "true" : "false");
|
| return result;
|
| }
|
|
|
| @@ -488,7 +490,7 @@ void MediaSource::setReadyState(const AtomicString& state)
|
| DCHECK(state == openKeyword() || state == closedKeyword() || state == endedKeyword());
|
|
|
| AtomicString oldState = readyState();
|
| - MSLOG << __FUNCTION__ << " this=" << this << " : " << oldState << " -> " << state;
|
| + BLINK_MSLOG << __FUNCTION__ << " this=" << this << " : " << oldState << " -> " << state;
|
|
|
| if (state == closedKeyword()) {
|
| m_webMediaSource.reset();
|
|
|