[svn r671] Fixes t the DVB backend messages.
1.1 --- a/gmyth/src/gmyth_file_transfer.c Wed May 16 15:42:18 2007 +0100
1.2 +++ b/gmyth/src/gmyth_file_transfer.c Wed May 16 15:42:38 2007 +0100
1.3 @@ -269,8 +269,7 @@
1.4 g_return_val_if_fail (filename != NULL && strlen (filename) > 0, FALSE);
1.5
1.6 priv = GMYTH_FILE_TRANSFER_GET_PRIVATE (transfer);
1.7 -
1.8 - //if ( )
1.9 +
1.10 gmyth_debug ("Opening the FileTransfer... (%s)", filename);
1.11
1.12 g_object_set (GMYTH_FILE (transfer), "filename", filename, NULL);
1.13 @@ -283,6 +282,39 @@
1.14 gmyth_debug ("Connection to backend failed (Control Socket).");
1.15 ret = FALSE;
1.16 }
1.17 +
1.18 + if (priv->do_next_program_chain) {
1.19 + gmyth_debug ("XXXXXXXXXXXXXX Oulu tests XXXXXXXXXXXXXXXX");
1.20 + gmyth_debug ("New file available before the current file was opened");
1.21 + GMythProgramInfo *prog_info =
1.22 + gmyth_recorder_get_current_program_info (priv->recorder);
1.23 +
1.24 + if (prog_info != NULL && prog_info->pathname != NULL
1.25 + && strlen (prog_info->pathname->str) > 0
1.26 + && g_ascii_strcasecmp (prog_info->pathname->str,
1.27 + gmyth_file_get_file_name (GMYTH_FILE
1.28 + (transfer))) !=
1.29 + 0)
1.30 + ret =
1.31 + gmyth_file_transfer_open (transfer,
1.32 + g_strrstr (prog_info->pathname->
1.33 + str, "/"));
1.34 +
1.35 + if (prog_info != NULL)
1.36 + g_object_unref (prog_info);
1.37 +
1.38 + if (!ret)
1.39 + gmyth_debug ("Cannot change to the next program info!");
1.40 + else
1.41 + gmyth_debug ("OK!!! MOVED to the next program info [%s]!",
1.42 + gmyth_file_get_file_name (GMYTH_FILE (transfer)));
1.43 +
1.44 + } else {
1.45 + gmyth_debug ("XXXXXXXXXXXXXX Oulu tests XXXXXXXXXXXXXXXX");
1.46 + gmyth_debug ("None new file found. We continue with the same file opened before");
1.47 + }
1.48 +
1.49 +
1.50 }
1.51 else
1.52 {
1.53 @@ -369,6 +401,9 @@
1.54 (transfer)));
1.55
1.56 gmyth_socket_write_stringlist (priv->sock, strlist);
1.57 +
1.58 + /* MONITOR Handler - DVB TV Chain update messages!!! */
1.59 +
1.60 gmyth_socket_read_stringlist (priv->sock, strlist);
1.61
1.62 /* file identification used in future file transfer requests to backend */
2.1 --- a/gmyth/src/gmyth_livetv.c Wed May 16 15:42:18 2007 +0100
2.2 +++ b/gmyth/src/gmyth_livetv.c Wed May 16 15:42:38 2007 +0100
2.3 @@ -297,7 +297,7 @@
2.4 }
2.5 default:
2.6 break;
2.7 - } /* switch (Monitor Handler messages) */
2.8 + } /* switch (Monitor Handler messages) */
2.9
2.10 }
2.11
2.12 @@ -912,7 +912,7 @@
2.13 {
2.14 livetv->file =
2.15 GMYTH_FILE (gmyth_file_transfer_new (livetv->backend_info));
2.16 - //gmyth_file_transfer_settimeout( GMYTH_FILE_TRANSFER(livetv->file), TRUE );
2.17 + /* gmyth_file_transfer_settimeout( GMYTH_FILE_TRANSFER(livetv->file), TRUE ); */
2.18 }
2.19
2.20 if (NULL == livetv->file)
2.21 @@ -925,6 +925,8 @@
2.22 g_object_ref (livetv->file);
2.23
2.24 g_mutex_unlock (livetv->mutex);
2.25 +
2.26 + /* Do some locking procedure with the Monitor Handler messages... */
2.27
2.28 done:
2.29 /*
3.1 --- a/gmyth/src/gmyth_monitor_handler.c Wed May 16 15:42:18 2007 +0100
3.2 +++ b/gmyth/src/gmyth_monitor_handler.c Wed May 16 15:42:38 2007 +0100
3.3 @@ -539,6 +539,8 @@
3.4
3.5 io_cond = g_io_channel_get_buffer_condition (io_channel);
3.6
3.7 + g_usleep( 500000 );
3.8 +
3.9 }
3.10 while (recv <= 0 && ((io_cond & G_IO_HUP) == 0));
3.11