[webkit-reviews] review granted: [Bug 174817] [GStreamer] Refactor media player to use MediaTime consistently : [Attachment 317707] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 9 14:06:07 PDT 2017


Xabier Rodríguez Calvar <calvaris at igalia.com> has granted Charlie Turner
<cturner at igalia.com>'s request for review:
Bug 174817: [GStreamer] Refactor media player to use MediaTime consistently
https://bugs.webkit.org/show_bug.cgi?id=174817

Attachment 317707: Patch

https://bugs.webkit.org/attachment.cgi?id=317707&action=review




--- Comment #11 from Xabier Rodríguez Calvar <calvaris at igalia.com> ---
Comment on attachment 317707
  --> https://bugs.webkit.org/attachment.cgi?id=317707
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=317707&action=review

> Source/WebCore/ChangeLog:41
> +	   Make consistent use of the MediaTime class in the GStreamer media
> +	   player implementations.
> +
> +	   Covered by existing tests.
> +
> +	   * platform/graphics/gstreamer/GStreamerUtilities.cpp:
> +	   (WebCore::toGstClockTime):
> +	   * platform/graphics/gstreamer/GStreamerUtilities.h:
> +	   * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
> +	   (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
> +	   (WebCore::MediaPlayerPrivateGStreamer::load):
> +	   (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
> +	   (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime):
> +	   (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime):
> +	   (WebCore::MediaPlayerPrivateGStreamer::seek):
> +	   (WebCore::MediaPlayerPrivateGStreamer::doSeek):
> +	   (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
> +	   (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
> +	   (WebCore::MediaPlayerPrivateGStreamer::updateStates):
> +	   (WebCore::MediaPlayerPrivateGStreamer::didEnd):
> +	   * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
> +	   * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
> +	   (WebCore::GStreamerMediaSample::offsetTimestampsBy):
> +	   *
platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
> +	   (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
> +	  
(WebCore::MediaPlayerPrivateGStreamerMSE::notifySeekNeedsDataForTime):
> +	   (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
> +	   (WebCore::MediaPlayerPrivateGStreamerMSE::isTimeBuffered):
> +	   (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime):
> +	   * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
> +	   * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
> +	   (WebCore::PlaybackPipeline::enqueueSample):
> +	   * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
> +	   (webKitMediaSrcQueryWithParent):

You need to be more verbose here, either by commenting more in the general
section or in the file specific one.

> Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:184
> +uint64_t toGstUnsigned64Time(const MediaTime &mediaTime)

Move the & next to the type

> Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:191
> +GstClockTime toGstClockTime(const MediaTime &mediaTime)

Ditto. And leave a space between the two functions. Or even better, make this
inline in the header file.

>
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:477
> +    time = std::min(time, durationMediaTime());

You can delay the creation of time until here because first you should be able
to use mediaTime.


More information about the webkit-reviews mailing list