dvbbasebin: proxy new props/signals from dvbsrc

Proxy tuning start/done/fail signals and tuning-timeout
property.

https://bugzilla.gnome.org/show_bug.cgi?id=641204
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2014-05-30 00:49:49 -04:00 committed by Edward Hervey
parent e68a6d48cb
commit 4880a8ad14

View file

@ -71,6 +71,7 @@ enum
PROP_INVERSION, PROP_INVERSION,
PROP_PROGRAM_NUMBERS, PROP_PROGRAM_NUMBERS,
PROP_STATS_REPORTING_INTERVAL, PROP_STATS_REPORTING_INTERVAL,
PROP_TUNING_TIMEOUT,
PROP_DELSYS, PROP_DELSYS,
PROP_PILOT, PROP_PILOT,
PROP_ROLLOFF, PROP_ROLLOFF,
@ -129,6 +130,14 @@ static void dvb_base_bin_uri_handler_init (gpointer g_iface,
static void dvb_base_bin_program_destroy (gpointer data); static void dvb_base_bin_program_destroy (gpointer data);
/* Proxy callbacks for dvbsrc signals */
static void tuning_start_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin);
static void tuning_done_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin);
static void tuning_fail_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin);
#define dvb_base_bin_parent_class parent_class #define dvb_base_bin_parent_class parent_class
G_DEFINE_TYPE_EXTENDED (DvbBaseBin, dvb_base_bin, GST_TYPE_BIN, G_DEFINE_TYPE_EXTENDED (DvbBaseBin, dvb_base_bin, GST_TYPE_BIN,
0, 0,
@ -204,6 +213,28 @@ dvb_base_bin_get_program (DvbBaseBin * dvbbasebin, gint program_number)
static guint signals [LAST_SIGNAL] = { 0 }; static guint signals [LAST_SIGNAL] = { 0 };
*/ */
static void
tuning_start_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin)
{
g_object_notify (G_OBJECT (dvbbasebin), "tuning-start");
}
static void
tuning_done_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin)
{
g_object_notify (G_OBJECT (dvbbasebin), "tuning-done");
}
static void
tuning_fail_signal_cb (GObject * object, GParamSpec * pspec,
DvbBaseBin * dvbbasebin)
{
g_object_notify (G_OBJECT (dvbbasebin), "tuning-fail");
}
static void static void
dvb_base_bin_class_init (DvbBaseBinClass * klass) dvb_base_bin_class_init (DvbBaseBinClass * klass)
{ {
@ -234,6 +265,7 @@ dvb_base_bin_class_init (DvbBaseBinClass * klass)
{PROP_HIERARCHY, "hierarchy"}, {PROP_HIERARCHY, "hierarchy"},
{PROP_INVERSION, "inversion"}, {PROP_INVERSION, "inversion"},
{PROP_STATS_REPORTING_INTERVAL, "stats-reporting-interval"}, {PROP_STATS_REPORTING_INTERVAL, "stats-reporting-interval"},
{PROP_TUNING_TIMEOUT, "tuning-timeout"},
{PROP_DELSYS, "delsys"}, {PROP_DELSYS, "delsys"},
{PROP_PILOT, "pilot"}, {PROP_PILOT, "pilot"},
{PROP_ROLLOFF, "rolloff"}, {PROP_ROLLOFF, "rolloff"},
@ -361,6 +393,14 @@ dvb_base_bin_init (DvbBaseBin * dvbbasebin)
gst_element_link_many (dvbbasebin->dvbsrc, gst_element_link_many (dvbbasebin->dvbsrc,
dvbbasebin->buffer_queue, dvbbasebin->tsparse, NULL); dvbbasebin->buffer_queue, dvbbasebin->tsparse, NULL);
/* Proxy dvbsrc signals */
g_signal_connect (dvbbasebin->dvbsrc, "tuning-start",
G_CALLBACK (tuning_start_signal_cb), dvbbasebin);
g_signal_connect (dvbbasebin->dvbsrc, "tuning-done",
G_CALLBACK (tuning_done_signal_cb), dvbbasebin);
g_signal_connect (dvbbasebin->dvbsrc, "tuning-fail",
G_CALLBACK (tuning_fail_signal_cb), dvbbasebin);
/* Expose tsparse source pad */ /* Expose tsparse source pad */
pad = gst_element_get_static_pad (dvbbasebin->tsparse, "src"); pad = gst_element_get_static_pad (dvbbasebin->tsparse, "src");
ghost = gst_ghost_pad_new ("src", pad); ghost = gst_ghost_pad_new ("src", pad);
@ -478,6 +518,7 @@ dvb_base_bin_set_property (GObject * object, guint prop_id,
case PROP_HIERARCHY: case PROP_HIERARCHY:
case PROP_INVERSION: case PROP_INVERSION:
case PROP_STATS_REPORTING_INTERVAL: case PROP_STATS_REPORTING_INTERVAL:
case PROP_TUNING_TIMEOUT:
case PROP_DELSYS: case PROP_DELSYS:
case PROP_PILOT: case PROP_PILOT:
case PROP_ROLLOFF: case PROP_ROLLOFF:
@ -516,6 +557,7 @@ dvb_base_bin_get_property (GObject * object, guint prop_id,
case PROP_HIERARCHY: case PROP_HIERARCHY:
case PROP_INVERSION: case PROP_INVERSION:
case PROP_STATS_REPORTING_INTERVAL: case PROP_STATS_REPORTING_INTERVAL:
case PROP_TUNING_TIMEOUT:
case PROP_DELSYS: case PROP_DELSYS:
case PROP_PILOT: case PROP_PILOT:
case PROP_ROLLOFF: case PROP_ROLLOFF: