Reputation: 629
I have a device which delivers H264 encoded frames. Those I would like to transmit over the network using LIVE555.
Problem: These frames do not include the SPS and PPS NAL units. However, I have access to a function which delivers me the SPS and PPS NAL units after the device encoded the first frame.
Question: How can I set the SPS and PPS NAL units after the event loop of LIVE555 has already started? I've read numerous posts about similar issues but all these posts suggested the following solutions:
All these solutions aren't useful in my case because I haven't got the SPS and PPS NAL units at these moments. Is there some sort of way to update these NAL units after the event loop has already started?
Upvotes: 1
Views: 1276
Reputation: 629
It has been quite some time. But as it has been requested, a general overview of what my solution was. I have no idea whether it was or is a good solution. For that it has been too long:
Upvotes: 2
Reputation: 9573
You haven't provided enough information about the application design/architecture to provide a better answer:
Not sure if I understand your problem correctly, but it sounds like you are only instantiating the encoder after an RTSP client request. However the DESCRIBE request passes the SPS, PPS and at the time of DESCRIBE, you haven't encoded any data and hence don't have the SPS and PPS.
If the encoder is being instantiated in the live555 event loop after a client request, then one solution would be to
In my experience the SPS and PPS don't usually change (often), and you must be getting your encoder configuration from somewhere (config file?).
If this does not answer your question, provide more detail about e.g. application threads, what event loops are running, encoder lifetimes, etc.
Upvotes: 3