diff options
author | Sjoerd Simons <sjoerd@luon.net> | 2013-01-08 08:56:45 +0100 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-01-23 21:06:16 -0500 |
commit | 00eed11d6ab1283817856901cc82b241814e84f6 (patch) | |
tree | 25198bc03c0403b38bd35db7676bd985159083c2 /sys | |
parent | 3d1496285c576741336d7fb8f33b9a1869b3624e (diff) |
v4l2: Re-enable prepare-format emission
With the port to gstreamer 1.0 the prepare-format signal stopped being
emitted. Start emitting this again for use in uvch264src. While there
change the emission to include the caps for extra flexibility instead of
fource, width, height.
https://bugzilla.gnome.org/show_bug.cgi?id=692042
Diffstat (limited to 'sys')
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 6197f7836..807ffea84 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -163,9 +163,7 @@ gst_v4l2src_class_init (GstV4l2SrcClass * klass) * GstV4l2Src::prepare-format: * @v4l2src: the v4l2src instance * @fd: the file descriptor of the current device - * @fourcc: the fourcc of the format being set - * @width: The width of the video - * @height: The height of the video + * @caps: the caps of the format being set * * This signal gets emitted before calling the v4l2 VIDIOC_S_FMT ioctl * (set format). This allows for any custom configuration of the device to @@ -178,9 +176,7 @@ gst_v4l2src_class_init (GstV4l2SrcClass * klass) gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT] = g_signal_new ("prepare-format", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - NULL, G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); + 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, GST_TYPE_CAPS); gst_element_class_set_static_metadata (element_class, "Video (video4linux2) Source", "Source/Video", @@ -511,6 +507,9 @@ gst_v4l2src_set_caps (GstBaseSrc * src, GstCaps * caps) if (!gst_v4l2_object_stop (obj)) return FALSE; + g_signal_emit (v4l2src, gst_v4l2_signals[SIGNAL_PRE_SET_FORMAT], 0, + v4l2src->v4l2object->video_fd, caps); + if (!gst_v4l2_object_set_format (obj, caps)) /* error already posted */ return FALSE; |