[FFmpeg-devel] [RFC] SDP Generation

Luca Abeni lucabe72
Thu Jul 12 09:44:46 CEST 2007


Hi all,

I finally had some time to work on my SDP generator again, and here is a 
new version, which hopefully incorporates all the feedback I received.

Changes since last version:
1) fixed the broken digit_to_char() implementation
2) switched from url_fprintf to snprintf(). To avoid code repetition, I 
introduced an sdp_print() helper function (better names for it are 
welcome ;-)
3) removed attribute_write(), and merged some print()s
4) changed
	int is_multicast;
         is_multicast = ...
    into
         int is_multicast = ...
5) merged the for() cycles in avf_sdp_create()

The only comment I did not follow is the removal of dest_write(): since 
- it is called in two different points during the SDP generations
- it must print something only if dest_addr != NULL
- the format of the printed string depends on the TTL value
I think that merging dest_write() in an sdp_print() would result in more 
complex and less readable code... I hope that this version is acceptable.


I tested this SDP generator for some time (I have patches for using it 
in ffmpeg.c and ffserver.c... I'll send them once sdp.c is in), and it 
seems to work reasonably well. My impression is that sdp.c could be 
acceptable for svn (I think the three FIXMEs are not important, adn can 
be fixed later). So, I added a license header (copied from avformat.h), 
and I am sending it again.


				Thanks,
					Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdp.c
Type: text/x-csrc
Size: 6843 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070712/e5c68649/attachment.c>



More information about the ffmpeg-devel mailing list