void
gst_v4l2_buffer_pool_enable_resolution_change (GstV4l2BufferPool * pool)
{
+ guint32 input_id = 0;
+
g_return_if_fail (!gst_buffer_pool_is_active (GST_BUFFER_POOL (pool)));
- if (gst_v4l2_subscribe_event (pool->obj, V4L2_EVENT_SOURCE_CHANGE))
+ /* Make sure we subscribe for the current input */
+ gst_v4l2_get_input (pool->obj, &input_id);
+
+ if (gst_v4l2_subscribe_event (pool->obj, V4L2_EVENT_SOURCE_CHANGE, input_id))
gst_poll_fd_ctl_pri (pool->poll, &pool->pollfd, TRUE);
}
gboolean gst_v4l2_set_controls (GstV4l2Object * v4l2object, GstStructure * controls);
/* events */
-gboolean gst_v4l2_subscribe_event (GstV4l2Object * v4l2object, guint32 event);
+gboolean gst_v4l2_subscribe_event (GstV4l2Object * v4l2object, guint32 event, guint32 id);
gboolean gst_v4l2_dequeue_event (GstV4l2Object * v4l2object, struct v4l2_event *event);
G_END_DECLS
}
gboolean
-gst_v4l2_subscribe_event (GstV4l2Object * v4l2object, guint32 event)
+gst_v4l2_subscribe_event (GstV4l2Object * v4l2object, guint32 event, guint32 id)
{
- struct v4l2_event_subscription sub = {.type = event, };
+ struct v4l2_event_subscription sub = {.type = event,.id = id, };
gint ret;
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "Subscribing to '%s' event",