Skip to content

Commit

Permalink
[MSE] Fix code spell in internal API
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266175

Reviewed by Xabier Rodriguez-Calvar.

Initialization goes with z, not s.

* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::didReceiveInitializationSegment):
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::precheckInitializationSegment):
(WebCore::SourceBufferPrivate::processInitializationSegment):
(WebCore::SourceBufferPrivate::precheckInitialisationSegment): Deleted.
(WebCore::SourceBufferPrivate::processInitialisationSegment): Deleted.
* Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::precheckInitializationSegment):
(WebCore::SourceBufferPrivateAVFObjC::processInitializationSegment):
(WebCore::SourceBufferPrivateAVFObjC::precheckInitialisationSegment): Deleted.
(WebCore::SourceBufferPrivateAVFObjC::processInitialisationSegment): Deleted.
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::precheckInitializationSegment):
(WebCore::SourceBufferPrivateGStreamer::processInitializationSegment):
(WebCore::SourceBufferPrivateGStreamer::precheckInitialisationSegment): Deleted.
(WebCore::SourceBufferPrivateGStreamer::processInitialisationSegment): Deleted.
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:

Canonical link: https://commits.webkit.org/271862@main
  • Loading branch information
philn committed Dec 11, 2023
1 parent 0bb420a commit 121e1be
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,11 +599,11 @@ void SourceBufferPrivate::didReceiveInitializationSegment(InitializationSegment&
return MediaPromise::createAndReject(PlatformMediaError::BufferRemoved);

if (abortCount != m_abortCount) {
processInitialisationSegment({ });
processInitializationSegment({ });
return MediaPromise::createAndResolve();
}
if (!result || ((m_receivedFirstInitializationSegment && !validateInitializationSegment(segment)) || !precheckInitialisationSegment(segment))) {
processInitialisationSegment({ });
if (!result || ((m_receivedFirstInitializationSegment && !validateInitializationSegment(segment)) || !precheckInitializationSegment(segment))) {
processInitializationSegment({ });
return MediaPromise::createAndReject(!result ? result.error() : PlatformMediaError::ParsingError);
}

Expand All @@ -617,7 +617,7 @@ void SourceBufferPrivate::didReceiveInitializationSegment(InitializationSegment&
m_receivedFirstInitializationSegment = true;
m_pendingInitializationSegmentForChangeType = false;

processInitialisationSegment(!result ? std::nullopt : std::make_optional(WTFMove(segment)));
processInitializationSegment(!result ? std::nullopt : std::make_optional(WTFMove(segment)));

return MediaPromise::createAndSettle(WTFMove(result));
});
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/platform/graphics/SourceBufferPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ class SourceBufferPrivate

void reenqueSamples(TrackID);

virtual bool precheckInitialisationSegment(const InitializationSegment&) { return true; }
virtual void processInitialisationSegment(std::optional<InitializationSegment>&&) { }
virtual bool precheckInitializationSegment(const InitializationSegment&) { return true; }
virtual void processInitializationSegment(std::optional<InitializationSegment>&&) { }
virtual void processFormatDescriptionForTrackId(Ref<TrackInfo>&&, uint64_t) { }

void provideMediaData(TrackID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ ALLOW_NEW_API_WITHOUT_GUARDS_END
bool canSwitchToType(const ContentType&) final;
bool isSeeking() const final;

bool precheckInitialisationSegment(const InitializationSegment&) final;
void processInitialisationSegment(std::optional<InitializationSegment>&&) final;
bool precheckInitializationSegment(const InitializationSegment&) final;
void processInitializationSegment(std::optional<InitializationSegment>&&) final;
void processFormatDescriptionForTrackId(Ref<TrackInfo>&&, TrackID) final;

void processPendingTrackChangeTasks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static bool sampleBufferRenderersSupportKeySession()
}
}

bool SourceBufferPrivateAVFObjC::precheckInitialisationSegment(const InitializationSegment& segment)
bool SourceBufferPrivateAVFObjC::precheckInitializationSegment(const InitializationSegment& segment)
{
ALWAYS_LOG(LOGIDENTIFIER);

Expand All @@ -438,7 +438,7 @@ static bool sampleBufferRenderersSupportKeySession()
return true;
}

void SourceBufferPrivateAVFObjC::processInitialisationSegment(std::optional<InitializationSegment>&& segment)
void SourceBufferPrivateAVFObjC::processInitializationSegment(std::optional<InitializationSegment>&& segment)
{
ALWAYS_LOG(LOGIDENTIFIER);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void SourceBufferPrivateGStreamer::allSamplesInTrackEnqueued(TrackID trackId)
track->enqueueObject(adoptGRef(GST_MINI_OBJECT(gst_event_new_eos())));
}

bool SourceBufferPrivateGStreamer::precheckInitialisationSegment(const InitializationSegment& segment)
bool SourceBufferPrivateGStreamer::precheckInitializationSegment(const InitializationSegment& segment)
{
for (auto& trackInfo : segment.videoTracks) {
auto* videoTrackInfo = static_cast<VideoTrackPrivateGStreamer*>(trackInfo.track.get());
Expand All @@ -229,7 +229,7 @@ bool SourceBufferPrivateGStreamer::precheckInitialisationSegment(const Initializ
return true;
}

void SourceBufferPrivateGStreamer::processInitialisationSegment(std::optional<InitializationSegment>&& segment)
void SourceBufferPrivateGStreamer::processInitializationSegment(std::optional<InitializationSegment>&& segment)
{
if (RefPtr mediaSource = m_mediaSource.get(); mediaSource && segment)
static_cast<MediaSourcePrivateGStreamer*>(mediaSource.get())->startPlaybackIfHasAllTracks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class SourceBufferPrivateGStreamer final : public SourceBufferPrivate {
void allSamplesInTrackEnqueued(TrackID) final;
bool isReadyForMoreSamples(TrackID) final;

bool precheckInitialisationSegment(const InitializationSegment&) final;
void processInitialisationSegment(std::optional<InitializationSegment>&&) final;
bool precheckInitializationSegment(const InitializationSegment&) final;
void processInitializationSegment(std::optional<InitializationSegment>&&) final;

void didReceiveAllPendingSamples();
void appendParsingFailed();
Expand Down

0 comments on commit 121e1be

Please sign in to comment.