summaryrefslogtreecommitdiffstats
path: root/ext/raw1394
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-10-07 16:22:59 +0000
committerAndy Wingo <wingo@pobox.com>2005-10-07 16:22:59 +0000
commitcf60bb696eaf67c934af9f2424d95cc7d4d82285 (patch)
treee1983514abd57360dd31a0f0604d46c031a0d50b /ext/raw1394
parentaeb4ab082e7a7e5b28650706424be5e72ec1eb8f (diff)
Post a message when the cable is unplugged.
Original commit message from CVS: (gst_dv1394src_bus_reset): Post a message when the cable is unplugged. (gst_dv1394src_create, gst_dv1394src_unlock): Remove some prints.
Diffstat (limited to 'ext/raw1394')
-rw-r--r--ext/raw1394/gstdv1394src.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
index c408357d..8c1995de 100644
--- a/ext/raw1394/gstdv1394src.c
+++ b/ext/raw1394/gstdv1394src.c
@@ -73,13 +73,13 @@ enum
LAST_SIGNAL
};
-#define DEFAULT_PORT -1
-#define DEFAULT_CHANNEL 63
-#define DEFAULT_CONSECUTIVE 1
-#define DEFAULT_SKIP 0
-#define DEFAULT_DROP_INCOMPLETE TRUE
-#define DEFAULT_USE_AVC TRUE
-#define DEFAULT_GUID 0
+#define DEFAULT_PORT -1
+#define DEFAULT_CHANNEL 63
+#define DEFAULT_CONSECUTIVE 1
+#define DEFAULT_SKIP 0
+#define DEFAULT_DROP_INCOMPLETE TRUE
+#define DEFAULT_USE_AVC TRUE
+#define DEFAULT_GUID 0
enum
{
@@ -437,8 +437,23 @@ gst_dv1394src_iso_receive (raw1394handle_t handle, int channel, size_t len,
static int
gst_dv1394src_bus_reset (raw1394handle_t handle, unsigned int generation)
{
- GST_INFO_OBJECT (GST_DV1394SRC (raw1394_get_userdata (handle)),
- "have bus reset");
+ GstDV1394Src *src;
+ gint nodecount;
+ GstMessage *message;
+ GstStructure *structure;
+
+ src = GST_DV1394SRC (raw1394_get_userdata (handle));
+
+ GST_INFO_OBJECT (src, "have bus reset");
+
+ nodecount = raw1394_get_nodecount (handle);
+
+ structure = gst_structure_new ("ieee1394-bus-reset", "nodecount", G_TYPE_INT,
+ nodecount, NULL);
+ message = gst_message_new_element (GST_OBJECT (src), structure);
+ gst_element_post_message (GST_ELEMENT (src), message);
+ gst_message_unref (message);
+
return 0;
}
@@ -473,8 +488,6 @@ gst_dv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
if (pollfds[1].revents) {
char command;
- g_print ("told to stop!\n");
-
if (pollfds[1].revents & POLLIN)
READ_COMMAND (dv1394src, command, res);
@@ -694,7 +707,6 @@ gst_dv1394src_unlock (GstBaseSrc * bsrc)
{
GstDV1394Src *src = GST_DV1394SRC (bsrc);
- g_print ("sending command!\n");
SEND_COMMAND (src, CONTROL_STOP);
return TRUE;