[vlc] Program code in C to stream using VLM

youssef azzouzi sidimoulay2000 at hotmail.fr
Mon Sep 14 12:18:25 CEST 2009







Hi,
 
I built a small program in C to stream using VLM 
libreries, but it still does not work,
Can someone help or tell me why?
 
#include <stdio.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_vlm.h>


int main(int argc, char* argv[])
{
    libvlc_exception_t excep;
    libvlc_instance_t *inst;
    libvlc_exception_init( &excep );
    const char *args[] = {"-vvv","--sout"};
    inst = libvlc_new( sizeof(args) , args , &excep );
    const char * smiya = {"smiya_VOD"};
    const char * cam = {"v4l2://"};
    const char * par_sout = {"#transcode{vcodec=h264,vb=800,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:1234},dst=display}"}; 
    const char * muxer = {"ts"};
    printf("The Media name is: %s \n", smiya);
    puts("Realisation of VLM instance");
    libvlc_vlm_release( inst, &excep );    
    puts("Add the broadcast to the instance");
    libvlc_vlm_add_broadcast( inst , smiya , cam , par_sout , 0 , NULL , 1 , 0 , &excep );
    puts("Configuration of the Media");
    libvlc_vlm_set_output( inst , smiya , par_sout , &excep );
    puts("Play the Media");
    libvlc_vlm_play_media ( inst , smiya , &excep );
    sleep(5);
    puts("Stop the Media");
    libvlc_vlm_stop_media ( inst , smiya , &excep );
    puts("Delete the Media");
    libvlc_vlm_del_media( inst , smiya , &excep );
    return 0;
}


_________________________________________________________________
Messenger débarque dans Hotmail ! Essayez-le !
http://www.windowslive.fr/hotmail/web-messenger/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20090914/99dd0849/attachment.html>


More information about the vlc mailing list