mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
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).
This commit is contained in:
parent
f7632ce231
commit
d0b9ec1252
2 changed files with 24 additions and 27 deletions
|
@ -1,3 +1,12 @@
|
|||
2007-01-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
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).
|
||||
|
||||
2007-01-27 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* tests/icles/videocrop-test.c: (test_with_caps):
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue