Changeset 135863 in webkit


Ignore:
Timestamp:
Nov 27, 2012 7:58:34 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] Verify if GStreamer was previously initialized
https://bugs.webkit.org/show_bug.cgi?id=103151

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2012-11-27
Reviewed by Philippe Normand.

Source/WebCore:

This patch calls gst_is_initialized() before calling gst_init_check()
in order to verify if GStreamer has not been initialized before.

This is useful particularly for WebKit1 so the applications could
initialize GStreamer before.

As the API call was added in GStreamer v0.10.31, the patch fences the
call only in that version of GStreamer or above.

No new tests, existing media tests cover this change.

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::initializeGStreamer):

Tools:

This patch adds the gst_init() in GtkLauncher, so we can add the
GStreamer options in the command line through
gst_init_get_option_group().

This approach is not valid for MiniBrowser because it uses WebKit2,
where the GStreamer backend lives in the web process, which is
different from the UI process.

  • GNUmakefile.am:
  • GtkLauncher/main.c:

(main):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r135862 r135863  
     12012-11-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
     2
     3        [GStreamer] Verify if GStreamer was previously initialized
     4        https://bugs.webkit.org/show_bug.cgi?id=103151
     5
     6        Reviewed by Philippe Normand.
     7
     8        This patch calls gst_is_initialized() before calling gst_init_check()
     9        in order to verify if GStreamer has not been initialized before.
     10
     11        This is useful particularly for WebKit1 so the applications could
     12        initialize GStreamer before.
     13
     14        As the API call was added in GStreamer v0.10.31, the patch fences the
     15        call only in that version of GStreamer or above.
     16
     17        No new tests, existing media tests cover this change.
     18
     19        * platform/graphics/gstreamer/GStreamerUtilities.cpp:
     20        (WebCore::initializeGStreamer):
     21
    1222012-11-27  Kentaro Hara  <haraken@chromium.org>
    223
  • trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp

    r114269 r135863  
    3030bool initializeGStreamer()
    3131{
     32#if GST_CHECK_VERSION(0, 10, 31)
     33    if (gst_is_initialized())
     34        return true;
     35#endif
     36
    3237    GOwnPtr<GError> error;
    3338    // FIXME: We should probably pass the arguments from the command line.
  • trunk/Tools/ChangeLog

    r135857 r135863  
     12012-11-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
     2
     3        [GStreamer] Verify if GStreamer was previously initialized
     4        https://bugs.webkit.org/show_bug.cgi?id=103151
     5
     6        Reviewed by Philippe Normand.
     7
     8        This patch adds the gst_init() in GtkLauncher, so we can add the
     9        GStreamer options in the command line through
     10        gst_init_get_option_group().
     11
     12        This approach is not valid for MiniBrowser because it uses WebKit2,
     13        where the GStreamer backend lives in the web process, which is
     14        different from the UI process.
     15
     16        * GNUmakefile.am:
     17        * GtkLauncher/main.c:
     18        (main):
     19
    1202012-11-27  Andras Becsi  <andras.becsi@digia.com>
    221
  • trunk/Tools/GNUmakefile.am

    r134864 r135863  
    2323        $(global_cflags) \
    2424        $(GTK_CFLAGS) \
    25         $(LIBSOUP_CFLAGS)
     25        $(LIBSOUP_CFLAGS) \
     26        $(GSTREAMER_CFLAGS)
    2627
    2728Programs_GtkLauncher_LDADD = \
     
    3132        $(GLIB_LIBS) \
    3233        $(LIBSOUP_LIBS) \
    33         $(WINMM_LIBS)
     34        $(WINMM_LIBS) \
     35        $(GSTREAMER_LIBS)
    3436
    3537Programs_GtkLauncher_LDFLAGS = \
  • trunk/Tools/GtkLauncher/main.c

    r130386 r135863  
    2828#include "LauncherInspectorWindow.h"
    2929#include <errno.h>
     30#include <gst/gst.h>
    3031#include <gtk/gtk.h>
    3132#include <stdlib.h>
     
    484485
    485486    gtk_init(&argc, &argv);
     487    gst_init(&argc, &argv);
    486488
    487489    GOptionContext *context = g_option_context_new(0);
    488490    g_option_context_add_main_entries(context, commandLineOptions, 0);
    489491    g_option_context_add_group(context, gtk_get_option_group(TRUE));
     492    g_option_context_add_group(context, gst_init_get_option_group());
    490493
    491494    webkitSettings = webkit_web_settings_new();
Note: See TracChangeset for help on using the changeset viewer.