[FFmpeg-devel] [RFC] Split rtp.h

Luca Abeni lucabe72
Wed Feb 4 15:02:04 CET 2009


Hi all,

the attached patch splits the current rtp.h in three files:
a "common" rtp.h, rtpdec.h used by the demuxer, and rtpenc.h
used by the muxer.

To do so, a new "RTPMuxContext" is created, ad "RTPDemuxContext"
is simplified removing the fields used by the muxer.
Also, the AAC packetiser was abusing a field of the RTPDemuxContext
(read_buf_index) by using it for storing the number of AAC frames
contained in a packet. When creating RTPMuxContext, I did not copy
the read_buf_index field in it, but I named the field "num_frames".
As a result, the patch contains things like
-    if ((s->read_buf_index == MAX_FRAMES_PER_PACKET) || (len && (len + size) > max_packet_size)) {
-        int au_size = s->read_buf_index * 2;
+    if ((s->num_frames == MAX_FRAMES_PER_PACKET) || (len && (len + size) > max_packet_size)) {
+        int au_size = s->num_frames * 2;

Finally, the patch also removes some useless .h files, merging them
in the newly created rtpenc.h.

I see all this as a single change, but I understand that people might
want this committed in smaller steps. Just let me know the "level of
split" which is desired, and I'll work on it.



				Thanks,
					Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: split_rtp_h.diff
Type: text/x-diff
Size: 29252 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090204/d0f9f98e/attachment.diff>



More information about the ffmpeg-devel mailing list