summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorRosfran Borges <rosfran.borges@idnt.org.br>2007-01-28 13:01:02 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-01-28 13:01:02 +0000
commitd0b9ec1252d36cebbdd96b858c6e30892eb90527 (patch)
treeae14d561ca9a12089416eff39264e30e70d5edf6 /ext
parentf7632ce231a991fba32691154a6c0576cec3dc51 (diff)
downloadgst-plugins-bad-d0b9ec1252d36cebbdd96b858c6e30892eb90527.tar.gz
gst-plugins-bad-d0b9ec1252d36cebbdd96b858c6e30892eb90527.tar.bz2
gst-plugins-bad-d0b9ec1252d36cebbdd96b858c6e30892eb90527.zip
ext/mythtv/gstmythtvsrc.c: Remove sleep calls, they've been moved into the library now ... (#354451).
Original commit message from CVS: Patch by: Rosfran Borges <rosfran dot borges at idnt org br> * ext/mythtv/gstmythtvsrc.c: (gst_mythtv_src_start), (gst_mythtv_src_next_program_chain): Remove sleep calls, they've been moved into the library now ... (#354451).
Diffstat (limited to 'ext')
-rw-r--r--ext/mythtv/gstmythtvsrc.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/ext/mythtv/gstmythtvsrc.c b/ext/mythtv/gstmythtvsrc.c
index 7894b5a2..f2c709c5 100644
--- a/ext/mythtv/gstmythtvsrc.c
+++ b/ext/mythtv/gstmythtvsrc.c
@@ -630,7 +630,7 @@ gst_mythtv_src_start (GstBaseSrc * bsrc)
GstMythtvSrc *src = GST_MYTHTV_SRC (bsrc);
GString *chain_id_local = NULL;
-
+ GMythURI *gmyth_uri = NULL;
gboolean ret = TRUE;
if (G_UNLIKELY (src->update_prog_chain))
@@ -642,12 +642,20 @@ gst_mythtv_src_start (GstBaseSrc * bsrc)
goto done;
}
+ gmyth_uri = gmyth_uri_new_with_value (src->uri_name);
+
src->backend_info = gmyth_backend_info_new_with_uri (src->uri_name);
/* testing UPnP... */
/* gmyth_backend_info_set_hostname( src->backend_info, NULL ); */
- if (src->live_tv) {
+ if (src->live_tv || gmyth_uri_is_livetv (gmyth_uri)) {
+ gint ch;
+
src->spawn_livetv = gmyth_livetv_new ();
+ ch = gmyth_uri_get_channel_num (gmyth_uri);
+ if (ch != -1)
+ src->channel_num = ch;
+
if (src->channel_num != GST_GMYTHTV_CHANNEL_DEFAULT_NUM) {
if (gmyth_livetv_channel_setup (src->spawn_livetv, src->channel_num,
src->backend_info) == FALSE) {
@@ -684,20 +692,6 @@ gst_mythtv_src_start (GstBaseSrc * bsrc)
}
/*GST_INFO_OBJECT( src, "uri = %s", src->spawn_livetv->file_transfer); */
- if (src->live_tv == TRUE && ret == TRUE) {
- /* loop finished, set the max tries variable to zero again... */
- src->wait_to_transfer = 0;
-
- while (src->wait_to_transfer++ < GMYTHTV_TRANSFER_MAX_WAITS &&
- (gmyth_livetv_is_recording (src->spawn_livetv) == FALSE))
- g_usleep (500);
-
- /* IS_RECORDING again, just like the MythTV backend does... */
- gmyth_livetv_is_recording (src->spawn_livetv);
-
- sleep (9); /* FIXME: this is evil (tpm) */
- }
-
if (ret == FALSE) {
#ifndef GST_DISABLE_GST_DEBUG
if (src->mythtv_msgs_dbg)
@@ -724,6 +718,11 @@ gst_mythtv_src_start (GstBaseSrc * bsrc)
src->content_size, 0));
done:
+ /*if ( gmyth_uri != NULL )
+ {
+ g_object_unref( gmyth_uri );
+ gmyth_uri = NULL;
+ } */
if (chain_id_local != NULL) {
g_string_free (chain_id_local, TRUE);
@@ -828,17 +827,6 @@ gst_mythtv_src_next_program_chain (GstMythtvSrc * src)
/* sets the Playback monitor connection */
- if (src->live_tv == TRUE && ret == TRUE) {
- /* loop finished, set the max tries variable to zero again... */
- src->wait_to_transfer = 0;
-
- g_usleep (200);
-
- while (src->wait_to_transfer++ < GMYTHTV_TRANSFER_MAX_WAITS &&
- (gmyth_livetv_is_recording (src->spawn_livetv) == FALSE))
- g_usleep (1000);
- }
-
/* sets the FileTransfer instance connection (video/audio download) */
if (ret == FALSE) {