mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
hdv1394src: Make it possible to select a camera by its GUID
The source hdv1394src has the guid property that permits select a camera connected from its GUID number. However when this property is setted the selected camera is not changed. The source continues using the default camera. This problem was solved using the function iec61883_cmp_connect. The reference for the function could be found here: http://www.dennedy.org/libiec61883/API-iec61883-cmp-connect.html The solution came from dvgrab source code. https://bugzilla.gnome.org/show_bug.cgi?id=710415
This commit is contained in:
parent
43602e2d8a
commit
a22d61007a
1 changed files with 16 additions and 0 deletions
|
@ -562,6 +562,22 @@ gst_hdv1394src_start (GstBaseSrc * bsrc)
|
|||
raw1394_set_userdata (src->handle, src);
|
||||
raw1394_set_bus_reset_handler (src->handle, gst_hdv1394src_bus_reset);
|
||||
|
||||
{
|
||||
nodeid_t m_node = (src->avc_node | 0xffc0);
|
||||
int m_channel = -1;
|
||||
int m_bandwidth = 0;
|
||||
int m_outputPort = -1;
|
||||
int m_inputPort = -1;
|
||||
|
||||
m_channel = iec61883_cmp_connect (src->handle, m_node, &m_outputPort,
|
||||
raw1394_get_local_id (src->handle), &m_inputPort, &m_bandwidth);
|
||||
|
||||
if (m_channel >= 0) {
|
||||
src->channel = m_channel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((src->iec61883mpeg2 =
|
||||
iec61883_mpeg2_recv_init (src->handle,
|
||||
gst_hdv1394src_iec61883_receive, src)) == NULL)
|
||||
|
|
Loading…
Reference in a new issue