Greetings all,

I wish to use live555 to deliver in memory nals created with x264. In my application, I spawn off the live555 event loop into a separate thread from the one responsible for doing the encoding. I am configuring my encoder to output nals that will fit inside the standard mtu.

In order to pass data from the encoder thread to the live555 thread, I am anticipating implementing a series of buffers, with a control scheme to switch back and forth to allow for minimal blocking, ie, the live555 thread will always have a static buffer of known content length to read from, the encoder thread will always have a similar buffer to write to, and there will be a back-buffer with a complete buffer of data ready to go should there be a point where all data has been read but the writer is still writing.

I have a couple questions.

Given what I've read so far, I should subclass ServerMediaSubsession and implement createNewStreamSource, making use of ByteStreamMemorySource class in some way. Given that I'll be changing the buffer to be read from, does this mean that I will have to create a new instance of the custom sms every time there is a new buffer to read from? Or instead, will my custom sms need to handle the setup and teardown of ByteStreamMemorySources? Or else, how is it anticipated that an in memory location be used to pass data to the live555 event loop when the data is sourced from a different thread? Would it be easier to simply memmove the data to be read into the readbuffer instead of change the readbuffer's location?

Also, I notice that the createNewStreamSource call returns a framed source object, of which H264FUAFragmenter seems to implement, and whose methods seem to suggest that it is intending to be used to feed nals to some upper layer. Given also that I am already creating nals small enough to be packed inside an individual rtp packet, and the FUAFragmenter class seems to have code in it to handle nals of varrying sizes, is it the correct class for use in implementing the createNewStreamSource as mentioned above? I've read through some examples, but what I'm supposed to make happen inside of a createNewStreamSource hasn't clicked with me yet.

Thank you very much for your time.

--
Joshua Kordani
LSA Autonomy

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

Reply via email to