mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
uvch264: Port test to gstreamer 1.0
This commit is contained in:
parent
14637e2a27
commit
040626c473
3 changed files with 8 additions and 9 deletions
|
@ -20,7 +20,6 @@ test_uvch264_LDADD = \
|
|||
$(GST_PLUGINS_BASE_LIBS) \
|
||||
$(GST_VIDEO_LIBS) \
|
||||
$(GST_LIBS) \
|
||||
-lgstinterfaces-@GST_MAJORMINOR@ \
|
||||
$(GTK_LIBS) \
|
||||
$(GMODULE_EXPORT_LIBS)
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue