diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2005-07-07 08:34:11 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2005-07-07 08:34:11 +0000 |
commit | eede6488fbbfb681d8b450511c3227e3d70bf9f6 (patch) | |
tree | 38b93f89410ebd6b583928c39f06ef56ff45fcd3 /ext/raw1394/gstdv1394src.h | |
parent | 2d3657a1baeac7e75a3e27cde7eadf3e727fe3e0 (diff) |
Ported the 1394 source to 0.9.
Original commit message from CVS:
* configure.ac:
* ext/raw1394/Makefile.am:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_get_type),
(gst_dv1394src_class_init), (gst_dv1394src_init),
(gst_dv1394src_iso_receive), (gst_dv1394src_create),
(gst_dv1394src_change_state), (gst_dv1394src_convert),
(gst_dv1394src_get_query_types), (gst_dv1394src_query):
* ext/raw1394/gstdv1394src.h:
Ported the 1394 source to 0.9.
Diffstat (limited to 'ext/raw1394/gstdv1394src.h')
-rw-r--r-- | ext/raw1394/gstdv1394src.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/ext/raw1394/gstdv1394src.h b/ext/raw1394/gstdv1394src.h index 425628da..23fc65bb 100644 --- a/ext/raw1394/gstdv1394src.h +++ b/ext/raw1394/gstdv1394src.h @@ -23,13 +23,11 @@ #include <gst/gst.h> -#include <libraw1394/raw1394.h> - +#include <gst/base/gstpushsrc.h> -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +#include <libraw1394/raw1394.h> +G_BEGIN_DECLS #define GST_TYPE_DV1394SRC \ (gst_dv1394src_get_type()) @@ -45,16 +43,20 @@ extern "C" { typedef struct _GstDV1394Src GstDV1394Src; typedef struct _GstDV1394SrcClass GstDV1394SrcClass; -struct _GstDV1394Src { - GstElement element; +#define GST_DV_GET_LOCK(dv) (GST_DV1394SRC (dv)->dv_lock) +#define GST_DV_LOCK(dv) g_mutex_lock(GST_DV_GET_LOCK (dv)) +#define GST_DV_UNLOCK(dv) g_mutex_unlock(GST_DV_GET_LOCK (dv)) - GstPad *srcpad; +struct _GstDV1394Src { + GstPushSrc element; // consecutive=2, skip=4 will skip 4 frames, then let 2 consecutive ones thru gint consecutive; gint skip; gboolean drop_incomplete; + GMutex *dv_lock; + gint num_ports; gint port; gint channel; @@ -65,7 +67,6 @@ struct _GstDV1394Src { struct raw1394_portinfo pinfo[16]; raw1394handle_t handle; - gboolean started; GstBuffer *buf; GstBuffer *frame; @@ -80,7 +81,7 @@ struct _GstDV1394Src { }; struct _GstDV1394SrcClass { - GstElementClass parent_class; + GstPushSrcClass parent_class; /* signal */ void (*frame_dropped) (GstElement *elem); @@ -88,9 +89,6 @@ struct _GstDV1394SrcClass { GType gst_dv1394src_get_type(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif /* __GST_GST1394_H__ */ |