• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * dvbbasebin.h -
3  * Copyright (C) 2007 Alessandro Decina
4  *
5  * Authors:
6  *   Alessandro Decina <alessandro.d@gmail.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef GST_DVB_BASE_BIN_H
25 #define GST_DVB_BASE_BIN_H
26 
27 #include <gst/gst.h>
28 #include <glib.h>
29 #include "camdevice.h"
30 
31 G_BEGIN_DECLS
32 
33 #define GST_TYPE_DVB_BASE_BIN \
34   (dvb_base_bin_get_type())
35 #define GST_DVB_BASE_BIN(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVB_BASE_BIN,DvbBaseBin))
37 #define GST_DVB_BASE_BIN_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVB_BASE_BIN,DvbBaseBinClass))
39 #define GST_IS_DVB_BASE_BIN(obj) \
40   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVB_BASE_BIN))
41 #define GST_IS_DVB_BASE_BIN_CLASS(klass) \
42   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVB_BASE_BIN))
43 
44 typedef struct _DvbBaseBin DvbBaseBin;
45 typedef struct _DvbBaseBinClass DvbBaseBinClass;
46 
47 struct _DvbBaseBin {
48   GstBin bin;
49 
50   GstElement *dvbsrc;
51   GstElement *buffer_queue;
52   GstElement *tsparse;
53   CamDevice *hwcam;
54   gboolean trycam;
55   GList *pmtlist;
56   gboolean pmtlist_changed;
57   gchar *filter;
58   GHashTable *streams;
59   GHashTable *programs;
60   gboolean disposed;
61 
62   GstTask *task;
63   GstPoll *poll;
64   GRecMutex lock;
65 
66   /* Cached value */
67   gchar *program_numbers;
68 };
69 
70 struct _DvbBaseBinClass {
71   GstBinClass parent_class;
72 
73   /* signals */
74   void (*do_tune) (DvbBaseBin * dvbbasebin);
75 };
76 
77 GType dvb_base_bin_get_type(void);
78 
79 G_END_DECLS
80 
81 #endif /* GST_DVB_BASE_BIN_H */
82