[streaming] [imp] help to get stream on buffer
Rajiv
rgandhi08 at gmail.com
Tue Jan 20 01:16:14 CET 2015
Hello experts,
I am working to get stream from file to my buffer so that i can send it via
my custom port/protocol and i am facing couple of issues, so please help me
out
where i am:
* After reading tutorial from
https://wiki.videolan.org/Stream_to_memory_(smem)_tutorial/ i am able to
compile and run
* I have done following changes for smem options to work with video (please
refer to complete code mentioned at the end)
[code]sprintf(smem_options,
"#transcode{vcodec=RV32}:smem{video-postrender-callback=%lld,video-prerender-callback=%lld}",
// We are using transcode because smem only support raw
audio and video formats
(long long int)(intptr_t)(void*)&handleStream, (long long
int)(intptr_t)(void*)&prepareRender);[/code]
* i can see that both prerender and postrenders are being called and data
is being supplied
myProblems:
* currently to test the output i am dumping the buffer directly to file,
some thing like [code]fwrite (p_pixel_buffer, sizeof(char), i_size,
myfile); [/code]
but dumped file is not being read either by vlc player or any other
streaming player so i am sure i am missing here something, because if i
ask vlc player to write directly to file by giving full transcode values
then things are fine [code]sprintf(smem_options,
"#transcode{vcodec=theo,vb=800,acodec=vorb,ab=128,channels=2,samplerate=44100}:file{dst=stream-output.ogg}");[/code]]
myQuestions
* is reading from buffer correct? because i read [quote]First, a quick
warning: starting with VLC2.2 (current git version, to be released soon),
the size parameter is a size_t. There's no API for smem (yet? hopefully
this will change), which sucks, so this would silently break your
application.[/quote] from
http://stackoverflow.com/questions/23092940/get-frame-from-video-with-libvlc-smem-and-convert-it-to-opencv-mat-c
if yes then
* is there any alternative API where i can hook and get buffer?
if not then
* what wrong i am doing and what extra work i have to do to get this
done?
any pointer/sample program would be great help
PS:
* here is the complete code i am running http://pastebin.com/Dp8rSHuM
* log file out for the run http://pastebin.com/z5iVD0Jb
Regards,
Rajiv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/streaming/attachments/20150120/092ffd93/attachment.html>
More information about the streaming
mailing list