summaryrefslogtreecommitdiff
path: root/tests/examples/uvch264
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@greynoise.nl>2013-01-18 23:14:27 +0100
committerSjoerd Simons <sjoerd@luon.net>2013-02-11 22:04:59 +0100
commit040626c4736270500fd7c2c06f4d8c992a651b05 (patch)
tree05271eab10bb6fb99ea22b96a1e0e6c1fef45e20 /tests/examples/uvch264
parent14637e2a271222ae04356cfa7b88cb34775d2d0d (diff)
uvch264: Port test to gstreamer 1.0
Diffstat (limited to 'tests/examples/uvch264')
-rw-r--r--tests/examples/uvch264/Makefile.am1
-rw-r--r--tests/examples/uvch264/test-uvch264.c14
-rw-r--r--tests/examples/uvch264/window.glade2
3 files changed, 8 insertions, 9 deletions
diff --git a/tests/examples/uvch264/Makefile.am b/tests/examples/uvch264/Makefile.am
index e02b88821..43d0c5441 100644
--- a/tests/examples/uvch264/Makefile.am
+++ b/tests/examples/uvch264/Makefile.am
@@ -20,7 +20,6 @@ test_uvch264_LDADD = \
$(GST_PLUGINS_BASE_LIBS) \
$(GST_VIDEO_LIBS) \
$(GST_LIBS) \
- -lgstinterfaces-@GST_MAJORMINOR@ \
$(GTK_LIBS) \
$(GMODULE_EXPORT_LIBS)
diff --git a/tests/examples/uvch264/test-uvch264.c b/tests/examples/uvch264/test-uvch264.c
index 78d8ac110..4541b863f 100644
--- a/tests/examples/uvch264/test-uvch264.c
+++ b/tests/examples/uvch264/test-uvch264.c
@@ -1,7 +1,6 @@
#include <gst/gst.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
-#include <gst/interfaces/xoverlay.h>
#include <gst/video/video.h>
#define WINDOW_GLADE "window.glade"
@@ -247,8 +246,7 @@ set_caps (Main * self, gboolean send_event)
if (send_event) {
gst_element_send_event (GST_ELEMENT (self->src),
- gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
- gst_structure_new ("renegotiate", NULL)));
+ gst_event_new_reconfigure ());
}
end:
@@ -357,12 +355,14 @@ _bus_callback (GstBus * bus, GstMessage * message, gpointer user_data)
GstObject *source = NULL;
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT &&
- gst_structure_has_name (s, "prepare-xwindow-id")) {
+ gst_structure_has_name (s, "prepare-window-handle")) {
source = GST_MESSAGE_SRC (message);
if (!g_strcmp0 (gst_object_get_name (source), "h264_sink"))
- gst_x_overlay_set_window_handle (GST_X_OVERLAY (source), h264_xid);
+ gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (source),
+ h264_xid);
else
- gst_x_overlay_set_window_handle (GST_X_OVERLAY (source), preview_xid);
+ gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (source),
+ preview_xid);
}
return TRUE;
@@ -531,7 +531,7 @@ main (int argc, char *argv[])
self.bin = gst_parse_launch ("uvch264_src name=src src.vidsrc ! queue ! "
- "capsfilter name=vid_cf ! identity name=identity ! ffdec_h264 ! "
+ "capsfilter name=vid_cf ! identity name=identity ! decodebin ! "
"xvimagesink name=h264_sink async=false "
"src.vfsrc ! queue ! capsfilter name=vf_cf ! "
"xvimagesink name=preview_sink async=false", NULL);
diff --git a/tests/examples/uvch264/window.glade b/tests/examples/uvch264/window.glade
index 8b7624a9f..6b28d7e47 100644
--- a/tests/examples/uvch264/window.glade
+++ b/tests/examples/uvch264/window.glade
@@ -307,7 +307,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
- <property name="text" translatable="yes">video/x-raw-yuv,width=320,height=240,format=(fourcc)YUY2,framerate=15/1</property>
+ <property name="text" translatable="yes">video/x-raw,width=320,height=240,format=(fourcc)YUY2,framerate=15/1</property>
</object>
<packing>
<property name="expand">False</property>