2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
#ifndef __GST_DVBSRC_H__
|
|
|
|
#define __GST_DVBSRC_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/base/gstpushsrc.h>
|
|
|
|
|
2006-11-14 12:33:33 +00:00
|
|
|
G_BEGIN_DECLS
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
po/POTFILES.in: add dvbsrc
Original commit message from CVS:
* po/POTFILES.in:
add dvbsrc
* sys/dvb/gstdvbsrc.c: (gst_dvbsrc_class_init), (gst_dvbsrc_init),
(gst_dvbsrc_set_property), (gst_dvbsrc_get_property),
(gst_dvbsrc_open_frontend), (gst_dvbsrc_open_dvr),
(gst_dvbsrc_finalize), (read_device), (gst_dvbsrc_create),
(gst_dvbsrc_start), (gst_dvbsrc_frontend_status),
(gst_dvbsrc_tune), (gst_dvbsrc_unset_pes_filters),
(gst_dvbsrc_set_pes_filter):
* sys/dvb/gstdvbsrc.h:
adapter-prefix is a terrible name for a device, so replace it.
strerror should be used immediately after the syscall related to it.
Actually throw a reasonable GST_ELEMENT_ERROR if we fail to open
(pretty easy to trigger by opening the same device twice).
Use _OBJECT macros where it makes sense.
This element is going to need some work before it moves.
2006-11-04 13:26:41 +00:00
|
|
|
#define DEFAULT_DEVICE "/dev/dvb/adapter0"
|
2006-10-10 15:05:32 +00:00
|
|
|
#define DEFAULT_SYMBOL_RATE 0
|
|
|
|
#define DEFAULT_BUFFER_SIZE 8192
|
|
|
|
#define DEFAULT_DISEQC_SRC -1 /* disabled */
|
|
|
|
|
2007-10-16 17:38:05 +00:00
|
|
|
#define MAX_FILTERS 32
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
/* #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) \
|
2006-11-14 12:33:33 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVBSRC,GstDvbSrcClass))
|
2006-10-10 15:05:32 +00:00
|
|
|
#define GST_IS_DVBSRC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVBSRC))
|
2006-11-14 12:33:33 +00:00
|
|
|
#define GST_IS_DVBSRC_CLASS(klass) \
|
2006-10-10 15:05:32 +00:00
|
|
|
(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;
|
|
|
|
|
sys/dvb/gstdvbsrc.c (dvbsrc_details, ARG_DVBSRC_ADAPTER,
Original commit message from CVS:
* sys/dvb/gstdvbsrc.c (dvbsrc_details, ARG_DVBSRC_ADAPTER,
ARG_DVBSRC_FRONTEND, ARG_DVBSRC_DISEQC_SRC, ARG_DVBSRC_FREQUENCY,
ARG_DVBSRC_POLARITY, gst_dvbsrc_class_init, gst_dvbsrc_init,
gst_dvbsrc_set_property, gst_dvbsrc_get_property,
gst_dvbsrc_open_frontend, gst_dvbsrc_open_dvr, read_device,
gst_dvbsrc_create, gst_dvbsrc_set_pes_filters):
* sys/dvb/gstdvbsrc.h (adapter_number, frontend_number):
Removed property "device". Added properties "adapter" and "frontend".
Fixes #453636.
Rename freq property to frequency.
2007-07-04 11:56:55 +00:00
|
|
|
int adapter_number; /* the device directory with the sub-devices */
|
|
|
|
int frontend_number;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
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;
|
2007-10-16 17:38:05 +00:00
|
|
|
guint stats_interval;
|
|
|
|
guint stats_counter;
|
2010-01-27 11:08:48 +00:00
|
|
|
gboolean need_unlock;
|
2006-10-10 15:05:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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);
|
2007-10-16 17:38:05 +00:00
|
|
|
gboolean gst_dvbsrc_plugin_init (GstPlugin *plugin);
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2006-11-14 12:33:33 +00:00
|
|
|
G_END_DECLS
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
#endif /* __GST_DVBSRC_H__ */
|