[Interest] Question about why the sleep function is used below
Thiago Macieira
thiago.macieira at intel.com
Tue May 20 05:32:50 CEST 2014
Em seg 19 maio 2014, às 22:20:38, Erlin Vazquez escreveu:
> 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);
>
> }
It's bad code.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list