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))
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;
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;
}