libvlc_vlm_set_output() doesn't work after play
Posted: 22 May 2010 06:20
Hello everyone
I try vlc-1.2.0-git-20100508-0002-win32-debug.zip nightly build and If I call to libvlc_vlm_set_output() after play but doesn't run. On the example code the event type VlmMediaChanged tell me that the "command" is executed but rtp stream output only run if libvlc_vlm_set_output() is executed before play.
Is this a bug or a feature?
Thanks in avance
Output with arg "unknow"
Output with arg "yes"
output with arg "no"
I try vlc-1.2.0-git-20100508-0002-win32-debug.zip nightly build and If I call to libvlc_vlm_set_output() after play but doesn't run. On the example code the event type VlmMediaChanged tell me that the "command" is executed but rtp stream output only run if libvlc_vlm_set_output() is executed before play.
Is this a bug or a feature?
Thanks in avance
Code: Select all
#include <iostream>
#include <stdlib.h>
#include <vlc/vlc.h>
void event_man(const struct libvlc_event_t * event, void *data)
{
std::cout << " type " << libvlc_event_type_name (event->type)<<std::endl;
}
int main(int argc, char *argv[])
{
libvlc_instance_t * _vlcinstance;
const char * const vlc_args[]={
"-I",
"dummy", /* Don't use any interface */
"--ignore-config", /* Don't use VLC's config */
"--plugin-path=c:\\vlc\\plugins"
};
_vlcinstance=libvlc_new(
sizeof(vlc_args) / sizeof(vlc_args[0]),
(const char *const*)vlc_args);
if(_vlcinstance==NULL) exit(1);
libvlc_event_manager_t *man=
libvlc_vlm_get_event_manager( _vlcinstance );
if(man==NULL)
exit(1);
libvlc_event_attach(man,libvlc_VlmMediaAdded ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaRemoved ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaChanged ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStarted ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStopped ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusInit ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusOpening ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusPlaying ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusPause ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusEnd ,event_man,NULL);
libvlc_event_attach(man,libvlc_VlmMediaInstanceStatusError ,event_man,NULL);
if(0!=libvlc_vlm_add_broadcast( _vlcinstance,
"broad1",
"..\\..\\videos\\presto.avi",
"#display",
0,NULL,
true,true))
exit(2);
if(0==strcmp(argv[1],"yes"))
{
if(0!=libvlc_vlm_set_output(
_vlcinstance,
"broad1",
"#duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.41,port=1234}}"))
exit(4);
}
if(0!=libvlc_vlm_play_media ( _vlcinstance,"broad1"))
exit(3);
if(0==strcmp(argv[1],"no"))
{
if(0!=libvlc_vlm_set_output(
_vlcinstance,
"broad1",
"#duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.41,port=1234}}"))
exit(4);
}
getchar();
libvlc_vlm_del_media( _vlcinstance,"broad1");
libvlc_vlm_release( _vlcinstance );
libvlc_release (_vlcinstance);
}
Output with arg "unknow"
Code: Select all
type VlmMediaAdded
type VlmMediaChanged
Warning: input_item_SetURI("..\..\videos\presto.avi"): file path instead of URL.
type VlmMediaInstanceStatusOpening
input_SplitMRL("..\..\videos\presto.avi"): not a valid URI!
type VlmMediaInstanceStarted
type Unknown Event
Code: Select all
type VlmMediaAdded
type VlmMediaChanged
type VlmMediaChanged
Warning: input_item_SetURI("..\..\videos\presto.avi"): file path instead of URL.
type VlmMediaInstanceStarted
type VlmMediaInstanceStatusOpening
input_SplitMRL("..\..\videos\presto.avi"): not a valid URI!
type Unknown Event
output with arg "no"
Code: Select all
type VlmMediaAdded
type VlmMediaChanged
Warning: input_item_SetURI("..\..\videos\presto.avi"): file path instead of URL.
type VlmMediaInstanceStatusOpening
input_SplitMRL("..\..\videos\presto.avi"): not a valid URI!
type VlmMediaInstanceStarted
type VlmMediaChanged
type Unknown Event