A pipe is just that, there is not normally any framing involved so is just a 
stream of bytes, with multiple “frames” running on form one another.

You can either add a frame header that tells you the size of the data to read 
(and any other data like presentation time, etc.), which your source can read, 
remove and just pass the correct sized data through..

Alternatively, use some other form of IPC or events to say that a full frame 
has sent, read any available data.

--
Deanna Earley | Lead developer | icatchercctv

w: www.icode.co.uk/icatcher<http://www.icode.co.uk/icatcher> | t: 01329 835335 
| f: 01329 835338
Registered Office : 71 The Hundred, Romsey, SO51 8BZ. Company Number : 03428325

From: live-devel [mailto:live-devel-boun...@ns.live555.com] On Behalf Of 
Xingjun Chen
Sent: 31 March 2015 00:28
To: live-de...@ns.live555.com
Subject: [Live-devel] DeviceSource Streaming from raw living H264 byte-stream.

Hi Ross and all other developers,

I currently wrote my own "DeviceSource" as the video source to open the read 
side of a pipe and reading video stream from there, the write side of the pipe 
is feeded by my OMAX call back function, which keep pushing raw H264 
byte-stream frame by frame,  meanwhile in the "doGetNextFrame" function, I read 
"PIPE_BUF" size of data from pipe, and then deliver the whole buffer data using 
"deliverFrame()".

This works fine indeed, but this stupid way introduce "PIPE_BUF" size buffer 
delay and cause choppy and glitch when streaming, since it not handle the time 
stamp frame by frame, my question is how to use deliverFrame() to pass the 
stream frame by frame along with size of Frame,  and the pipe buffer is really 
needed for this pipeline, can I memory copy the frame and delivery it as soon 
as the frame is ready.

or is there have have any other good choice for raw H264 buffer stream I can 
use.

Thank you.
--
Kevin
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to