[svn r237] Added channel info.
1.1 --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 14:43:11 2006 +0000
1.2 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 18:54:31 2006 +0000
1.3 @@ -42,7 +42,7 @@
1.4
1.5 #define GST_GMYTHTV_ID_NUM 1
1.6
1.7 -#define GST_GMYTHTV_CHANNEL_NUM 1000
1.8 +#define GST_GMYTHTV_CHANNEL_DEFAULT_NUM -1
1.9
1.10 #define GMYTHTV_VERSION_DEFAULT 30
1.11
1.12 @@ -225,7 +225,7 @@
1.13 (gobject_class, PROP_GMYTHTV_CHANNEL_NUM,
1.14 g_param_spec_int ("mythtv-channel", "mythtv-channel",
1.15 "Change MythTV channel number",
1.16 - 0, 99999, GST_GMYTHTV_CHANNEL_NUM, G_PARAM_READWRITE));
1.17 + 0, 99999, GST_GMYTHTV_CHANNEL_DEFAULT_NUM, G_PARAM_READWRITE));
1.18
1.19 #ifndef GST_DISABLE_GST_DEBUG
1.20 g_object_class_install_property
1.21 @@ -278,7 +278,7 @@
1.22 this->mythtv_caps = NULL;
1.23 this->update_prog_chain = FALSE;
1.24
1.25 - this->channel_num = 0;
1.26 + this->channel_num = GST_GMYTHTV_CHANNEL_DEFAULT_NUM;
1.27
1.28 this->eos = FALSE;
1.29
1.30 @@ -662,11 +662,21 @@
1.31 src->backend_info = gmyth_backend_info_new_with_uri( src->uri_name );
1.32 if ( src->live_tv ) {
1.33 src->spawn_livetv = gmyth_livetv_new( );
1.34 - if ( gmyth_livetv_setup( src->spawn_livetv, src->backend_info ) == FALSE ) {
1.35 - GST_INFO_OBJECT( src, "[%s] LiveTV setup felt down on error!!\n", __FUNCTION__ );
1.36 - ret = FALSE;
1.37 - goto init_failed;
1.38 - }
1.39 +
1.40 + if ( src->channel_num != GST_GMYTHTV_CHANNEL_DEFAULT_NUM )
1.41 + {
1.42 + if ( gmyth_livetv_channel_setup( src->spawn_livetv, src->channel_num, src->backend_info ) == FALSE ) {
1.43 + GST_INFO_OBJECT( src, "[%s] LiveTV setup felt down on error!!\n", __FUNCTION__ );
1.44 + ret = FALSE;
1.45 + goto init_failed;
1.46 + }
1.47 + } else {
1.48 + if ( gmyth_livetv_setup( src->spawn_livetv, src->backend_info ) == FALSE ) {
1.49 + GST_INFO_OBJECT( src, "[%s] LiveTV setup felt down on error!!\n", __FUNCTION__ );
1.50 + ret = FALSE;
1.51 + goto init_failed;
1.52 + }
1.53 + }
1.54
1.55 src->file_transfer = gmyth_livetv_create_file_transfer(src->spawn_livetv);
1.56