Page 1 of 1

VLC play RTSP will stop by set Command

Posted: 20 Mar 2013 03:47
by lionwes
Dear edwardw :

in vlc-android ,i have below function :

Code: Select all

int libvlc_record_start( libvlc_media_player_t *p_mi, const char* psz_filename ) { input_thread_t *p_input_thread; p_input_thread = libvlc_get_input_thread( p_mi ); if( !p_input_thread ) return -1; var_SetString( p_input_thread, "input-record-path", psz_filename ); var_SetBool( p_input_thread, "record", true ); vlc_object_release( p_input_thread ); return 0; }

Code: Select all

int libvlc_record_stop( libvlc_media_player_t *p_mi ) { input_thread_t *p_input_thread; p_input_thread = libvlc_get_input_thread( p_mi ); if( !p_input_thread ) return -1; var_SetBool( p_input_thread, "record", false ); vlc_object_release( p_input_thread ); return 0; }
when use libvlc_media_player_record_start,is ok,but then use libvlc_media_player_record_stop it will stop play video,it not i want, i just want to stop record,why will happen this issue ?

if can't use var_SetBool( p_input_thread, "record", false ) to stop record?

Re: VLC play RTSP will stop by set Command

Posted: 20 Mar 2013 12:02
by edwardw
You can't just copy the libvlc stub without also applying the core callback. Just take the patch from http://patches.videolan.org/patch/606/ and apply it.

Re: VLC play RTSP will stop by set Command

Posted: 21 Mar 2013 02:15
by lionwes
You can't just copy the libvlc stub without also applying the core callback. Just take the patch from http://patches.videolan.org/patch/606/ and apply it.
i merge it before,and in the android\vlc\modules\stream_out\record.c

Code: Select all

set_callbacks( Open, Close )
how it can use Close function?

Re: VLC play RTSP will stop by set Command

Posted: 21 Mar 2013 03:34
by edwardw
Your question does not seem to make much sense.