2 * Copyright (C) <2008> Edward Hervey <bilboed@bilboed.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 * SECTION:element-hdv1394src
22 * Read MPEG-TS data from firewire port.
25 * <title>Example launch line</title>
27 * gst-launch hdv1394src ! queue ! decodebin name=d ! queue ! xvimagesink d. ! queue ! alsasink
28 * ]| captures from the firewire port and plays the streams.
30 * gst-launch hdv1394src ! queue ! filesink location=mydump.ts
31 * ]| capture to a disk file
40 #include <sys/socket.h>
46 #include <libavc1394/avc1394.h>
47 #include <libavc1394/avc1394_vcr.h>
48 #include <libavc1394/rom1394.h>
49 #include <libraw1394/raw1394.h>
50 #include <libiec61883/iec61883.h>
54 #include "gsthdv1394src.h"
55 #include "gst1394probe.h"
58 #define CONTROL_STOP 'S' /* stop the select call */
59 #define CONTROL_SOCKETS(src) src->control_sock
60 #define WRITE_SOCKET(src) src->control_sock[1]
61 #define READ_SOCKET(src) src->control_sock[0]
63 #define SEND_COMMAND(src, command) \
65 int G_GNUC_UNUSED _res; unsigned char c; c = command; \
66 _res = write (WRITE_SOCKET(src), &c, 1); \
69 #define READ_COMMAND(src, command, res) \
71 res = read(READ_SOCKET(src), &command, 1); \
75 GST_DEBUG_CATEGORY_STATIC (hdv1394src_debug);
76 #define GST_CAT_DEFAULT (hdv1394src_debug)
78 #define DEFAULT_PORT -1
79 #define DEFAULT_CHANNEL 63
80 #define DEFAULT_USE_AVC TRUE
81 #define DEFAULT_GUID 0
93 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
97 ("video/mpegts,systemstream=(boolean)true,packetsize=(int)188")
100 static void gst_hdv1394src_uri_handler_init (gpointer g_iface,
101 gpointer iface_data);
103 static void gst_hdv1394src_set_property (GObject * object, guint prop_id,
104 const GValue * value, GParamSpec * pspec);
105 static void gst_hdv1394src_get_property (GObject * object, guint prop_id,
106 GValue * value, GParamSpec * pspec);
107 static void gst_hdv1394src_dispose (GObject * object);
109 static gboolean gst_hdv1394src_start (GstBaseSrc * bsrc);
110 static gboolean gst_hdv1394src_stop (GstBaseSrc * bsrc);
111 static gboolean gst_hdv1394src_unlock (GstBaseSrc * bsrc);
113 static GstFlowReturn gst_hdv1394src_create (GstPushSrc * psrc,
116 static void gst_hdv1394src_update_device_name (GstHDV1394Src * src);
119 _do_init (GType type)
121 static const GInterfaceInfo urihandler_info = {
122 gst_hdv1394src_uri_handler_init,
126 g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info);
128 gst_1394_type_add_property_probe_interface (type);
130 GST_DEBUG_CATEGORY_INIT (hdv1394src_debug, "hdv1394src", 0,
131 "MPEG-TS firewire source");
134 GST_BOILERPLATE_FULL (GstHDV1394Src, gst_hdv1394src, GstPushSrc,
135 GST_TYPE_PUSH_SRC, _do_init);
139 gst_hdv1394src_base_init (gpointer g_class)
141 GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
143 gst_element_class_add_pad_template (element_class,
144 gst_static_pad_template_get (&src_factory));
146 gst_element_class_set_details_simple (element_class,
147 "Firewire (1394) HDV video source", "Source/Video",
148 "Source for MPEG-TS video data from firewire port",
149 "Edward Hervey <bilboed@bilboed.com>");
153 gst_hdv1394src_class_init (GstHDV1394SrcClass * klass)
155 GObjectClass *gobject_class;
156 GstBaseSrcClass *gstbasesrc_class;
157 GstPushSrcClass *gstpushsrc_class;
159 gobject_class = (GObjectClass *) klass;
160 gstbasesrc_class = (GstBaseSrcClass *) klass;
161 gstpushsrc_class = (GstPushSrcClass *) klass;
163 gobject_class->set_property = gst_hdv1394src_set_property;
164 gobject_class->get_property = gst_hdv1394src_get_property;
165 gobject_class->dispose = gst_hdv1394src_dispose;
167 g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT,
168 g_param_spec_int ("port", "Port", "Port number (-1 automatic)",
169 -1, 16, DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
170 g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CHANNEL,
171 g_param_spec_int ("channel", "Channel", "Channel number for listening",
172 0, 64, DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
173 g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_USE_AVC,
174 g_param_spec_boolean ("use-avc", "Use AV/C", "Use AV/C VTR control",
175 DEFAULT_USE_AVC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
176 g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GUID,
177 g_param_spec_uint64 ("guid", "GUID",
178 "select one of multiple DV devices by its GUID. use a hexadecimal "
179 "like 0xhhhhhhhhhhhhhhhh. (0 = no guid)", 0, G_MAXUINT64,
180 DEFAULT_GUID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
182 * GstHDV1394Src:device-name
184 * Descriptive name of the currently opened device
188 g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DEVICE_NAME,
189 g_param_spec_string ("device-name", "device name",
190 "user-friendly name of the device", "Default",
191 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
193 gstbasesrc_class->negotiate = NULL;
194 gstbasesrc_class->start = gst_hdv1394src_start;
195 gstbasesrc_class->stop = gst_hdv1394src_stop;
196 gstbasesrc_class->unlock = gst_hdv1394src_unlock;
198 gstpushsrc_class->create = gst_hdv1394src_create;
202 gst_hdv1394src_init (GstHDV1394Src * dv1394src, GstHDV1394SrcClass * klass)
204 GstPad *srcpad = GST_BASE_SRC_PAD (dv1394src);
206 gst_base_src_set_live (GST_BASE_SRC (dv1394src), TRUE);
207 gst_pad_use_fixed_caps (srcpad);
209 dv1394src->port = DEFAULT_PORT;
210 dv1394src->channel = DEFAULT_CHANNEL;
212 dv1394src->use_avc = DEFAULT_USE_AVC;
213 dv1394src->guid = DEFAULT_GUID;
214 dv1394src->uri = g_strdup_printf ("hdv://%d", dv1394src->port);
215 dv1394src->device_name = g_strdup_printf ("Default");
217 READ_SOCKET (dv1394src) = -1;
218 WRITE_SOCKET (dv1394src) = -1;
220 dv1394src->frame_sequence = 0;
224 gst_hdv1394src_dispose (GObject * object)
226 GstHDV1394Src *src = GST_HDV1394SRC (object);
231 g_free (src->device_name);
232 src->device_name = NULL;
234 G_OBJECT_CLASS (parent_class)->dispose (object);
238 gst_hdv1394src_set_property (GObject * object, guint prop_id,
239 const GValue * value, GParamSpec * pspec)
241 GstHDV1394Src *filter = GST_HDV1394SRC (object);
245 filter->port = g_value_get_int (value);
246 g_free (filter->uri);
247 filter->uri = g_strdup_printf ("hdv://%d", filter->port);
250 filter->channel = g_value_get_int (value);
253 filter->use_avc = g_value_get_boolean (value);
256 filter->guid = g_value_get_uint64 (value);
257 gst_hdv1394src_update_device_name (filter);
265 gst_hdv1394src_get_property (GObject * object, guint prop_id, GValue * value,
268 GstHDV1394Src *filter = GST_HDV1394SRC (object);
272 g_value_set_int (value, filter->port);
275 g_value_set_int (value, filter->channel);
278 g_value_set_boolean (value, filter->use_avc);
281 g_value_set_uint64 (value, filter->guid);
283 case PROP_DEVICE_NAME:
284 g_value_set_string (value, filter->device_name);
287 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
292 static GstHDV1394Src *
293 gst_hdv1394src_from_raw1394handle (raw1394handle_t handle)
295 iec61883_mpeg2_t mpeg2 = (iec61883_mpeg2_t) raw1394_get_userdata (handle);
296 return GST_HDV1394SRC (iec61883_mpeg2_get_callback_data (mpeg2));
299 /* Within one loop iteration (which may call _receive() many times), it seems
300 * as though '*data' will always be different.
302 * We can therefore assume that any '*data' given to us will stay allocated until
303 * the next loop iteration.
307 gst_hdv1394src_iec61883_receive (unsigned char *data, int len,
308 unsigned int dropped, void *cbdata)
310 GstHDV1394Src *dv1394src = GST_HDV1394SRC (cbdata);
312 GST_LOG ("data:%p, len:%d, dropped:%d", data, len, dropped);
314 /* error out if we don't have enough room ! */
315 if (G_UNLIKELY (dv1394src->outoffset > (2048 * 188 - len)))
318 if (G_LIKELY (len == IEC61883_MPEG2_TSP_SIZE)) {
319 memcpy ((guint8 *) dv1394src->outdata + dv1394src->outoffset, data, len);
320 dv1394src->outoffset += len;
322 dv1394src->frame_sequence++;
327 * When an ieee1394 bus reset happens, usually a device has been removed
328 * or added. We send a message on the message bus with the node count
329 * and whether the capture device used in this element connected, disconnected
332 * nodecount - integer with number of nodes on bus
333 * current-device-change - integer (1 if device connected, 0 if no change to
334 * current device status, -1 if device disconnected)
337 gst_hdv1394src_bus_reset (raw1394handle_t handle, unsigned int generation)
342 GstStructure *structure;
343 gint current_device_change;
346 src = gst_hdv1394src_from_raw1394handle (handle);
348 GST_INFO_OBJECT (src, "have bus reset");
350 /* update generation - told to do so by docs */
351 raw1394_update_generation (handle, generation);
352 nodecount = raw1394_get_nodecount (handle);
353 /* allocate memory for portinfo */
355 /* current_device_change is -1 if camera disconnected, 0 if other device
356 * connected or 1 if camera has now connected */
357 current_device_change = -1;
358 for (i = 0; i < nodecount; i++) {
359 if (src->guid == rom1394_get_guid (handle, i)) {
360 /* Camera is with us */
361 GST_DEBUG ("Camera is with us");
362 if (!src->connected) {
363 current_device_change = 1;
364 src->connected = TRUE;
366 current_device_change = 0;
369 if (src->connected && current_device_change == -1) {
370 GST_DEBUG ("Camera has disconnected");
371 src->connected = FALSE;
372 } else if (!src->connected && current_device_change == -1) {
373 GST_DEBUG ("Camera is still not with us");
374 current_device_change = 0;
377 structure = gst_structure_new ("ieee1394-bus-reset", "nodecount", G_TYPE_INT,
378 nodecount, "current-device-change", G_TYPE_INT, current_device_change,
380 message = gst_message_new_element (GST_OBJECT (src), structure);
381 gst_element_post_message (GST_ELEMENT (src), message);
387 gst_hdv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
389 GstHDV1394Src *dv1394src = GST_HDV1394SRC (psrc);
391 struct pollfd pollfds[2];
393 pollfds[0].fd = raw1394_get_fd (dv1394src->handle);
394 pollfds[0].events = POLLIN | POLLERR | POLLHUP | POLLPRI;
395 pollfds[1].fd = READ_SOCKET (dv1394src);
396 pollfds[1].events = POLLIN | POLLERR | POLLHUP | POLLPRI;
398 /* allocate a 2048 samples buffer */
399 dv1394src->outdata = g_malloc (2048 * 188);
400 dv1394src->outoffset = 0;
402 GST_DEBUG ("Create...");
405 int res = poll (pollfds, 2, -1);
407 GST_LOG ("res:%d", res);
409 if (G_UNLIKELY (res < 0)) {
410 if (errno == EAGAIN || errno == EINTR)
413 goto error_while_polling;
416 if (G_UNLIKELY (pollfds[1].revents)) {
419 if (pollfds[1].revents & POLLIN)
420 READ_COMMAND (dv1394src, command, res);
423 } else if (G_LIKELY (pollfds[0].revents & POLLIN)) {
426 pt = dv1394src->frame_sequence;
427 /* shouldn't block in theory */
428 GST_LOG ("Iterating ! (%d)", dv1394src->frame_sequence);
429 raw1394_loop_iterate (dv1394src->handle);
430 GST_LOG ("After iteration : %d (diff:%d)",
431 dv1394src->frame_sequence, dv1394src->frame_sequence - pt);
432 if (dv1394src->outoffset)
437 g_assert (dv1394src->outoffset);
439 GST_LOG ("We have some frames (%u bytes)", (guint) dv1394src->outoffset);
441 /* Create the buffer */
442 *buf = gst_buffer_new ();
443 GST_BUFFER_DATA (*buf) = dv1394src->outdata;
444 GST_BUFFER_MALLOCDATA (*buf) = dv1394src->outdata;
445 GST_BUFFER_SIZE (*buf) = dv1394src->outoffset;
446 dv1394src->outdata = NULL;
447 dv1394src->outoffset = 0;
449 caps = gst_pad_get_caps (GST_BASE_SRC_PAD (psrc));
450 gst_buffer_set_caps (*buf, caps);
451 gst_caps_unref (caps);
457 GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
462 GST_DEBUG_OBJECT (dv1394src, "told to stop, shutting down");
463 return GST_FLOW_FLUSHING;
468 gst_hdv1394src_discover_avc_node (GstHDV1394Src * src)
472 int m = src->num_ports;
474 if (src->port >= 0) {
475 /* search on explicit port */
480 /* loop over all our ports */
481 for (; j < m && node == -1; j++) {
482 raw1394handle_t handle;
483 struct raw1394_portinfo pinf[16];
486 handle = raw1394_new_handle ();
488 GST_WARNING ("raw1394 - failed to get handle: %s.\n", strerror (errno));
491 if (raw1394_get_port_info (handle, pinf, 16) < 0) {
492 GST_WARNING ("raw1394 - failed to get port info: %s.\n",
497 /* tell raw1394 which host adapter to use */
498 if (raw1394_set_port (handle, j) < 0) {
499 GST_WARNING ("raw1394 - failed to set set port: %s.\n", strerror (errno));
503 /* now loop over all the nodes */
504 for (i = 0; i < raw1394_get_nodecount (handle); i++) {
505 /* are we looking for an explicit GUID ? */
506 if (src->guid != 0) {
507 if (src->guid == rom1394_get_guid (handle, i)) {
511 src->uri = g_strdup_printf ("dv://%d", src->port);
515 rom1394_directory rom_dir;
517 /* select first AV/C Tape Recorder Player node */
518 if (rom1394_get_directory (handle, i, &rom_dir) < 0) {
519 GST_WARNING ("error reading config rom directory for node %d\n", i);
522 if ((rom1394_get_node_type (&rom_dir) == ROM1394_NODE_TYPE_AVC) &&
523 avc1394_check_subunit_type (handle, i, AVC1394_SUBUNIT_TYPE_VCR)) {
526 src->guid = rom1394_get_guid (handle, i);
528 src->uri = g_strdup_printf ("dv://%d", src->port);
529 g_free (src->device_name);
530 src->device_name = g_strdup (rom_dir.label);
533 rom1394_free_directory (&rom_dir);
537 raw1394_destroy_handle (handle);
543 gst_hdv1394src_start (GstBaseSrc * bsrc)
545 GstHDV1394Src *src = GST_HDV1394SRC (bsrc);
548 src->connected = FALSE;
550 if (socketpair (PF_UNIX, SOCK_STREAM, 0, control_sock) < 0)
553 READ_SOCKET (src) = control_sock[0];
554 WRITE_SOCKET (src) = control_sock[1];
556 fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK);
557 fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK);
559 src->handle = raw1394_new_handle ();
563 goto permission_denied;
564 else if (errno == ENOENT)
570 src->num_ports = raw1394_get_port_info (src->handle, src->pinfo, 16);
572 if (src->num_ports == 0)
575 if (src->use_avc || src->port == -1)
576 src->avc_node = gst_hdv1394src_discover_avc_node (src);
578 /* lets destroy handle and create one on port
579 this is more reliable than setting port on
580 the existing handle */
581 raw1394_destroy_handle (src->handle);
582 src->handle = raw1394_new_handle_on_port (src->port);
584 goto cannot_set_port;
586 raw1394_set_userdata (src->handle, src);
587 raw1394_set_bus_reset_handler (src->handle, gst_hdv1394src_bus_reset);
589 if ((src->iec61883mpeg2 =
590 iec61883_mpeg2_recv_init (src->handle,
591 gst_hdv1394src_iec61883_receive, src)) == NULL)
592 goto cannot_initialise_dv;
595 raw1394_set_iso_handler (src->handle, src->channel,
596 gst_hdv1394src_iso_receive);
599 GST_DEBUG_OBJECT (src, "successfully opened up 1394 connection");
600 src->connected = TRUE;
602 if (iec61883_mpeg2_recv_start (src->iec61883mpeg2, src->channel) != 0)
605 if (raw1394_start_iso_rcv (src->handle, src->channel) < 0)
610 raw1394handle_t avc_handle = raw1394_new_handle_on_port (src->port);
612 GST_LOG ("We have an avc_handle");
616 if (!avc1394_vcr_is_recording (avc_handle, src->avc_node)
617 && avc1394_vcr_is_playing (avc_handle, src->avc_node)
618 != AVC1394_VCR_OPERAND_PLAY_FORWARD) {
619 GST_LOG ("Calling avc1394_vcr_play()");
620 avc1394_vcr_play (avc_handle, src->avc_node);
622 raw1394_destroy_handle (avc_handle);
624 GST_WARNING_OBJECT (src, "Starting VCR via avc1394 failed: %s",
633 GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
639 GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL), GST_ERROR_SYSTEM);
644 GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), GST_ERROR_SYSTEM);
649 GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
650 ("can't get raw1394 handle (%s)", g_strerror (errno)));
655 raw1394_destroy_handle (src->handle);
657 GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL),
658 ("no ports available for raw1394"));
663 GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL),
664 ("can't set 1394 port %d", src->port));
669 raw1394_destroy_handle (src->handle);
671 iec61883_mpeg2_close (src->iec61883mpeg2);
672 src->iec61883mpeg2 = NULL;
673 GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
674 ("can't start 1394 iso receive"));
677 cannot_initialise_dv:
679 raw1394_destroy_handle (src->handle);
681 GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
682 ("can't initialise iec61883 hdv"));
688 gst_hdv1394src_stop (GstBaseSrc * bsrc)
690 GstHDV1394Src *src = GST_HDV1394SRC (bsrc);
692 close (READ_SOCKET (src));
693 close (WRITE_SOCKET (src));
694 READ_SOCKET (src) = -1;
695 WRITE_SOCKET (src) = -1;
697 iec61883_mpeg2_close (src->iec61883mpeg2);
699 raw1394_stop_iso_rcv (src->handle, src->channel);
703 raw1394handle_t avc_handle = raw1394_new_handle_on_port (src->port);
705 /* pause and stop the VCR */
707 if (!avc1394_vcr_is_recording (avc_handle, src->avc_node)
708 && (avc1394_vcr_is_playing (avc_handle, src->avc_node)
709 != AVC1394_VCR_OPERAND_PLAY_FORWARD_PAUSE))
710 avc1394_vcr_pause (avc_handle, src->avc_node);
711 avc1394_vcr_stop (avc_handle, src->avc_node);
712 raw1394_destroy_handle (avc_handle);
714 GST_WARNING_OBJECT (src, "Starting VCR via avc1394 failed: %s",
719 raw1394_destroy_handle (src->handle);
725 gst_hdv1394src_unlock (GstBaseSrc * bsrc)
727 GstHDV1394Src *src = GST_HDV1394SRC (bsrc);
729 SEND_COMMAND (src, CONTROL_STOP);
735 gst_hdv1394src_update_device_name (GstHDV1394Src * src)
737 raw1394handle_t handle;
738 gint portcount, port, nodecount, node;
739 rom1394_directory directory;
741 g_free (src->device_name);
742 src->device_name = NULL;
744 GST_LOG_OBJECT (src, "updating device name for current GUID");
746 handle = raw1394_new_handle ();
749 goto gethandle_failed;
751 portcount = raw1394_get_port_info (handle, NULL, 0);
752 for (port = 0; port < portcount; port++) {
753 if (raw1394_set_port (handle, port) >= 0) {
754 nodecount = raw1394_get_nodecount (handle);
755 for (node = 0; node < nodecount; node++) {
756 if (src->guid == rom1394_get_guid (handle, node)) {
757 if (rom1394_get_directory (handle, node, &directory) >= 0) {
758 g_free (src->device_name);
759 src->device_name = g_strdup (directory.label);
760 rom1394_free_directory (&directory);
763 GST_WARNING ("error reading rom directory for node %d", node);
770 src->device_name = g_strdup ("Unknown"); /* FIXME: translate? */
774 raw1394_destroy_handle (handle);
780 GST_WARNING ("failed to get raw1394 handle: %s", g_strerror (errno));
781 src->device_name = g_strdup ("Unknown"); /* FIXME: translate? */
786 /*** GSTURIHANDLER INTERFACE *************************************************/
789 gst_hdv1394src_uri_get_type (void)
795 gst_hdv1394src_uri_get_protocols (void)
797 static gchar *protocols[] = { (char *) "hdv", NULL };
803 gst_hdv1394src_uri_get_uri (GstURIHandler * handler)
805 GstHDV1394Src *gst_hdv1394src = GST_HDV1394SRC (handler);
807 return gst_hdv1394src->uri;
811 gst_hdv1394src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
813 gchar *protocol, *location;
815 GstHDV1394Src *gst_hdv1394src = GST_HDV1394SRC (handler);
817 protocol = gst_uri_get_protocol (uri);
818 if (strcmp (protocol, "hdv") != 0) {
824 location = gst_uri_get_location (uri);
825 if (location && *location != '\0')
826 gst_hdv1394src->port = strtol (location, NULL, 10);
828 gst_hdv1394src->port = DEFAULT_PORT;
830 g_free (gst_hdv1394src->uri);
831 gst_hdv1394src->uri = g_strdup_printf ("hdv://%d", gst_hdv1394src->port);
837 gst_hdv1394src_uri_handler_init (gpointer g_iface, gpointer iface_data)
839 GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
841 iface->get_type = gst_hdv1394src_uri_get_type;
842 iface->get_protocols = gst_hdv1394src_uri_get_protocols;
843 iface->get_uri = gst_hdv1394src_uri_get_uri;
844 iface->set_uri = gst_hdv1394src_uri_set_uri;