Skip to content

Commit

Permalink
Merge r241472 - Unreviewed, fix unused variable warnings after r24114…
Browse files Browse the repository at this point in the history
…8/r241251

https://bugs.webkit.org/show_bug.cgi?id=194348
<rdar://problem/47566449>

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
(WebCore::SourceBuffer::evictCodedFrames):
(WebCore::SourceBuffer::provideMediaData):
  • Loading branch information
mcatanzaro authored and carlosgcampos committed Feb 14, 2019
1 parent d354684 commit 5e723df
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
11 changes: 11 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
2019-02-13 Michael Catanzaro <mcatanzaro@igalia.com>

Unreviewed, fix unused variable warnings after r241148/r241251
https://bugs.webkit.org/show_bug.cgi?id=194348
<rdar://problem/47566449>

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
(WebCore::SourceBuffer::evictCodedFrames):
(WebCore::SourceBuffer::provideMediaData):

2019-02-13 Sihui Liu <sihui_liu@apple.com>

REGRESSION: [ Mac Debug WK2 ] Layout Test storage/indexeddb/key-type-infinity-private.html is a flaky crash
Expand Down
16 changes: 8 additions & 8 deletions Source/WebCore/Modules/mediasource/SourceBuffer.cpp
Expand Up @@ -718,7 +718,7 @@ void SourceBuffer::sourceBufferPrivateAppendComplete(AppendResult result)

void SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(int error)
{
#if LOG_DISABLED
#if RELEASE_LOG_DISABLED
UNUSED_PARAM(error);
#endif

Expand Down Expand Up @@ -956,7 +956,7 @@ void SourceBuffer::evictCodedFrames(size_t newDataSize)
MediaTime currentTime = m_source->currentTime();
MediaTime maximumRangeEnd = currentTime - thirtySeconds;

#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
DEBUG_LOG(LOGIDENTIFIER, "currentTime = ", m_source->currentTime(), ", require ", extraMemoryCost() + newDataSize, " bytes, maximum buffer size is ", maximumBufferSize);
size_t initialBufferedSize = extraMemoryCost();
#endif
Expand All @@ -976,7 +976,7 @@ void SourceBuffer::evictCodedFrames(size_t newDataSize)
rangeEnd += thirtySeconds;
}

#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
if (!m_bufferFull) {
DEBUG_LOG(LOGIDENTIFIER, "evicted ", initialBufferedSize - extraMemoryCost());
return;
Expand All @@ -989,7 +989,7 @@ void SourceBuffer::evictCodedFrames(size_t newDataSize)
auto buffered = m_buffered->ranges();
size_t currentTimeRange = buffered.find(currentTime);
if (currentTimeRange == notFound || currentTimeRange == buffered.length() - 1) {
#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
ERROR_LOG(LOGIDENTIFIER, "evicted ", initialBufferedSize - extraMemoryCost(), " bytes but FAILED to free enough");
#endif
return;
Expand Down Expand Up @@ -1023,7 +1023,7 @@ void SourceBuffer::evictCodedFrames(size_t newDataSize)
rangeEnd -= thirtySeconds;
}

#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
if (m_bufferFull)
ERROR_LOG(LOGIDENTIFIER, "evicted ", initialBufferedSize - extraMemoryCost(), " but FAILED to free enough");
else
Expand Down Expand Up @@ -2002,7 +2002,7 @@ void SourceBuffer::provideMediaData(TrackBuffer& trackBuffer, const AtomicString
if (m_source->isSeeking())
return;

#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
unsigned enqueuedSamples = 0;
#endif

Expand Down Expand Up @@ -2037,12 +2037,12 @@ void SourceBuffer::provideMediaData(TrackBuffer& trackBuffer, const AtomicString
trackBuffer.lastEnqueuedDecodeKey = {sample->decodeTime(), sample->presentationTime()};
trackBuffer.lastEnqueuedDecodeDuration = sample->duration();
m_private->enqueueSample(sample.releaseNonNull(), trackID);
#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
++enqueuedSamples;
#endif
}

#if !LOG_DISABLED
#if !RELEASE_LOG_DISABLED
DEBUG_LOG(LOGIDENTIFIER, "Enqueued ", enqueuedSamples, " samples, ", static_cast<size_t>(trackBuffer.decodeQueue.size()), " remaining");
#endif

Expand Down

0 comments on commit 5e723df

Please sign in to comment.