Commit eede6488 authored by Wim Taymans's avatar Wim Taymans

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.
parent 2d3657a1
2005-07-07 Wim Taymans <wim@fluendo.com>
* 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.
2005-07-07 Wim Taymans <wim@fluendo.com>
* ext/mad/gstid3tag.c: (gst_id3_tag_get_query_types):
......
......@@ -419,6 +419,32 @@ GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
])
AC_SUBST(MAD_LIBS)
dnl *** dv1394 ***
translit(dnm, m, l) AM_CONDITIONAL(USE_DV1394, true)
GST_CHECK_FEATURE(DV1394, [raw1394 and avc1394 library], dv1394src, [
dnl we need to test three headers and three libs
GST_CHECK_LIBHEADER(RAW1394,
raw1394, raw1394_new_handle,,
libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
GST_CHECK_LIBHEADER(AVC1394,
avc1394, avc1394_send_command, $RAW1394_LIBS,
libavc1394/avc1394.h, AVC1394_LIBS="-lavc1394")
GST_CHECK_LIBHEADER(ROM1394,
rom1394, rom1394_free_directory, $RAW1394_LIBS,
libavc1394/rom1394.h, ROM1394_LIBS="-lrom1394")
dnl now see how far we got
if test x$HAVE_RAW1394 = xyes && \
test x$HAVE_AVC1394 = xyes && \
test x$HAVE_ROM1394 = xyes; then
HAVE_DV1394=yes
DV1394_LIBS="$RAW1394_LIBS $AVC1394_LIBS $ROM1394_LIBS"
AC_SUBST(DV1394_LIBS)
else
HAVE_DV1394=no
fi
])
dnl **** ESound ****
translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [
......@@ -507,6 +533,7 @@ ext/Makefile
ext/aalib/Makefile
ext/libcaca/Makefile
ext/mad/Makefile
ext/raw1394/Makefile
ext/shout2/Makefile
ext/sidplay/Makefile
ext/esd/Makefile
......
......@@ -4,6 +4,6 @@ plugin_LTLIBRARIES = libgst1394.la
libgst1394_la_SOURCES = gst1394.c gstdv1394src.c
libgst1394_la_CFLAGS = $(GST_CFLAGS)
libgst1394_la_LIBADD = $(DV1394_LIBS)
libgst1394_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgst1394_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS)
noinst_HEADERS = gstdv1394src.h
This diff is collapsed.
......@@ -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__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment