2014-06-25 02:15:53 +00:00
|
|
|
/* GStreamer DVB source
|
|
|
|
* Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali
|
|
|
|
* dot org>
|
|
|
|
* Copyright (C) 2014 Samsung Electronics. All rights reserved.
|
|
|
|
* @Author: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
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
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
DVB_POL_H,
|
|
|
|
DVB_POL_V,
|
|
|
|
DVB_POL_ZERO
|
|
|
|
} GstDvbSrcPol;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define IPACKS 2048
|
|
|
|
#define TS_SIZE 188
|
|
|
|
#define IN_SIZE TS_SIZE*10
|
|
|
|
|
2007-10-16 17:38:05 +00:00
|
|
|
#define MAX_FILTERS 32
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
#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))
|
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
typedef struct _GstDvbSrc GstDvbSrc;
|
|
|
|
typedef struct _GstDvbSrcClass GstDvbSrcClass;
|
|
|
|
typedef struct _GstDvbSrcParam GstDvbSrcParam;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
struct _GstDvbSrc
|
|
|
|
{
|
|
|
|
GstPushSrc element;
|
|
|
|
GstPad *srcpad;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
GMutex tune_mutex;
|
|
|
|
gboolean need_tune;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2013-10-10 16:23:20 +00:00
|
|
|
guchar delsys;
|
2014-05-01 22:25:05 +00:00
|
|
|
guchar best_guess_delsys;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2014-06-25 00:52:54 +00:00
|
|
|
int adapter_number;
|
2011-02-01 19:39:16 +00:00
|
|
|
int frontend_number;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
int fd_frontend;
|
|
|
|
int fd_dvr;
|
|
|
|
int fd_filters[MAX_FILTERS];
|
|
|
|
GstPoll *poll;
|
|
|
|
GstPollFD poll_fd_dvr;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
guint16 pids[MAX_FILTERS];
|
|
|
|
unsigned int freq;
|
|
|
|
unsigned int sym_rate;
|
|
|
|
int tone;
|
|
|
|
int diseqc_src;
|
|
|
|
gboolean send_diseqc;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2014-03-04 12:19:55 +00:00
|
|
|
guint bandwidth;
|
2011-02-01 19:39:16 +00:00
|
|
|
int code_rate_hp;
|
|
|
|
int code_rate_lp;
|
|
|
|
int modulation;
|
|
|
|
int guard_interval;
|
|
|
|
int transmission_mode;
|
|
|
|
int hierarchy_information;
|
|
|
|
int inversion;
|
2013-10-10 16:25:46 +00:00
|
|
|
int pilot;
|
|
|
|
int rolloff;
|
|
|
|
int stream_id;
|
2011-02-01 19:39:16 +00:00
|
|
|
guint64 timeout;
|
2014-05-01 22:25:05 +00:00
|
|
|
guint64 tuning_timeout;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
GstDvbSrcPol pol;
|
|
|
|
guint stats_interval;
|
|
|
|
guint stats_counter;
|
|
|
|
gboolean need_unlock;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
guint dvb_buffer_size;
|
|
|
|
};
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
struct _GstDvbSrcClass
|
|
|
|
{
|
|
|
|
GstPushSrcClass parent_class;
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
void (*adapter_type) (GstElement * element, gint type);
|
|
|
|
void (*signal_quality) (GstElement * element, gint strength, gint snr);
|
|
|
|
};
|
2006-10-10 15:05:32 +00:00
|
|
|
|
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
GType gst_dvbsrc_get_type (void);
|
|
|
|
gboolean gst_dvbsrc_plugin_init (GstPlugin * plugin);
|
2006-10-10 15:05:32 +00:00
|
|
|
|
2011-02-01 19:39:16 +00:00
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_DVBSRC_H__ */
|