<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171017] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171017">171017</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2014-07-11 17:53:44 -0700 (Fri, 11 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[MSE] Separate MediaSource logging into its own log channel
https://bugs.webkit.org/show_bug.cgi?id=134809
Reviewed by Eric Carlson.
Separate out MediaSource logging (which can be quite verbose) into its own log channel,
distinct from the Media log channel. Add some per-sample logging and further sequester that
logging into its own MediaSourceSamples log channel.
Add the MediaSource and MediaSourceSamples channels:
* platform/Logging.h:
Move LOG(Media) -> LOG(MediaSource):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::~MediaSource):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::monitorBufferingRate):
(WebCore::SourceBuffer::textTrackAddCues):
(WebCore::SourceBuffer::hasFutureTime):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourcecpp">trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceSourceBuffercpp">trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLoggingh">trunk/Source/WebCore/platform/Logging.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171016 => 171017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-11 23:54:55 UTC (rev 171016)
+++ trunk/Source/WebCore/ChangeLog        2014-07-12 00:53:44 UTC (rev 171017)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2014-07-11 Jer Noble <jer.noble@apple.com>
+
+ [MSE] Separate MediaSource logging into its own log channel
+ https://bugs.webkit.org/show_bug.cgi?id=134809
+
+ Reviewed by Eric Carlson.
+
+ Separate out MediaSource logging (which can be quite verbose) into its own log channel,
+ distinct from the Media log channel. Add some per-sample logging and further sequester that
+ logging into its own MediaSourceSamples log channel.
+
+ Add the MediaSource and MediaSourceSamples channels:
+ * platform/Logging.h:
+
+ Move LOG(Media) -> LOG(MediaSource):
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::MediaSource):
+ (WebCore::MediaSource::~MediaSource):
+ (WebCore::MediaSource::setReadyState):
+ (WebCore::MediaSource::addSourceBuffer):
+ (WebCore::MediaSource::removeSourceBuffer):
+ (WebCore::MediaSource::isTypeSupported):
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
+ (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
+ (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+ (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
+ (WebCore::SourceBuffer::provideMediaData):
+ (WebCore::SourceBuffer::monitorBufferingRate):
+ (WebCore::SourceBuffer::textTrackAddCues):
+ (WebCore::SourceBuffer::hasFutureTime):
+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+ (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
+ (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
+ (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
+ (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
+ (WebCore::SourceBufferPrivateAVFObjC::append):
+ (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
+ (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
+ (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
+ (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
+
</ins><span class="cx"> 2014-07-11 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Phone numbers that span two lines are not detected.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (171016 => 171017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2014-07-11 23:54:55 UTC (rev 171016)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2014-07-12 00:53:44 UTC (rev 171017)
</span><span class="lines">@@ -79,14 +79,14 @@
</span><span class="cx"> , m_readyState(closedKeyword())
</span><span class="cx"> , m_asyncEventQueue(*this)
</span><span class="cx"> {
</span><del>- LOG(Media, "MediaSource::MediaSource %p", this);
</del><ins>+ LOG(MediaSource, "MediaSource::MediaSource %p", this);
</ins><span class="cx"> m_sourceBuffers = SourceBufferList::create(scriptExecutionContext());
</span><span class="cx"> m_activeSourceBuffers = SourceBufferList::create(scriptExecutionContext());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> MediaSource::~MediaSource()
</span><span class="cx"> {
</span><del>- LOG(Media, "MediaSource::~MediaSource %p", this);
</del><ins>+ LOG(MediaSource, "MediaSource::~MediaSource %p", this);
</ins><span class="cx"> ASSERT(isClosed());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx"> ASSERT(state == openKeyword() || state == closedKeyword() || state == endedKeyword());
</span><span class="cx">
</span><span class="cx"> AtomicString oldState = readyState();
</span><del>- LOG(Media, "MediaSource::setReadyState() %p : %s -> %s", this, oldState.string().ascii().data(), state.string().ascii().data());
</del><ins>+ LOG(MediaSource, "MediaSource::setReadyState() %p : %s -> %s", this, oldState.string().ascii().data(), state.string().ascii().data());
</ins><span class="cx">
</span><span class="cx"> if (state == closedKeyword()) {
</span><span class="cx"> m_private.clear();
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">
</span><span class="cx"> SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- LOG(Media, "MediaSource::addSourceBuffer(%s) %p", type.ascii().data(), this);
</del><ins>+ LOG(MediaSource, "MediaSource::addSourceBuffer(%s) %p", type.ascii().data(), this);
</ins><span class="cx">
</span><span class="cx"> // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type
</span><span class="cx"> // 1. If type is null or an empty then throw an INVALID_ACCESS_ERR exception and
</span><span class="lines">@@ -447,7 +447,7 @@
</span><span class="cx">
</span><span class="cx"> void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- LOG(Media, "MediaSource::removeSourceBuffer() %p", this);
</del><ins>+ LOG(MediaSource, "MediaSource::removeSourceBuffer() %p", this);
</ins><span class="cx"> RefPtr<SourceBuffer> protect(buffer);
</span><span class="cx">
</span><span class="cx"> // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer
</span><span class="lines">@@ -602,7 +602,7 @@
</span><span class="cx">
</span><span class="cx"> bool MediaSource::isTypeSupported(const String& type)
</span><span class="cx"> {
</span><del>- LOG(Media, "MediaSource::isTypeSupported(%s)", type.ascii().data());
</del><ins>+ LOG(MediaSource, "MediaSource::isTypeSupported(%s)", type.ascii().data());
</ins><span class="cx">
</span><span class="cx"> // Section 2.2 isTypeSupported() method steps.
</span><span class="cx"> // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-MediaSource-isTypeSupported-boolean-DOMString-type
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceSourceBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (171016 => 171017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp        2014-07-11 23:54:55 UTC (rev 171016)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp        2014-07-12 00:53:44 UTC (rev 171017)
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBuffer::sourceBufferPrivateSeekToTime(SourceBufferPrivate*, const MediaTime& time)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBuffer::sourceBufferPrivateSeekToTime(%p) - time(%s)", this, toString(time).utf8().data());
</del><ins>+ LOG(MediaSource, "SourceBuffer::sourceBufferPrivateSeekToTime(%p) - time(%s)", this, toString(time).utf8().data());
</ins><span class="cx">
</span><span class="cx"> for (auto& trackBufferPair : m_trackBufferMap) {
</span><span class="cx"> TrackBuffer& trackBuffer = trackBufferPair.value;
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx"> const AtomicString& trackID = trackBufferPair.key;
</span><span class="cx">
</span><span class="cx"> if (trackBuffer.needsReenqueueing) {
</span><del>- LOG(Media, "SourceBuffer::sourceBufferPrivateAppendComplete(%p) - reenqueuing at time (%s)", this, toString(currentMediaTime).utf8().data());
</del><ins>+ LOG(MediaSource, "SourceBuffer::sourceBufferPrivateAppendComplete(%p) - reenqueuing at time (%s)", this, toString(currentMediaTime).utf8().data());
</ins><span class="cx"> reenqueueMediaForTime(trackBuffer, trackID, currentMediaTime);
</span><span class="cx"> } else
</span><span class="cx"> provideMediaData(trackBuffer, trackID);
</span><span class="lines">@@ -1162,6 +1162,7 @@
</span><span class="cx"> MediaTime startTime = samplePair.second->presentationTime();
</span><span class="cx"> MediaTime endTime = startTime + samplePair.second->duration() + microsecond;
</span><span class="cx"> erasedRanges->add(startTime.toDouble(), endTime.toDouble());
</span><ins>+ LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveSample(%p) - removing sample(%s)", this, toString(*samplePair.second).utf8().data());
</ins><span class="cx"> trackBuffer.samples.removeSample(samplePair.second.get());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1327,7 +1328,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples(SourceBufferPrivate*, AtomicString trackID)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples(%p)", this);
</del><ins>+ LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples(%p)", this);
</ins><span class="cx"> auto it = m_trackBufferMap.find(trackID);
</span><span class="cx"> if (it == m_trackBufferMap.end())
</span><span class="cx"> return;
</span><span class="lines">@@ -1358,7 +1359,7 @@
</span><span class="cx"> }
</span><span class="cx"> trackBuffer.decodeQueue.erase(trackBuffer.decodeQueue.begin(), sampleIt);
</span><span class="cx">
</span><del>- LOG(Media, "SourceBuffer::provideMediaData(%p) - Enqueued %u samples", this, enqueuedSamples);
</del><ins>+ LOG(MediaSource, "SourceBuffer::provideMediaData(%p) - Enqueued %u samples", this, enqueuedSamples);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SourceBuffer::reenqueueMediaForTime(TrackBuffer& trackBuffer, AtomicString trackID, const MediaTime& time)
</span><span class="lines">@@ -1421,7 +1422,7 @@
</span><span class="cx">
</span><span class="cx"> m_averageBufferRate = m_averageBufferRate * (1 - ExponentialMovingAverageCoefficient) + rateSinceLastMonitor * ExponentialMovingAverageCoefficient;
</span><span class="cx">
</span><del>- LOG(Media, "SourceBuffer::monitorBufferingRate(%p) - m_avegareBufferRate: %lf", this, m_averageBufferRate);
</del><ins>+ LOG(MediaSource, "SourceBuffer::monitorBufferingRate(%p) - m_avegareBufferRate: %lf", this, m_averageBufferRate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool SourceBuffer::hasCurrentTime() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Logging.h (171016 => 171017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Logging.h        2014-07-11 23:54:55 UTC (rev 171016)
+++ trunk/Source/WebCore/platform/Logging.h        2014-07-12 00:53:44 UTC (rev 171017)
</span><span class="lines">@@ -54,6 +54,8 @@
</span><span class="cx"> M(LiveConnect) \
</span><span class="cx"> M(Loading) \
</span><span class="cx"> M(Media) \
</span><ins>+ M(MediaSource) \
+ M(MediaSourceSamples) \
</ins><span class="cx"> M(MemoryPressure) \
</span><span class="cx"> M(Network) \
</span><span class="cx"> M(NotYetImplemented) \
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (171016 => 171017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2014-07-11 23:54:55 UTC (rev 171016)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2014-07-12 00:53:44 UTC (rev 171017)
</span><span class="lines">@@ -568,7 +568,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset(AVAsset* asset)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset(%p)", this);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset(%p)", this);
</ins><span class="cx">
</span><span class="cx"> m_asset = asset;
</span><span class="cx">
</span><span class="lines">@@ -607,7 +607,7 @@
</span><span class="cx"> #if LOG_DISABLED
</span><span class="cx"> UNUSED_PARAM(error);
</span><span class="cx"> #endif
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError(%p) - error:\"%s\"", this, String([error description]).utf8().data());
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError(%p) - error:\"%s\"", this, String([error description]).utf8().data());
</ins><span class="cx">
</span><span class="cx"> m_parsingSucceeded = false;
</span><span class="cx"> }
</span><span class="lines">@@ -631,15 +631,20 @@
</span><span class="cx"> CMFormatDescriptionRef formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer);
</span><span class="cx"> FloatSize formatSize = FloatSize(CMVideoFormatDescriptionGetPresentationDimensions(formatDescription, true, true));
</span><span class="cx"> if (formatSize != m_cachedSize) {
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::processCodedFrame(%p) - size change detected: {width=%lf, height=%lf", formatSize.width(), formatSize.height());
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::processCodedFrame(%p) - size change detected: {width=%lf, height=%lf", formatSize.width(), formatSize.height());
</ins><span class="cx"> m_cachedSize = formatSize;
</span><span class="cx"> if (m_mediaSource)
</span><span class="cx"> m_mediaSource->player()->sizeChanged();
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if (m_client)
- m_client->sourceBufferPrivateDidReceiveSample(this, MediaSampleAVFObjC::create(sampleBuffer, trackID));
</del><span class="cx">
</span><ins>+
+ if (m_client) {
+ RefPtr<MediaSample> mediaSample = MediaSampleAVFObjC::create(sampleBuffer, trackID);
+ LOG(MediaSourceSamples, "SourceBufferPrivateAVFObjC::processCodedFrame(%p) - sample(%s)", this, toString(*mediaSample).utf8().data());
+ m_client->sourceBufferPrivateDidReceiveSample(this, mediaSample.release());
+ }
+
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -657,7 +662,7 @@
</span><span class="cx">
</span><span class="cx"> UNUSED_PARAM(trackID);
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID(%p) - track:%d", this, trackID);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID(%p) - track:%d", this, trackID);
</ins><span class="cx"> m_protectedTrackID = trackID;
</span><span class="cx"> RefPtr<Uint8Array> initDataArray = Uint8Array::create([initData length]);
</span><span class="cx"> [initData getBytes:initDataArray->data() length:initDataArray->length()];
</span><span class="lines">@@ -684,7 +689,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBufferPrivateAVFObjC::append(const unsigned char* data, unsigned length)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::append(%p) - data:%p, length:%d", this, data, length);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::append(%p) - data:%p, length:%d", this, data, length);
</ins><span class="cx">
</span><span class="cx"> RetainPtr<NSData> nsData = adoptNS([[NSData alloc] initWithBytes:data length:length]);
</span><span class="cx"> WeakPtr<SourceBufferPrivateAVFObjC> weakThis = createWeakPtr();
</span><span class="lines">@@ -860,7 +865,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBufferPrivateAVFObjC::layerDidReceiveError(AVSampleBufferDisplayLayer *layer, NSError *error)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::layerDidReceiveError(%p): layer(%p), error(%@)", this, layer, [error description]);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::layerDidReceiveError(%p): layer(%p), error(%@)", this, layer, [error description]);
</ins><span class="cx"> for (auto& client : m_errorClients)
</span><span class="cx"> client->layerDidReceiveError(layer, error);
</span><span class="cx">
</span><span class="lines">@@ -872,7 +877,7 @@
</span><span class="cx">
</span><span class="cx"> void SourceBufferPrivateAVFObjC::rendererDidReceiveError(AVSampleBufferAudioRenderer *renderer, NSError *error)
</span><span class="cx"> {
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::rendererDidReceiveError(%p): renderer(%p), error(%@)", this, renderer, [error description]);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::rendererDidReceiveError(%p): renderer(%p), error(%@)", this, renderer, [error description]);
</ins><span class="cx"> for (auto& client : m_errorClients)
</span><span class="cx"> client->rendererDidReceiveError(renderer, error);
</span><span class="cx"> }
</span><span class="lines">@@ -896,7 +901,7 @@
</span><span class="cx"> void SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples(Vector<RefPtr<MediaSample>> mediaSamples, AtomicString trackIDString)
</span><span class="cx"> {
</span><span class="cx"> int trackID = trackIDString.toInt();
</span><del>- LOG(Media, "SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples(%p) samples: %d samples, trackId: %d", this, mediaSamples.size(), trackID);
</del><ins>+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples(%p) samples: %d samples, trackId: %d", this, mediaSamples.size(), trackID);
</ins><span class="cx">
</span><span class="cx"> if (trackID == m_enabledVideoTrackID)
</span><span class="cx"> flushAndEnqueueNonDisplayingSamples(mediaSamples, m_displayLayer.get());
</span><span class="lines">@@ -927,6 +932,8 @@
</span><span class="cx"> for (auto it = mediaSamples.begin(), end = mediaSamples.end(); it != end; ++it) {
</span><span class="cx"> RefPtr<MediaSample>& mediaSample = *it;
</span><span class="cx">
</span><ins>+ LOG(MediaSourceSamples, "SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples(%p) - sample(%s)", this, toString(*mediaSample).utf8().data());
+
</ins><span class="cx"> PlatformSample platformSample = mediaSample->platformSample();
</span><span class="cx"> ASSERT(platformSample.type == PlatformSample::CMSampleBufferType);
</span><span class="cx">
</span><span class="lines">@@ -951,6 +958,8 @@
</span><span class="cx"> if (platformSample.type != PlatformSample::CMSampleBufferType)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ LOG(MediaSourceSamples, "SourceBufferPrivateAVFObjC::enqueueSample(%p) - sample(%s)", this, toString(*mediaSample).utf8().data());
+
</ins><span class="cx"> if (trackID == m_enabledVideoTrackID) {
</span><span class="cx"> [m_displayLayer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer];
</span><span class="cx"> if (m_mediaSource)
</span></span></pre>
</div>
</div>
</body>
</html>