[webkit-reviews] review granted: [Bug 188647] [GStreamer][MSE] Generic main thread notification support : [Attachment 347258] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 17 00:47:19 PDT 2018
Xabier RodrÃguez Calvar <calvaris at igalia.com> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 188647: [GStreamer][MSE] Generic main thread notification support
https://bugs.webkit.org/show_bug.cgi?id=188647
Attachment 347258: Patch
https://bugs.webkit.org/attachment.cgi?id=347258&action=review
--- Comment #2 from Xabier RodrÃguez Calvar <calvaris at igalia.com> ---
Comment on attachment 347258
--> https://bugs.webkit.org/attachment.cgi?id=347258
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=347258&action=review
>
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:1
26
> case MediaSourceSeekToTime: {
> - GstStructure* structure =
gst_structure_new_empty("seek-needs-data");
> - GstMessage* message =
gst_message_new_application(GST_OBJECT(appsrc), structure);
> - gst_bus_post(webKitMediaSrc->priv->bus.get(), message);
> - GST_TRACE("seek-needs-data message posted to the bus");
> +
webKitMediaSrc->priv->notifier->notify(MSEMainThreadNotification::SeekNeedsData
, [webKitMediaSrc] {
> + seekNeedsDataMainThread(webKitMediaSrc);
> + });
> break;
> }
You don't need to enclose the case in { } anymore since we don't have scoped
variables. Please, remove them.
>
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:1
43
> if (appsrcStream && appsrcStream->type != WebCore::Invalid) {
> - GstStructure* structure =
gst_structure_new("ready-for-more-samples", "appsrc-stream", G_TYPE_POINTER,
appsrcStream, nullptr);
> - GstMessage* message =
gst_message_new_application(GST_OBJECT(appsrc), structure);
> - gst_bus_post(webKitMediaSrc->priv->bus.get(), message);
> - GST_TRACE("ready-for-more-samples message posted to the bus");
> +
> +
webKitMediaSrc->priv->notifier->notify(MSEMainThreadNotification::ReadyForMoreS
amples, [webKitMediaSrc, appsrcStream] {
> + notifyReadyForMoreSamplesMainThread(webKitMediaSrc,
appsrcStream);
> + });
> }
You don't need the if { } anymore because there is only one clause in it.
Please remove them.
>
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivat
e.h:100
> +enum MSEMainThreadNotification {
I guess you preprended MSE to this type because it can collide with other types
defined inside other other files. In this case I would strongly encourage you
to preprend the whole class and name it WebKitMediaSrcMainThreadNotification.
>
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivat
e.h:102
> + SeekNeedsData = 1 << 0,
> + ReadyForMoreSamples = 1 << 1
Longshot nit: I think it would be nicer to, at least, begin with these
alphabetically sorted. It is not a requirement, but nice to have :)
More information about the webkit-reviews
mailing list