Changeset 247133 in webkit
- Timestamp:
- Jul 3, 2019 8:23:39 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247129 r247133 1 2019-07-03 Eric Carlson <eric.carlson@apple.com> 2 3 [MSE] Add more debug and error logging 4 https://bugs.webkit.org/show_bug.cgi?id=199473 5 <rdar://problem/52615882> 6 7 Reviewed by Jer Noble. 8 9 * Modules/mediasource/SourceBuffer.cpp: 10 (WebCore::SourceBuffer::provideMediaData): Log if we don't enqueue every buffer. 11 12 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 13 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Log if we return 14 without starting playback. 15 16 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: 17 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Log if 18 prerollDecodeWithCompletionHandler fails. 19 1 20 2019-07-03 Simon Fraser <simon.fraser@apple.com> 2 21 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
r246490 r247133 2018 2018 while (!trackBuffer.decodeQueue.empty()) { 2019 2019 if (!m_private->isReadyForMoreSamples(trackID)) { 2020 DEBUG_LOG(LOGIDENTIFIER, "bailing early, track id ", trackID, " is not ready for more data"); 2020 2021 m_private->notifyClientWhenReadyForMoreSamples(trackID); 2021 2022 break; … … 2037 2038 if (trackBuffer.lastEnqueuedDecodeKey.first.isValid() 2038 2039 && trackBuffer.lastEnqueuedDecodeDuration.isValid() 2039 && sample->decodeTime() - trackBuffer.lastEnqueuedDecodeKey.first > oneSecond + trackBuffer.lastEnqueuedDecodeDuration) 2040 && sample->decodeTime() - trackBuffer.lastEnqueuedDecodeKey.first > oneSecond + trackBuffer.lastEnqueuedDecodeDuration) { 2041 2042 DEBUG_LOG(LOGIDENTIFIER, "bailing early because of unbuffered gap, new sample: ", sample->decodeTime(), ", last enqueued sample ends: ", trackBuffer.lastEnqueuedDecodeKey.first + trackBuffer.lastEnqueuedDecodeDuration); 2040 2043 break; 2044 } 2041 2045 2042 2046 // Remove the sample from the decode queue now. -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
r247113 r247133 297 297 void MediaPlayerPrivateMediaSourceAVFObjC::playInternal() 298 298 { 299 if (currentMediaTime() >= m_mediaSourcePrivate->duration()) 300 return; 299 if (currentMediaTime() >= m_mediaSourcePrivate->duration()) { 300 ALWAYS_LOG(LOGIDENTIFIER, "bailing, current time: ", currentMediaTime(), " greater than duration ", m_mediaSourcePrivate->duration()); 301 return; 302 } 301 303 302 304 ALWAYS_LOG(LOGIDENTIFIER); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
r246490 r247133 1099 1099 return; 1100 1100 1101 DEBUG_LOG(LOGIDENTIFIER, "track ID = ", trackID, ", sample = ", sample.get()); 1101 auto logSiteIdentifier = LOGIDENTIFIER; 1102 DEBUG_LOG(logSiteIdentifier, "track ID = ", trackID, ", sample = ", sample.get()); 1102 1103 1103 1104 if (trackID == m_enabledVideoTrackID) { … … 1105 1106 FloatSize formatSize = FloatSize(CMVideoFormatDescriptionGetPresentationDimensions(formatDescription, true, true)); 1106 1107 if (!m_cachedSize || formatSize != m_cachedSize.value()) { 1107 DEBUG_LOG( LOGIDENTIFIER, "size changed to ", formatSize);1108 DEBUG_LOG(logSiteIdentifier, "size changed to ", formatSize); 1108 1109 bool sizeWasNull = !m_cachedSize; 1109 1110 m_cachedSize = formatSize; … … 1123 1124 1124 1125 if (m_mediaSource && !m_mediaSource->player()->hasAvailableVideoFrame() && !sample->isNonDisplaying()) { 1125 DEBUG_LOG( LOGIDENTIFIER, "adding buffer attachment");1126 DEBUG_LOG(logSiteIdentifier, "adding buffer attachment"); 1126 1127 1127 1128 bool havePrerollDecodeWithCompletionHandler = [PAL::getAVSampleBufferDisplayLayerClass() instancesRespondToSelector:@selector(prerollDecodeWithCompletionHandler:)]; … … 1137 1138 #endif 1138 1139 } else { 1140 1139 1141 [m_displayLayer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer]; 1140 [m_displayLayer prerollDecodeWithCompletionHandler:[ weakThis = makeWeakPtr(*this)] (BOOL success) mutable {1141 if (! success || !weakThis)1142 [m_displayLayer prerollDecodeWithCompletionHandler:[this, logSiteIdentifier, weakThis = makeWeakPtr(*this)] (BOOL success) mutable { 1143 if (!weakThis) 1142 1144 return; 1145 1146 if (!success) { 1147 ERROR_LOG(logSiteIdentifier, "prerollDecodeWithCompletionHandler failed"); 1148 return; 1149 } 1143 1150 1144 1151 callOnMainThread([weakThis = WTFMove(weakThis)] () mutable {
Note: See TracChangeset
for help on using the changeset viewer.