# HG changeset patch # User rosfran # Date 1179326558 -3600 # Node ID ef870f327d30c4e7fe87ae67bd63dafd03b741f0 # Parent 464d715ddb7e15d2e8589efbfb51872366e15bf7 [svn r671] Fixes t the DVB backend messages. diff -r 464d715ddb7e -r ef870f327d30 gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Wed May 16 15:42:18 2007 +0100 +++ b/gmyth/src/gmyth_file_transfer.c Wed May 16 15:42:38 2007 +0100 @@ -269,8 +269,7 @@ g_return_val_if_fail (filename != NULL && strlen (filename) > 0, FALSE); priv = GMYTH_FILE_TRANSFER_GET_PRIVATE (transfer); - - //if ( ) + gmyth_debug ("Opening the FileTransfer... (%s)", filename); g_object_set (GMYTH_FILE (transfer), "filename", filename, NULL); @@ -283,6 +282,39 @@ gmyth_debug ("Connection to backend failed (Control Socket)."); ret = FALSE; } + + if (priv->do_next_program_chain) { + gmyth_debug ("XXXXXXXXXXXXXX Oulu tests XXXXXXXXXXXXXXXX"); + gmyth_debug ("New file available before the current file was opened"); + GMythProgramInfo *prog_info = + gmyth_recorder_get_current_program_info (priv->recorder); + + if (prog_info != NULL && prog_info->pathname != NULL + && strlen (prog_info->pathname->str) > 0 + && g_ascii_strcasecmp (prog_info->pathname->str, + gmyth_file_get_file_name (GMYTH_FILE + (transfer))) != + 0) + ret = + gmyth_file_transfer_open (transfer, + g_strrstr (prog_info->pathname-> + str, "/")); + + if (prog_info != NULL) + g_object_unref (prog_info); + + if (!ret) + gmyth_debug ("Cannot change to the next program info!"); + else + gmyth_debug ("OK!!! MOVED to the next program info [%s]!", + gmyth_file_get_file_name (GMYTH_FILE (transfer))); + + } else { + gmyth_debug ("XXXXXXXXXXXXXX Oulu tests XXXXXXXXXXXXXXXX"); + gmyth_debug ("None new file found. We continue with the same file opened before"); + } + + } else { @@ -369,6 +401,9 @@ (transfer))); gmyth_socket_write_stringlist (priv->sock, strlist); + + /* MONITOR Handler - DVB TV Chain update messages!!! */ + gmyth_socket_read_stringlist (priv->sock, strlist); /* file identification used in future file transfer requests to backend */ diff -r 464d715ddb7e -r ef870f327d30 gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Wed May 16 15:42:18 2007 +0100 +++ b/gmyth/src/gmyth_livetv.c Wed May 16 15:42:38 2007 +0100 @@ -297,7 +297,7 @@ } default: break; - } /* switch (Monitor Handler messages) */ + } /* switch (Monitor Handler messages) */ } @@ -912,7 +912,7 @@ { livetv->file = GMYTH_FILE (gmyth_file_transfer_new (livetv->backend_info)); - //gmyth_file_transfer_settimeout( GMYTH_FILE_TRANSFER(livetv->file), TRUE ); + /* gmyth_file_transfer_settimeout( GMYTH_FILE_TRANSFER(livetv->file), TRUE ); */ } if (NULL == livetv->file) @@ -925,6 +925,8 @@ g_object_ref (livetv->file); g_mutex_unlock (livetv->mutex); + + /* Do some locking procedure with the Monitor Handler messages... */ done: /* diff -r 464d715ddb7e -r ef870f327d30 gmyth/src/gmyth_monitor_handler.c --- a/gmyth/src/gmyth_monitor_handler.c Wed May 16 15:42:18 2007 +0100 +++ b/gmyth/src/gmyth_monitor_handler.c Wed May 16 15:42:38 2007 +0100 @@ -539,6 +539,8 @@ io_cond = g_io_channel_get_buffer_condition (io_channel); + g_usleep( 500000 ); + } while (recv <= 0 && ((io_cond & G_IO_HUP) == 0));