[FFmpeg-cvslog] r23233 - in branches/0.6: . libavformat/internal.h libavformat/sdp.c

mstorsjo subversion
Fri May 21 23:43:40 CEST 2010


Author: mstorsjo
Date: Fri May 21 23:43:40 2010
New Revision: 23233

Log:
Make ff_sdp_write_media a lavf-internal function

This is in preparation for RTP hinting in the MOV muxer, where
it needs to be able to create SDP fragments for each media stream.


backport r23160 by mstorsjo

Modified:
   branches/0.6/   (props changed)
   branches/0.6/libavformat/internal.h
   branches/0.6/libavformat/sdp.c

Modified: branches/0.6/libavformat/internal.h
==============================================================================
--- branches/0.6/libavformat/internal.h	Fri May 21 23:41:38 2010	(r23232)
+++ branches/0.6/libavformat/internal.h	Fri May 21 23:43:40 2010	(r23233)
@@ -137,4 +137,21 @@ int ff_url_join(char *str, int size, con
                 const char *authorization, const char *hostname,
                 int port, const char *fmt, ...);
 
+/**
+ * Appends the media-specific SDP fragment for the media stream c
+ * to the buffer buff.
+ *
+ * Note, the buffer needs to be initialized, since it is appended to
+ * existing content.
+ *
+ * @param buff the buffer to append the SDP fragment to
+ * @param size the size of the buff buffer
+ * @param c the AVCodecContext of the media to describe
+ * @param dest_addr the destination address of the media stream, may be NULL
+ * @param port the destination port of the media stream, 0 if unknown
+ * @param ttl the time to live of the stream, 0 if not multicast
+ */
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
+                        const char *dest_addr, int port, int ttl);
+
 #endif /* AVFORMAT_INTERNAL_H */

Modified: branches/0.6/libavformat/sdp.c
==============================================================================
--- branches/0.6/libavformat/sdp.c	Fri May 21 23:41:38 2010	(r23232)
+++ branches/0.6/libavformat/sdp.c	Fri May 21 23:43:40 2010	(r23233)
@@ -294,7 +294,7 @@ static char *sdp_write_media_attributes(
     return buff;
 }
 
-static void sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, int port, int ttl)
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, int port, int ttl)
 {
     const char *type;
     int payload_type;
@@ -352,7 +352,7 @@ int avf_sdp_create(AVFormatContext *ac[]
             resolve_destination(dst, sizeof(dst));
         }
         for (j = 0; j < ac[i]->nb_streams; j++) {
-            sdp_write_media(buff, size,
+            ff_sdp_write_media(buff, size,
                                   ac[i]->streams[j]->codec, dst[0] ? dst : NULL,
                                   (port > 0) ? port + j * 2 : 0, ttl);
             if (port <= 0) {
@@ -369,4 +369,9 @@ int avf_sdp_create(AVFormatContext *ac[]
 {
     return AVERROR(ENOSYS);
 }
+
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
+                        const char *dest_addr, int port, int ttl)
+{
+}
 #endif



More information about the ffmpeg-cvslog mailing list