I want to embed the libvlc into my VC++6.0 program to make it a simple RTSP server. The stream is "pushed" from another computer using RTP (also by VLC player), then the program publish the stream using RTSP.
The code is:
Code: Select all
void test ()
{
const char * const vlc_args[] = {
"--plugin-path=D:\\VideoLAN\\VLC",
"--sout-udp-caching=100",
"--udp-caching=100",
"--rtsp-caching=100",
"--sout-rtp-caching=100"};
const char * const vlm_args[] = {
"--no-sout-rtp-sap",
"--no-sout-standard-sap",
"--ttl=1",
"--sout-keep",
"--rtsp-session-timeout=20"};
libvlc_instance_t* m_pLibvlcInst=NULL;
m_pLibvlcInst = libvlc_new(sizeof(vlc_args)/ sizeof(vlc_args[0]),vlc_args); // init
n = libvlc_vlm_add_vod(m_pLibvlcInst, "PUB0", "rtp://@:5004/",
sizeof(vlm_args)/ sizeof(vlm_args[0]), vlm_args, true, NULL); // VOD source is rtp @ 5004, publishing point "PUB0"
}
From this link: http://wiki.videolan.org/Documentation: ... _Internals, last paragraph <Thread Creation>, VLM should create a new thread after "libvlc_vlm_add_vod" being called. So I don't know why it is blocked?
Can someone help me? Many thanks in advance