Merge branch 'master' into 0.11
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 11:07:22 +0000 (12:07 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 11:07:22 +0000 (12:07 +0100)
Conflicts:
tests/examples/Makefile.am
tests/examples/playback/playback-test.c

1  2 
configure.ac
tests/examples/Makefile.am
tests/examples/playback/playback-test.c
tests/examples/seek/Makefile.am

diff --cc configure.ac
@@@ -893,7 -1023,9 +893,8 @@@ tests/examples/gio/Makefil
  tests/examples/overlay/Makefile
  tests/examples/seek/Makefile
  tests/examples/snapshot/Makefile
+ tests/examples/playback/Makefile
  tests/examples/playrec/Makefile
 -tests/examples/v4l/Makefile
  tests/files/Makefile
  tests/icles/Makefile
  tests/icles/playback/Makefile
@@@ -4,8 -4,17 +4,12 @@@ els
  FT2_SUBDIRS =
  endif
  
- SUBDIRS = app audio dynamic fft $(FT2_SUBDIRS) gio overlay playrec encoding
- DIST_SUBDIRS = app audio dynamic fft gio overlay seek snapshot playrec encoding
 -if USE_GIO
 -GIO_SUBDIRS = gio
 -endif
 -
 -if HAVE_GTK_X11
++if HAVE_GTK
+ GTK_SUBDIRS = playback
+ endif
 -SUBDIRS = app audio dynamic fft $(FT2_SUBDIRS) $(GIO_SUBDIRS) overlay $(GTK_SUBDIRS) playrec v4l encoding
 -
 -DIST_SUBDIRS = app audio dynamic fft gio overlay seek snapshot playback playrec v4l encoding
++SUBDIRS = app audio dynamic fft $(FT2_SUBDIRS) $(GTK_SUBDIRS) gio overlay playrec encoding
++DIST_SUBDIRS = app audio dynamic fft gio playback overlay seek snapshot playrec encoding
  
  include $(top_srcdir)/common/parallel-subdirs.mak
  
  #include <gdk/gdkquartzwindow.h>
  #endif
  
 -#include <gst/interfaces/xoverlay.h>
 +#include <gst/video/videooverlay.h>
 +#include <gst/video/colorbalance.h>
  #include <gst/interfaces/navigation.h>
 -#include <gst/interfaces/colorbalance.h>
  
- GST_DEBUG_CATEGORY_STATIC (seek_debug);
- #define GST_CAT_DEFAULT (seek_debug)
+ GST_DEBUG_CATEGORY_STATIC (playback_debug);
+ #define GST_CAT_DEFAULT (playback_debug)
  
  /* Copied from gst-plugins-base/gst/playback/gstplay-enum.h */
  typedef enum
@@@ -259,7 -260,7 +260,7 @@@ playbin_set_uri (GstElement * playbin, 
  }
  
  static void
- make_playbin_pipeline (SeekApp * app, const gchar * location)
 -make_playbin2_pipeline (PlaybackApp * app, const gchar * location)
++make_playbin_pipeline (PlaybackApp * app, const gchar * location)
  {
    GstElement *pipeline;
  
@@@ -728,9 -729,9 +729,9 @@@ failed
  }
  
  static void
- pause_cb (GtkButton * button, SeekApp * app)
+ pause_cb (GtkButton * button, PlaybackApp * app)
  {
 -  g_static_mutex_lock (&app->state_mutex);
 +  g_mutex_lock (&app->state_mutex);
    if (app->state != GST_STATE_PAUSED) {
      GstStateChangeReturn ret;
  
@@@ -1309,15 -1310,14 +1310,15 @@@ mute_notify_cb (GstElement * pipeline, 
  }
  
  static void
- shot_cb (GtkButton * button, SeekApp * app)
+ shot_cb (GtkButton * button, PlaybackApp * app)
  {
 -  GstBuffer *buffer;
 +  GstSample *sample = NULL;
    GstCaps *caps;
  
 +  GST_DEBUG ("taking snapshot");
 +
    /* convert to our desired format (RGB24) */
 -  caps = gst_caps_new_simple ("video/x-raw-rgb",
 -      "bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24,
 +  caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "RGB",
        /* Note: we don't ask for a specific width/height here, so that
         * videoscale can adjust dimensions from a non-1/1 pixel aspect
         * ratio to a 1/1 pixel-aspect-ratio */
@@@ -1939,10 -1933,10 +1940,10 @@@ is_valid_color_balance_element (GstElem
  }
  
  static void
- find_interface_elements (SeekApp * app)
+ find_interface_elements (PlaybackApp * app)
  {
    GstIterator *it;
 -  gpointer item;
 +  GValue item = { 0, };
    gboolean done = FALSE, hardware = FALSE;
  
    if (app->pipeline_type == 0)
@@@ -2044,14 -2037,15 +2045,14 @@@ navigation_cmd_cb (GtkButton * button, 
   * or gconfvideosink may be used which create the actual videosink only once
   * the pipeline is started) */
  static GstBusSyncReply
- bus_sync_handler (GstBus * bus, GstMessage * message, SeekApp * app)
+ bus_sync_handler (GstBus * bus, GstMessage * message, PlaybackApp * app)
  {
 -  if ((GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) &&
 -      gst_structure_has_name (message->structure, "prepare-xwindow-id")) {
 +  if (gst_is_video_overlay_prepare_window_handle_message (message)) {
      GstElement *element = GST_ELEMENT (GST_MESSAGE_SRC (message));
  
 -    if (app->xoverlay_element)
 -      gst_object_unref (app->xoverlay_element);
 -    app->xoverlay_element = GST_ELEMENT (gst_object_ref (element));
 +    if (app->overlay_element)
 +      gst_object_unref (app->overlay_element);
 +    app->overlay_element = GST_ELEMENT (gst_object_ref (element));
  
      g_print ("got prepare-xwindow-id, setting XID %" G_GUINTPTR_FORMAT "\n",
          app->embed_xid);
@@@ -3251,7 -3246,12 +3254,7 @@@ main (int argc, char **argv
  
    set_defaults (&app);
  
-   ctx = g_option_context_new ("- test seeking in gsteamer");
 -#if !GLIB_CHECK_VERSION (2, 31, 0)
 -  if (!g_thread_supported ())
 -    g_thread_init (NULL);
 -#endif
 -
+   ctx = g_option_context_new ("- playback testing in gsteamer");
    g_option_context_add_main_entries (ctx, options, NULL);
    g_option_context_add_group (ctx, gst_init_get_option_group ());
    g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
Simple merge