[Live-devel] Changes to make it easier to subclass ServerMediaSession and set packet buffer size

Michael Brimer mbrimer at oncamgrandeye.com
Thu Feb 20 05:59:28 PST 2014


Hi,

I would like to request a few changes to liveMedia to assist with subclassing and server instantiation.

Some background:
I'm working on a network camera that needs to be ONVIF profile G compliant. It records matroska video clips which are then represented to an ONVIF client as a single "Recording" with time discontinuities. This means that the SDP description needs to reflect the whole "Recording" rather than the clips which comprise it. Consequently, this information needs to come from a database rather than being returned by video track information discovered in a file.

I have an implementation of this working correctly. However in order to override as little library functionality as possible I found it necessary to patch some items in the library. Of course, I can keep doing that but I am submitting the patch in the hope that some/all of the issues identified could be adopted by the liveMedia library.

Here is a summary of the changes along with a reason for each change.

1. ServerMediaSession::generateSDPDescription() becomes a virtual method. Allows subclass to generate the SDP description in an independent manner e.g. database lookup.

2. ServerMediaSession::duration() becomes a virtual method. Allows subclass to generate the duration in an independent manner e.g. database lookup.

3. Add a virtual method called ServerMediaSession::mediaSdpLines() and modify the implementation of ServerMediaSession::generateSDPDescription() to call mediaSdpLines() instead of calling subsession->sdpLines() directly. Allows subclass to intercept each media track description and append extra attributes. ONVIF complieance requires tracks to be marked with extension attributes e.g. a=x-onvif-track:VIDEO001.

4. Modify MatroskaFile::createSourceForStreaming() implementation to check for larger values of OutPacketBuffer::maxSize before setting 300000 value. Allows server instantiation to set a larger value without it being ignored. With a full field-of-view I'm seeing a few warning messages being emitted during replay and therefore a larger value than 300000 is recommended.

A patch file is attached for your convenience.
If you need any further information please let me know.

Kind Regards,
Mike Brimer
This communication is for the exclusive use of the addressee and may contain information that is private and confidential. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication and its attachments is strictly prohibited. If you have received this information in error please contact the sender and delete the communication from your system. Any views or opinions presented are solely those of the author and do not necessarily represent those of Oncam Grandeye unless specifically stated.


This message has been scanned for malware by Websense. www.websense.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140220/98dc0a1d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-subclass.patch
Type: application/octet-stream
Size: 4272 bytes
Desc: 001-subclass.patch
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140220/98dc0a1d/attachment.obj>


More information about the live-devel mailing list