[svn r379] Some clean-ups.
1.1 --- a/gmyth/src/gmyth_livetv.c Fri Feb 16 18:38:59 2007 +0000
1.2 +++ b/gmyth/src/gmyth_livetv.c Fri Feb 16 22:42:23 2007 +0000
1.3 @@ -195,7 +195,7 @@
1.4 gmyth_file_transfer_emit_program_info_changed_signal( live_tv->file_transfer,
1.5 msg_code, (gpointer)live_tv );
1.6
1.7 - //gmyth_livetv_monitor_handler_stop( live_tv );
1.8 + /* gmyth_livetv_monitor_handler_stop( live_tv ); */
1.9 } else
1.10 gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n");
1.11 }
1.12 @@ -224,6 +224,19 @@
1.13 } else
1.14 gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n");
1.15 }
1.16 + }
1.17 + case GMYTH_BACKEND_STOP_LIVETV:
1.18 + {
1.19 + gmyth_debug( "LIVETV Stop LiveTV request received [ msg = %s ]. Going out the "\
1.20 + "LiveTV...\n", message );
1.21 + /* stops the LiveTV */
1.22 + if ( live_tv != NULL )
1.23 + {
1.24 + gmyth_debug( "Going out the LiveTV... [ \"quit-livetv\" ]" );
1.25 +
1.26 + g_object_unref( live_tv );
1.27 + } else
1.28 + gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n");
1.29
1.30 break;
1.31 }
2.1 --- a/gmyth/src/gmyth_monitor_handler.c Fri Feb 16 18:38:59 2007 +0000
2.2 +++ b/gmyth/src/gmyth_monitor_handler.c Fri Feb 16 22:42:23 2007 +0000
2.3 @@ -167,7 +167,6 @@
2.4
2.5 if ( monitor->mutex != NULL )
2.6 {
2.7 - //g_mutex_unlock( monitor->mutex );
2.8 g_mutex_free( monitor->mutex );
2.9 monitor->mutex = NULL;
2.10 }
2.11 @@ -228,21 +227,6 @@
2.12 {
2.13
2.14 gboolean ret = TRUE;
2.15 - //guint max_iter = 50;
2.16 -
2.17 - //g_mutex_lock( monitor->mutex );
2.18 -
2.19 - //while ( !has_io_access )
2.20 - // g_cond_wait( io_watcher_cond, mutex );
2.21 -
2.22 - //has_io_access = FALSE;
2.23 - /*
2.24 - if ( do_wait ) {
2.25 - while ( --max_iter > 0 && !g_main_context_wait( io_watcher_context, io_watcher_cond, mutex ) )
2.26 - ret = FALSE;
2.27 - } else if ( !g_main_context_acquire( io_watcher_context ) )
2.28 - ret = FALSE;
2.29 - */
2.30
2.31 g_mutex_lock( monitor->mutex );
2.32
2.33 @@ -258,16 +242,6 @@
2.34
2.35 g_mutex_unlock( monitor->mutex );
2.36
2.37 - //g_main_context_release( io_watcher_context );
2.38 -
2.39 - //g_main_context_wakeup( io_watcher_context );
2.40 -
2.41 - //has_io_access = TRUE;
2.42 -
2.43 - //g_cond_broadcast( io_watcher_cond );
2.44 -
2.45 - //g_mutex_unlock( monitor->mutex );
2.46 -
2.47 return ret;
2.48
2.49 }
2.50 @@ -356,10 +330,13 @@
2.51 } else if ( g_strstr_len( *back_msg_action, strlen( *back_msg_action ), "DONE_RECORDING" ) ) {
2.52 gmyth_debug( "MONITOR: message type == GMYTH_BACKEND_DONE_RECORDING, msg = %s", *back_msg_action );
2.53 msg_type = GMYTH_BACKEND_DONE_RECORDING;
2.54 - }
2.55 + } else if ( g_strstr_len( *back_msg_action, strlen( *back_msg_action ), "QUIT" ) ) {
2.56 + gmyth_debug( "MONITOR: message type == GMYTH_BACKEND_STOP_LIVETV, msg = %s", *back_msg_action );
2.57 + msg_type = GMYTH_BACKEND_STOP_LIVETV;
2.58 + }
2.59
2.60 - //g_hash_table_insert ( monitor->backend_msgs,
2.61 - // &(monitor->actual_index), *back_msg_action );
2.62 + /* g_hash_table_insert ( monitor->backend_msgs,
2.63 + &(monitor->actual_index), *back_msg_action ); */
2.64
2.65 } /* if */
2.66