summaryrefslogtreecommitdiffstats
path: root/sys/dvb
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-11-14 12:33:33 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-11-14 12:33:33 +0000
commit5cbfd21fe5c984eec2b9e1e49179afb5931fb61b (patch)
treecd88bfbddbcc550e3804f1fa85d669a8576519c1 /sys/dvb
parente9d741454d467a44cc04de99c33f5a101baa2a96 (diff)
downloadgst-plugins-bad-5cbfd21fe5c984eec2b9e1e49179afb5931fb61b.tar.gz
gst-plugins-bad-5cbfd21fe5c984eec2b9e1e49179afb5931fb61b.tar.bz2
gst-plugins-bad-5cbfd21fe5c984eec2b9e1e49179afb5931fb61b.zip
sys/dvb/gstdvbsrc.*: Fix minor printf format issue; remove overly paranoid checks in create function; fix GObject boi...
Original commit message from CVS: * sys/dvb/gstdvbsrc.c: (gst_dvbsrc_create): * sys/dvb/gstdvbsrc.h: Fix minor printf format issue; remove overly paranoid checks in create function; fix GObject boilerplate macros.
Diffstat (limited to 'sys/dvb')
-rw-r--r--sys/dvb/gstdvbsrc.c9
-rw-r--r--sys/dvb/gstdvbsrc.h14
2 files changed, 7 insertions, 16 deletions
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index 8eedb9dc..6012d823 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -837,17 +837,14 @@ read_device (int fd, const char *fd_name, int size)
static GstFlowReturn
gst_dvbsrc_create (GstPushSrc * element, GstBuffer ** buf)
{
- static int quality_signal_rate = 0;
+ static int quality_signal_rate = 0; /* FIXME: move into object struct? */
gint buffer_size;
GstFlowReturn retval = GST_FLOW_ERROR;
+ GstDvbSrc *object;
- GstDvbSrc *object = NULL;
-
- g_return_val_if_fail (GST_IS_DVBSRC (element), GST_FLOW_ERROR);
object = GST_DVBSRC (element);
- GST_LOG ("buf: 0x%x fd_dvr: %d", buf, object->fd_dvr);
+ GST_LOG ("fd_dvr: %d", object->fd_dvr);
- g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
//g_object_get(G_OBJECT(object), "blocksize", &buffer_size, NULL);
buffer_size = DEFAULT_BUFFER_SIZE;
diff --git a/sys/dvb/gstdvbsrc.h b/sys/dvb/gstdvbsrc.h
index 4c1ecccd..e9756a67 100644
--- a/sys/dvb/gstdvbsrc.h
+++ b/sys/dvb/gstdvbsrc.h
@@ -5,11 +5,7 @@
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
+G_BEGIN_DECLS
typedef enum
{
@@ -36,10 +32,10 @@ extern "C"
#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,GstDvbSrc))
+ (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(obj) \
+#define GST_IS_DVBSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVBSRC))
typedef struct _GstDvbSrc GstDvbSrc;
@@ -95,8 +91,6 @@ extern "C"
GType gst_dvbsrc_get_type (void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
#endif /* __GST_DVBSRC_H__ */