# HG changeset patch # User rosfran # Date 1171665743 0 # Node ID 296e08ba93397be16d0fd1dc129d2f17270273c5 # Parent bb443b6ebee2cbe8ad30011284b178d771334aa1 [svn r379] Some clean-ups. diff -r bb443b6ebee2 -r 296e08ba9339 gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Fri Feb 16 18:38:59 2007 +0000 +++ b/gmyth/src/gmyth_livetv.c Fri Feb 16 22:42:23 2007 +0000 @@ -195,7 +195,7 @@ gmyth_file_transfer_emit_program_info_changed_signal( live_tv->file_transfer, msg_code, (gpointer)live_tv ); - //gmyth_livetv_monitor_handler_stop( live_tv ); + /* gmyth_livetv_monitor_handler_stop( live_tv ); */ } else gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n"); } @@ -224,6 +224,19 @@ } else gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n"); } + } + case GMYTH_BACKEND_STOP_LIVETV: + { + gmyth_debug( "LIVETV Stop LiveTV request received [ msg = %s ]. Going out the "\ + "LiveTV...\n", message ); + /* stops the LiveTV */ + if ( live_tv != NULL ) + { + gmyth_debug( "Going out the LiveTV... [ \"quit-livetv\" ]" ); + + g_object_unref( live_tv ); + } else + gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n"); break; } diff -r bb443b6ebee2 -r 296e08ba9339 gmyth/src/gmyth_monitor_handler.c --- a/gmyth/src/gmyth_monitor_handler.c Fri Feb 16 18:38:59 2007 +0000 +++ b/gmyth/src/gmyth_monitor_handler.c Fri Feb 16 22:42:23 2007 +0000 @@ -167,7 +167,6 @@ if ( monitor->mutex != NULL ) { - //g_mutex_unlock( monitor->mutex ); g_mutex_free( monitor->mutex ); monitor->mutex = NULL; } @@ -228,21 +227,6 @@ { gboolean ret = TRUE; - //guint max_iter = 50; - - //g_mutex_lock( monitor->mutex ); - - //while ( !has_io_access ) - // g_cond_wait( io_watcher_cond, mutex ); - - //has_io_access = FALSE; - /* - if ( do_wait ) { - while ( --max_iter > 0 && !g_main_context_wait( io_watcher_context, io_watcher_cond, mutex ) ) - ret = FALSE; - } else if ( !g_main_context_acquire( io_watcher_context ) ) - ret = FALSE; - */ g_mutex_lock( monitor->mutex ); @@ -258,16 +242,6 @@ g_mutex_unlock( monitor->mutex ); - //g_main_context_release( io_watcher_context ); - - //g_main_context_wakeup( io_watcher_context ); - - //has_io_access = TRUE; - - //g_cond_broadcast( io_watcher_cond ); - - //g_mutex_unlock( monitor->mutex ); - return ret; } @@ -356,10 +330,13 @@ } else if ( g_strstr_len( *back_msg_action, strlen( *back_msg_action ), "DONE_RECORDING" ) ) { gmyth_debug( "MONITOR: message type == GMYTH_BACKEND_DONE_RECORDING, msg = %s", *back_msg_action ); msg_type = GMYTH_BACKEND_DONE_RECORDING; - } + } else if ( g_strstr_len( *back_msg_action, strlen( *back_msg_action ), "QUIT" ) ) { + gmyth_debug( "MONITOR: message type == GMYTH_BACKEND_STOP_LIVETV, msg = %s", *back_msg_action ); + msg_type = GMYTH_BACKEND_STOP_LIVETV; + } - //g_hash_table_insert ( monitor->backend_msgs, - // &(monitor->actual_index), *back_msg_action ); + /* g_hash_table_insert ( monitor->backend_msgs, + &(monitor->actual_index), *back_msg_action ); */ } /* if */