# HG changeset patch # User rosfran # Date 1164380141 0 # Node ID 110d51c175816419f74b66f38e1206cfac6077ce # Parent f2b53549deefff719ac175f27f23e0e06b5abe91 [svn r110] Moved function IS_RECORDING from FileTransfer to Recorder. diff -r f2b53549deef -r 110d51c17581 gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Fri Nov 24 14:54:39 2006 +0000 +++ b/gmyth/src/gmyth_file_transfer.c Fri Nov 24 14:55:41 2006 +0000 @@ -523,44 +523,6 @@ } -gboolean -gmyth_file_transfer_is_recording ( GMythFileTransfer *file_transfer ) -{ - gboolean ret = TRUE; - - GMythStringList *str_list = gmyth_string_list_new (); - - g_debug ( "[%s]\n", __FUNCTION__ ); - myth_control_acquire_context (TRUE); - - g_string_printf( file_transfer->query, "%s %d", GMYTHTV_RECORDER_HEADER, - file_transfer->rec_id >= 0 ? file_transfer->rec_id : file_transfer->card_id ); - gmyth_string_list_append_string (str_list, file_transfer->query); - gmyth_string_list_append_string (str_list, g_string_new ("IS_RECORDING")); - - gmyth_socket_sendreceive_stringlist ( file_transfer->control_sock, str_list ); - - if ( str_list != NULL && gmyth_string_list_length(str_list) > 0 ) - { - GString *str = NULL; - if ( ( str = gmyth_string_list_get_string( str_list, 0 ) ) != NULL && strcmp( str->str, "bad" )!= 0 ) { - gint is_rec = gmyth_string_list_get_int( str_list, 0 ); - if ( is_rec != 0 ) - ret = TRUE; - else - ret = FALSE; - } - } - g_print( "[%s] %s, stream is %s being recorded!\n", __FUNCTION__, ret ? "YES" : "NO", ret ? "" : "NOT" ); - myth_control_release_context( ); - - if ( str_list != NULL ) - g_object_unref (str_list); - - return ret; - -} - gint64 gmyth_file_transfer_get_file_position ( GMythFileTransfer *file_transfer ) {