#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
}
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;
}
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;
}
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 */
}
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)
* 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);
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));