mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
c205b740d4
Original commit message from CVS: patch by: Alessandro Decina * sys/dvb/Makefile.am: * sys/dvb/cam.c: * sys/dvb/cam.h: * sys/dvb/camapplication.c: * sys/dvb/camapplication.h: * sys/dvb/camapplicationinfo.c: * sys/dvb/camapplicationinfo.h: * sys/dvb/camconditionalaccess.c: * sys/dvb/camconditionalaccess.h: * sys/dvb/camdevice.c: * sys/dvb/camdevice.h: * sys/dvb/camresourcemanager.c: * sys/dvb/camresourcemanager.h: * sys/dvb/camsession.c: * sys/dvb/camsession.h: * sys/dvb/camswclient.c: * sys/dvb/camswclient.h: * sys/dvb/camtransport.c: * sys/dvb/camtransport.h: * sys/dvb/camutils.c: * sys/dvb/camutils.h: * sys/dvb/dvbbasebin.c: * sys/dvb/dvbbasebin.h: * sys/dvb/gstdvb.c: * sys/dvb/gstdvbsrc.c: * sys/dvb/gstdvbsrc.h: Integrate SoC work done by Alessandro for the Freevo project. Adds cam support to the dvb stack in GStreamer and a new element (actually a bin) called dvbbasebin that integrates dvbsrc and mpegtsparse to a) handle decryption and b) allow acquiring multiple channels on same transponder without knowing pid numbers.
97 lines
2.1 KiB
C
97 lines
2.1 KiB
C
|
|
#ifndef __GST_DVBSRC_H__
|
|
#define __GST_DVBSRC_H__
|
|
|
|
#include <gst/gst.h>
|
|
#include <gst/base/gstpushsrc.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef enum
|
|
{
|
|
DVB_POL_H,
|
|
DVB_POL_V,
|
|
DVB_POL_ZERO
|
|
} GstDvbSrcPol;
|
|
|
|
|
|
#define IPACKS 2048
|
|
#define TS_SIZE 188
|
|
#define IN_SIZE TS_SIZE*10
|
|
|
|
#define DEFAULT_DEVICE "/dev/dvb/adapter0"
|
|
#define DEFAULT_SYMBOL_RATE 0
|
|
#define DEFAULT_BUFFER_SIZE 8192
|
|
#define DEFAULT_DISEQC_SRC -1 /* disabled */
|
|
|
|
#define MAX_FILTERS 32
|
|
|
|
/* #define's don't like whitespacey bits */
|
|
#define GST_TYPE_DVBSRC \
|
|
(gst_dvbsrc_get_type())
|
|
#define GST_DVBSRC(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVBSRC,GstDvbSrc))
|
|
#define GST_DVBSRC_CLASS(klass) \
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVBSRC,GstDvbSrcClass))
|
|
#define GST_IS_DVBSRC(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVBSRC))
|
|
#define GST_IS_DVBSRC_CLASS(klass) \
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVBSRC))
|
|
|
|
typedef struct _GstDvbSrc GstDvbSrc;
|
|
typedef struct _GstDvbSrcClass GstDvbSrcClass;
|
|
typedef struct _GstDvbSrcParam GstDvbSrcParam;
|
|
|
|
struct _GstDvbSrc
|
|
{
|
|
GstPushSrc element;
|
|
GstPad *srcpad;
|
|
|
|
GMutex *tune_mutex;
|
|
gboolean need_tune;
|
|
|
|
int adapter_type;
|
|
|
|
int adapter_number; /* the device directory with the sub-devices */
|
|
int frontend_number;
|
|
|
|
int fd_frontend;
|
|
int fd_dvr;
|
|
int fd_filters[MAX_FILTERS];
|
|
|
|
guint16 pids[MAX_FILTERS];
|
|
unsigned int freq;
|
|
unsigned int sym_rate;
|
|
int tone;
|
|
int diseqc_src;
|
|
gboolean send_diseqc;
|
|
|
|
int bandwidth;
|
|
int code_rate_hp;
|
|
int code_rate_lp;
|
|
int modulation;
|
|
int guard_interval;
|
|
int transmission_mode;
|
|
int hierarchy_information;
|
|
int inversion;
|
|
|
|
GstDvbSrcPol pol;
|
|
guint stats_interval;
|
|
guint stats_counter;
|
|
};
|
|
|
|
struct _GstDvbSrcClass
|
|
{
|
|
GstPushSrcClass parent_class;
|
|
|
|
void (*adapter_type) (GstElement * element, gint type);
|
|
void (*signal_quality) (GstElement * element, gint strength, gint snr);
|
|
};
|
|
|
|
|
|
GType gst_dvbsrc_get_type (void);
|
|
gboolean gst_dvbsrc_plugin_init (GstPlugin *plugin);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_DVBSRC_H__ */
|