Merge remote-tracking branch 'origin/master' into 0.11
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 13:32:30 +0000 (13:32 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 13:36:29 +0000 (13:36 +0000)
Conflicts:
gst-libs/gst/audio/Makefile.am
gst-libs/gst/audio/audio.h
tests/examples/seek/jsseek.c
tests/examples/seek/seek.c
tests/icles/test-colorkey.c

1  2 
configure.ac
gst-libs/gst/audio/audio.h
gst-libs/gst/audio/gstaudiodecoder.c
tests/examples/seek/jsseek.c
tests/examples/seek/seek.c
tests/icles/test-colorkey.c
tests/icles/test-videooverlay.c

diff --cc configure.ac
Simple merge
@@@ -287,13 -248,10 +287,15 @@@ struct _GstAudioInfo 
    gint                      channels;
    gint                      bpf;
    GstAudioChannelPosition   position[64];
 +
 +  /*< private >*/
 +  gpointer _gst_reserved[GST_PADDING];
  };
  
 +GType gst_audio_info_get_type        (void);
 +
+ #define GST_AUDIO_INFO_IS_VALID(i)           ((i)->finfo != NULL && (i)->rate > 0 && (i)->channels > 0 && (i)->bpf > 0)
  #define GST_AUDIO_INFO_FORMAT(i)             (GST_AUDIO_FORMAT_INFO_FORMAT((i)->finfo))
  #define GST_AUDIO_INFO_NAME(i)               (GST_AUDIO_FORMAT_INFO_NAME((i)->finfo))
  #define GST_AUDIO_INFO_WIDTH(i)              (GST_AUDIO_FORMAT_INFO_WIDTH((i)->finfo))
@@@ -742,10 -721,13 +742,13 @@@ gst_audio_decoder_finish_frame (GstAudi
  
    priv = dec->priv;
    ctx = &dec->priv->ctx;
 +  size = buf ? gst_buffer_get_size (buf) : 0;
  
+   /* must know the output format by now */
+   g_return_val_if_fail (GST_AUDIO_INFO_IS_VALID (&ctx->info), GST_FLOW_ERROR);
    GST_LOG_OBJECT (dec, "accepting %d bytes == %d samples for %d frames",
 -      buf ? GST_BUFFER_SIZE (buf) : -1,
 -      buf ? GST_BUFFER_SIZE (buf) / ctx->info.bpf : -1, frames);
 +      buf ? size : -1, buf ? size / ctx->info.bpf : -1, frames);
  
    GST_AUDIO_DECODER_STREAM_LOCK (dec);
  
  GST_DEBUG_CATEGORY_STATIC (seek_debug);
  #define GST_CAT_DEFAULT (seek_debug)
  
- #if (!GTK_CHECK_VERSION(2, 23, 0) || GTK_CHECK_VERSION(2, 90, 0)) && !GTK_CHECK_VERSION(2, 91, 1)
- #define gtk_combo_box_text_new gtk_combo_box_new_text
- #define gtk_combo_box_text_append_text gtk_combo_box_append_text
- #define gtk_combo_box_text_remove gtk_combo_box_remove_text
- #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
- #endif
- #if !GTK_CHECK_VERSION (2, 17, 7)
- static void
- gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
- {
-   *a = w->allocation;
- }
- #endif
  /* configuration */
 -
 -//#define SOURCE "filesrc"
 -#define SOURCE "gnomevfssrc"
 +#define SOURCE "filesrc"
  
  #define ASINK "alsasink"
  //#define ASINK "osssink"
  #include <gdk/gdkwin32.h>
  #endif
  
 -#include <gst/interfaces/xoverlay.h>
 +#include <gst/interfaces/videooverlay.h>
  
- #if (!GTK_CHECK_VERSION(2, 23, 0) || GTK_CHECK_VERSION(2, 90, 0)) && !GTK_CHECK_VERSION(2, 91, 1)
- #define gtk_combo_box_text_new gtk_combo_box_new_text
- #define gtk_combo_box_text_append_text gtk_combo_box_append_text
- #define gtk_combo_box_text_remove gtk_combo_box_remove_text
- #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
- #endif
  GST_DEBUG_CATEGORY_STATIC (seek_debug);
  #define GST_CAT_DEFAULT (seek_debug)
  
  #include <gtk/gtk.h>
  
  #include <gst/gst.h>
 -#include <gst/interfaces/xoverlay.h>
 +#include <gst/interfaces/videooverlay.h>
  #include <gst/interfaces/propertyprobe.h>
  
- #if !GTK_CHECK_VERSION (2, 17, 7)
- static void
- gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
- {
-   *a = w->allocation;
- }
- #endif
  static GtkWidget *video_window = NULL;
  static GstElement *sink = NULL;
  static gulong embed_xid = 0;
  #include <gtk/gtk.h>
  
  #include <gst/gst.h>
 -#include <gst/interfaces/xoverlay.h>
 +#include <gst/interfaces/videooverlay.h>
  #include <gst/video/gstvideosink.h>
  
- #if !GTK_CHECK_VERSION (2, 17, 7)
- static void
- gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
- {
-   *a = w->allocation;
- }
- #endif
  static struct
  {
    gint w, h;
@@@ -126,12 -113,10 +113,10 @@@ handle_draw_cb (GtkWidget * widget, cai
  
    cairo_fill (cr);
  
-   cairo_destroy (cr);
    if (verbose) {
-     g_print ("expose(%p)\n", widget);
+     g_print ("draw(%p)\n", widget);
    }
 -  gst_x_overlay_expose (anim_state.overlay);
 +  gst_video_overlay_expose (anim_state.overlay);
    return FALSE;
  }