Bug 143218 - [GStreamer] Move synchronous message handler to MediaPlayerPrivateGStreamerBase
Summary: [GStreamer] Move synchronous message handler to MediaPlayerPrivateGStreamerBase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-30 07:22 PDT by Philippe Normand
Modified: 2015-04-01 03:47 PDT (History)
4 users (show)

See Also:


Attachments
patch (40.68 KB, patch)
2015-03-30 09:03 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
patch (40.72 KB, patch)
2015-03-31 01:09 PDT, Philippe Normand
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2015-03-30 07:22:46 PDT
Video rendering is handled in the base class so the GL context set-up code should also be there.

This is going to be needed anyway if we ever want to do WebRTC video rendering with glimagesink.
Comment 1 Philippe Normand 2015-03-30 09:03:22 PDT
Created attachment 249733 [details]
patch
Comment 2 Philippe Normand 2015-03-31 01:09:39 PDT
Created attachment 249805 [details]
patch
Comment 3 Carlos Garcia Campos 2015-04-01 02:33:09 PDT
Comment on attachment 249805 [details]
patch

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

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:292
> -    g_object_set(m_playBin.get(), "uri", cleanURL.utf8().data(), NULL);
> +    g_object_set(m_pipeline.get(), "uri", cleanURL.utf8().data(), NULL);

nullptr.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:535
> -    GstStateChangeReturn getStateResult = gst_element_get_state(m_playBin.get(), &state, 0, 0);
> +    GstStateChangeReturn getStateResult = gst_element_get_state(m_pipeline.get(), &state, 0, 0);

&state, 0, 0 -> &state, nullptr, 0

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:612
> -        g_object_set(m_playBin.get(), "mute", mute, NULL);
> +        g_object_set(m_pipeline.get(), "mute", mute, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:644
> -    gst_element_get_state(m_playBin.get(), &state, 0, 0);
> +    gst_element_get_state(m_pipeline.get(), &state, 0, 0);

&state, 0, 0 -> &state, nullptr, 0

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:667
> -    if (m_playBin)
> -        g_object_get(m_playBin.get(), "n-video", &numTracks, NULL);
> +    if (m_pipeline)
> +        g_object_get(m_pipeline.get(), "n-video", &numTracks, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:674
> -        g_signal_emit_by_name(m_playBin.get(), "get-video-pad", i, &pad.outPtr(), NULL);
> +        g_signal_emit_by_name(m_pipeline.get(), "get-video-pad", i, &pad.outPtr(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:715
> -    if (m_playBin)
> -        g_object_get(m_playBin.get(), "n-audio", &numTracks, NULL);
> +    if (m_pipeline)
> +        g_object_get(m_pipeline.get(), "n-audio", &numTracks, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:722
> -        g_signal_emit_by_name(m_playBin.get(), "get-audio-pad", i, &pad.outPtr(), NULL);
> +        g_signal_emit_by_name(m_pipeline.get(), "get-audio-pad", i, &pad.outPtr(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:758
> -    if (m_playBin)
> -        g_object_get(m_playBin.get(), "n-text", &numTracks, NULL);
> +    if (m_pipeline)
> +        g_object_get(m_pipeline.get(), "n-text", &numTracks, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:762
> -        g_signal_emit_by_name(m_playBin.get(), "get-text-pad", i, &pad.outPtr(), NULL);
> +        g_signal_emit_by_name(m_pipeline.get(), "get-text-pad", i, &pad.outPtr(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:999
> -        gst_element_get_state(m_playBin.get(), &currentState, NULL, 250);
> +        gst_element_get_state(m_pipeline.get(), &currentState, NULL, 250);

nullptr. Doesn't 250 need to be multiplied by GST_NSECOND?

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1322
> -    g_object_get(m_playBin.get(), "source", &m_source.outPtr(), NULL);
> +    g_object_get(m_pipeline.get(), "source", &m_source.outPtr(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1603
> -            gst_element_get_state(m_playBin.get(), &state, 0, 0);
> +            gst_element_get_state(m_pipeline.get(), &state, 0, 0);

&state, 0, 0 -> &state, nullptr, 0

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1606
> -                g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL);
> +                g_object_set(m_pipeline.get(), "uri", newUrl.string().utf8().data(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1660
> -        if (gst_element_get_state(m_playBin.get(), &state, 0, 0) == GST_STATE_CHANGE_SUCCESS && state > GST_STATE_READY)
> +        if (gst_element_get_state(m_pipeline.get(), &state, 0, 0) == GST_STATE_CHANGE_SUCCESS && state > GST_STATE_READY)

&state, 0, 0 -> &state, nullptr, 0

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1827
> -    g_object_get(m_playBin.get(), "flags", &flags, NULL);
> +    g_object_get(m_pipeline.get(), "flags", &flags, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1838
> -        g_object_set(m_playBin.get(), "flags", flags | flagDownload, NULL);
> +        g_object_set(m_pipeline.get(), "flags", flags | flagDownload, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1842
> -        g_object_set(m_playBin.get(), "flags", flags & ~flagDownload, NULL);
> +        g_object_set(m_pipeline.get(), "flags", flags & ~flagDownload, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1938
> -    g_object_set(m_playBin.get(), "mute", m_player->muted(), NULL);
> +    g_object_set(m_pipeline.get(), "mute", m_player->muted(), NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1949
> -        g_object_set(m_playBin.get(), "text-stream-combiner", textCombiner, NULL);
> +        g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, NULL);

nullptr

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1960
> -        g_object_set(m_playBin.get(), "text-sink", m_textAppSink.get(), NULL);
> +        g_object_set(m_pipeline.get(), "text-sink", m_textAppSink.get(), NULL);

nullptr
Comment 4 Philippe Normand 2015-04-01 03:45:16 PDT
Comment on attachment 249805 [details]
patch

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

>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:999
>> +        gst_element_get_state(m_pipeline.get(), &currentState, NULL, 250);
> 
> nullptr. Doesn't 250 need to be multiplied by GST_NSECOND?

Indeed :)
Comment 5 Philippe Normand 2015-04-01 03:47:26 PDT
Committed r182229: <http://trac.webkit.org/changeset/182229>