[Interest] Question about why the sleep function is used below

Erlin Vazquez evazquez at grm.uci.cu
Tue May 20 04:20:38 CEST 2014


void Streaming::ejecutar(QString sout,QString target)
{

     const char* params[] = {"screen-top=0",
                                "screen-left=0",
                                "screen-width=640",
                                "screen-height=480",
                                "screen-fps=30"};
        libvlc_instance_t *inst = libvlc_new(0, NULL);
        libvlc_vlm_add_broadcast(inst, "mybroad",
                target.toAscii(),
                sout.toAscii(),
                5, params, // <= 5 == sizeof(params) == count of parameters
                1, 0);
        libvlc_vlm_play_media(inst, "mybroad");
        sleep(100); //Here is the doubt
        libvlc_vlm_stop_media(inst,"mybroad");
        libvlc_vlm_release(inst);

}




More information about the Interest mailing list