[FFmpeg-soc] [soc]: r5200 - in concat: ffmpeg.c.diff ffplay.c.diff libavformat/concatgen.c libavformat/m3u.c libavformat/playlist.c libavformat/playlist.h libavformat/pls.c libavformat/utils.c.diff libavformat/...

gkovacs subversion at mplayerhq.hu
Thu Aug 20 16:41:28 CEST 2009


Author: gkovacs
Date: Thu Aug 20 16:41:27 2009
New Revision: 5200

Log:
rename ff_playlist functions to av_playlist

Modified:
   concat/ffmpeg.c.diff
   concat/ffplay.c.diff
   concat/libavformat/concatgen.c
   concat/libavformat/m3u.c
   concat/libavformat/playlist.c
   concat/libavformat/playlist.h
   concat/libavformat/pls.c
   concat/libavformat/utils.c.diff
   concat/libavformat/xspf.c

Modified: concat/ffmpeg.c.diff
==============================================================================
--- concat/ffmpeg.c.diff	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/ffmpeg.c.diff	Thu Aug 20 16:41:27 2009	(r5200)
@@ -1,5 +1,5 @@
 diff --git a/ffmpeg.c b/ffmpeg.c
-index 2686e1d..f0bf445 100644
+index 2686e1d..5b2af7e 100644
 --- a/ffmpeg.c
 +++ b/ffmpeg.c
 @@ -40,6 +40,7 @@
@@ -26,11 +26,11 @@ index 2686e1d..f0bf445 100644
      int got_subtitle;
 +    int stream_offset = 0;
      AVPacket avpkt;
-+    AVPlaylistContext *pl_ctx = ff_playlist_get_context(ic);
++    AVPlaylistContext *pl_ctx = av_playlist_get_context(ic);
  
 +    if (pl_ctx && pkt) {
 +        ist->st = ic->streams[pkt->stream_index];
-+        stream_offset = pkt->stream_index - ff_playlist_localstidx_from_streamidx(pl_ctx, pkt->stream_index);
++        stream_offset = pkt->stream_index - av_playlist_localstidx_from_streamidx(pl_ctx, pkt->stream_index);
 +    }
 +     
      if(ist->next_pts == AV_NOPTS_VALUE)
@@ -59,7 +59,7 @@ index 2686e1d..f0bf445 100644
              av_pkt_dump_log(NULL, AV_LOG_DEBUG, &pkt, do_hex_dump);
          }
 +
-+        pl_ctx = ff_playlist_get_context(is);
++        pl_ctx = av_playlist_get_context(is);
 +        if (pl_ctx) {
 +            if (pkt.stream_index >= nb_istreams &&
 +                pkt.stream_index < is->nb_streams &&
@@ -84,7 +84,7 @@ index 2686e1d..f0bf445 100644
 +                ist->next_pts        = AV_NOPTS_VALUE;
 +                input_files_ts_scale[file_index][pkt.stream_index] = 0.0L;
 +            }
-+            stream_offset = pkt.stream_index - ff_playlist_localstidx_from_streamidx(pl_ctx, pkt.stream_index);
++            stream_offset = pkt.stream_index - av_playlist_localstidx_from_streamidx(pl_ctx, pkt.stream_index);
 +        } else {
 +            stream_offset = 0;
 +        }

Modified: concat/ffplay.c.diff
==============================================================================
--- concat/ffplay.c.diff	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/ffplay.c.diff	Thu Aug 20 16:41:27 2009	(r5200)
@@ -1,5 +1,5 @@
 diff --git a/ffplay.c b/ffplay.c
-index 814efc5..9af171b 100644
+index 814efc5..5e917ac 100644
 --- a/ffplay.c
 +++ b/ffplay.c
 @@ -29,6 +29,8 @@
@@ -19,12 +19,12 @@ index 814efc5..9af171b 100644
 +    AVFrame *frame;
      double pts;
 -
-+    PlaylistContext *pl_ctx;
++    AVPlaylistContext *pl_ctx;
 +    int st_idx = 0;
 +    char tryswitchalready = 0;
 +    AVStream *prevst = NULL;
 +    frame = avcodec_alloc_frame();
-+    pl_ctx = ff_playlist_get_context(is->ic);
++    pl_ctx = av_playlist_get_context(is->ic);
      for(;;) {
          while (is->paused && !is->videoq.abort_request) {
              SDL_Delay(10);
@@ -92,10 +92,10 @@ index 814efc5..9af171b 100644
      double pts;
 -
 +    int st_idx = 0;
-+    PlaylistContext *pl_ctx;
++    AVPlaylistContext *pl_ctx;
 +    AVStream *prevst = NULL;
 +    char tryswitchalready = 0;
-+    pl_ctx = ff_playlist_get_context(is->ic);
++    pl_ctx = av_playlist_get_context(is->ic);
      for(;;) {
 -        /* NOTE: the audio packet can contain several frames */
          while (pkt_temp->size > 0) {

Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/concatgen.c	Thu Aug 20 16:41:27 2009	(r5200)
@@ -52,11 +52,11 @@ int ff_concatgen_read_packet(AVFormatCon
         }
         if (ret >= 0) {
             if (pkt) {
-                stream_index = ff_playlist_localstidx_from_streamidx(ctx, pkt->stream_index);
-                pkt->stream_index = stream_index + ff_playlist_streams_offset_from_playidx(ctx, ctx->pe_curidx);
+                stream_index = av_playlist_localstidx_from_streamidx(ctx, pkt->stream_index);
+                pkt->stream_index = stream_index + av_playlist_streams_offset_from_playidx(ctx, ctx->pe_curidx);
                 if (!ic->streams[stream_index]->codec->has_b_frames ||
                     ic->streams[stream_index]->codec->codec->id == CODEC_ID_MPEG1VIDEO) {
-                    pkt->dts += av_rescale_q(ff_playlist_time_offset(ctx->durations, ctx->pe_curidx),
+                    pkt->dts += av_rescale_q(av_playlist_time_offset(ctx->durations, ctx->pe_curidx),
                                              AV_TIME_BASE_Q,
                                              ic->streams[stream_index]->time_base);
                     pkt->pts = pkt->dts + 1;
@@ -71,11 +71,11 @@ int ff_concatgen_read_packet(AVFormatCon
 
                 av_log(ic, AV_LOG_DEBUG, "Switching stream %d to %d\n", stream_index, ctx->pe_curidx+1);
                 ctx->durations[ctx->pe_curidx] = ic->duration;
-                ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx,
-                                                                    ff_playlist_time_offset(ctx->durations, ctx->pe_curidx),
+                ctx->pe_curidx = av_playlist_stream_index_from_time(ctx,
+                                                                    av_playlist_time_offset(ctx->durations, ctx->pe_curidx),
                                                                     NULL);
-                ff_playlist_populate_context(ctx, ctx->pe_curidx);
-                ff_playlist_set_streams(s);
+                av_playlist_populate_context(ctx, ctx->pe_curidx);
+                av_playlist_set_streams(s);
                 // have_switched_streams is set to avoid infinite loop
                 have_switched_streams = 1;
                 // duration is updated in case it's checked by a parent demuxer (chained concat demuxers)
@@ -107,11 +107,11 @@ int ff_concatgen_read_seek(AVFormatConte
     pts_avtimebase = av_rescale_q(pts,
                                   ic->streams[stream_index]->time_base,
                                   AV_TIME_BASE_Q);
-    ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx,
+    ctx->pe_curidx = av_playlist_stream_index_from_time(ctx,
                                                         pts_avtimebase,
                                                         &localpts_avtimebase);
-    ff_playlist_populate_context(ctx, ctx->pe_curidx);
-    ff_playlist_set_streams(s);
+    av_playlist_populate_context(ctx, ctx->pe_curidx);
+    av_playlist_set_streams(s);
     ic = ctx->icl[ctx->pe_curidx];
     localpts = av_rescale_q(localpts_avtimebase,
                             AV_TIME_BASE_Q,

Modified: concat/libavformat/m3u.c
==============================================================================
--- concat/libavformat/m3u.c	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/m3u.c	Thu Aug 20 16:41:27 2009	(r5200)
@@ -67,9 +67,9 @@ static int m3u_list_files(ByteIOContext 
         flist[i++][q-linebuf] = 0;
     }
     flist[i] = 0;
-    ff_playlist_relative_paths(flist, i, dirname(filename));
+    av_playlist_relative_paths(flist, i, dirname(filename));
     for (k = 0; k < i; ++k)
-        ff_playlist_add_path(ctx, flist[k]);
+        av_playlist_add_path(ctx, flist[k]);
     av_free(flist);
     return 0;
 }
@@ -80,8 +80,8 @@ static int m3u_read_header(AVFormatConte
     AVPlaylistContext *ctx = av_mallocz(sizeof(*ctx));
     m3u_list_files(s->pb, ctx, s->filename);
     s->priv_data = ctx;
-    ff_playlist_populate_context(ctx, ctx->pe_curidx);
-    ff_playlist_set_streams(s);
+    av_playlist_populate_context(ctx, ctx->pe_curidx);
+    av_playlist_set_streams(s);
     return 0;
 }
 

Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/playlist.c	Thu Aug 20 16:41:27 2009	(r5200)
@@ -36,7 +36,7 @@
 #include "internal.h"
 #include "concat.h"
 
-AVFormatContext *ff_playlist_alloc_formatcontext(char *filename)
+AVFormatContext *av_playlist_alloc_formatcontext(char *filename)
 {
     int err;
     AVFormatContext *ic = avformat_alloc_context();
@@ -49,22 +49,22 @@ AVFormatContext *ff_playlist_alloc_forma
     return ic;
 }
 
-void ff_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
+void av_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
 {
     ctx->icl = av_realloc(ctx->icl, sizeof(*(ctx->icl)) * (pe_curidx+2));
     ctx->icl[pe_curidx+1] = NULL;
-    ctx->icl[pe_curidx] = ff_playlist_alloc_formatcontext(ctx->flist[pe_curidx]);
+    ctx->icl[pe_curidx] = av_playlist_alloc_formatcontext(ctx->flist[pe_curidx]);
     ctx->nb_streams_list[pe_curidx] = ctx->icl[pe_curidx]->nb_streams;
 }
 
-void ff_playlist_set_streams(AVFormatContext *s)
+void av_playlist_set_streams(AVFormatContext *s)
 {
     int i;
     int offset;
     AVFormatContext *ic;
     AVPlaylistContext *ctx = s->priv_data;
     ic = ctx->icl[ctx->pe_curidx];
-    offset = ff_playlist_streams_offset_from_playidx(ctx, ctx->pe_curidx);
+    offset = av_playlist_streams_offset_from_playidx(ctx, ctx->pe_curidx);
     ic->iformat->read_header(ic, NULL);
     for (i = 0; i < ic->nb_streams; ++i) {
         s->streams[offset + i] = ic->streams[i];
@@ -88,7 +88,7 @@ void ff_playlist_set_streams(AVFormatCon
     s->packet_buffer_end = ic->packet_buffer_end;
 }
 
-AVPlaylistContext *ff_playlist_get_context(AVFormatContext *ic)
+AVPlaylistContext *av_playlist_get_context(AVFormatContext *ic)
 {
     if (ic && ic->iformat && ic->iformat->long_name && ic->priv_data &&
         !strncmp(ic->iformat->long_name, "CONCAT", 6))
@@ -97,13 +97,13 @@ AVPlaylistContext *ff_playlist_get_conte
         return NULL;
 }
 
-AVFormatContext *ff_playlist_formatcontext_from_filelist(const char **flist, int len)
+AVFormatContext *av_playlist_formatcontext_from_filelist(const char **flist, int len)
 {
     AVPlaylistContext *ctx;
     AVFormatContext *ic;
-    ctx = ff_playlist_from_filelist(flist, len);
+    ctx = av_playlist_from_filelist(flist, len);
     if (!ctx) {
-        av_log(NULL, AV_LOG_ERROR, "failed to create AVPlaylistContext in ff_playlist_formatcontext_from_filelist\n");
+        av_log(NULL, AV_LOG_ERROR, "failed to create AVPlaylistContext in av_playlist_formatcontext_from_filelist\n");
         return NULL;
     }
     ic = avformat_alloc_context();
@@ -112,7 +112,7 @@ AVFormatContext *ff_playlist_formatconte
     return ic;
 }
 
-void ff_playlist_split_encodedstring(const char *s,
+void av_playlist_split_encodedstring(const char *s,
                                      const char sep,
                                      char ***flist_ptr,
                                      int *len_ptr)
@@ -129,7 +129,7 @@ void ff_playlist_split_encodedstring(con
             sepidx[len] = ts-s;
             sepidx = av_fast_realloc(sepidx, &buflen, ++len);
             if (!sepidx) {
-                av_log(NULL, AV_LOG_ERROR, "av_fast_realloc error in ff_playlist_split_encodedstring\n");
+                av_log(NULL, AV_LOG_ERROR, "av_fast_realloc error in av_playlist_split_encodedstring\n");
                 continue;
             }
         }
@@ -142,7 +142,7 @@ void ff_playlist_split_encodedstring(con
     for (i = 0; i < len; ++i) {
         flist[i] = av_malloc(sepidx[i+1]-sepidx[i]);
         if (!flist[i]) {
-            av_log(NULL, AV_LOG_ERROR, "av_malloc error in ff_playlist_split_encodedstring\n");
+            av_log(NULL, AV_LOG_ERROR, "av_malloc error in av_playlist_split_encodedstring\n");
             continue;
         }
         av_strlcpy(flist[i], ts+sepidx[i], sepidx[i+1]-sepidx[i]);
@@ -150,38 +150,38 @@ void ff_playlist_split_encodedstring(con
     av_free(sepidx);
 }
 
-AVPlaylistContext *ff_playlist_from_filelist(const char **flist, int len)
+AVPlaylistContext *av_playlist_from_filelist(const char **flist, int len)
 {
     int i;
     AVPlaylistContext *ctx;
     ctx = av_mallocz(sizeof(*ctx));
     if (!ctx) {
-        av_log(NULL, AV_LOG_ERROR, "av_mallocz error in ff_playlist_from_encodedstring\n");
+        av_log(NULL, AV_LOG_ERROR, "av_mallocz error in av_playlist_from_encodedstring\n");
         return NULL;
     }
     for (i = 0; i < len; ++i)
-        ff_playlist_add_path(ctx, flist[i]);
+        av_playlist_add_path(ctx, flist[i]);
     return ctx;
 }
 
-AVPlaylistContext *ff_playlist_from_encodedstring(const char *s, const char sep)
+AVPlaylistContext *av_playlist_from_encodedstring(const char *s, const char sep)
 {
     AVPlaylistContext *ctx;
     char **flist;
     int i, len;
-    ff_playlist_split_encodedstring(s, sep, &flist, &len);
+    av_playlist_split_encodedstring(s, sep, &flist, &len);
     if (len <= 1) {
         for (i = 0; i < len; ++i)
             av_free(flist[i]);
         av_free(flist);
         return NULL;
     }
-    ctx = ff_playlist_from_filelist(flist, len);
+    ctx = av_playlist_from_filelist(flist, len);
     av_free(flist);
     return ctx;
 }
 
-void ff_playlist_add_path(AVPlaylistContext *ctx, const char *itempath)
+void av_playlist_add_path(AVPlaylistContext *ctx, const char *itempath)
 {
     ctx->flist = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * (++ctx->pelist_size+1));
     ctx->flist[ctx->pelist_size] = NULL;
@@ -194,7 +194,7 @@ void ff_playlist_add_path(AVPlaylistCont
     ctx->nb_streams_list[ctx->pelist_size] = 0;
 }
 
-void ff_playlist_relative_paths(char **flist,
+void av_playlist_relative_paths(char **flist,
                                 int len,
                                 const char *workingdir)
 {
@@ -213,7 +213,7 @@ void ff_playlist_relative_paths(char **f
     }
 }
 
-int64_t ff_playlist_time_offset(const int64_t *durations, int pe_curidx)
+int64_t av_playlist_time_offset(const int64_t *durations, int pe_curidx)
 {
     int i;
     int64_t total = 0;
@@ -223,7 +223,7 @@ int64_t ff_playlist_time_offset(const in
     return total;
 }
 
-int ff_playlist_stream_index_from_time(AVPlaylistContext *ctx,
+int av_playlist_stream_index_from_time(AVPlaylistContext *ctx,
                                        int64_t pts,
                                        int64_t *localpts)
 {
@@ -240,7 +240,7 @@ int ff_playlist_stream_index_from_time(A
     return i;
 }
 
-int ff_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
+int av_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
 {
     int i, total;
     i = total = 0;
@@ -249,7 +249,7 @@ int ff_playlist_playidx_from_streamidx(A
     return i-1;
 }
 
-int ff_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
+int av_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
 {
     int i, total;
     i = total = 0;
@@ -258,7 +258,7 @@ int ff_playlist_localstidx_from_streamid
     return stream_index - (total - ctx->nb_streams_list[i-1]);
 }
 
-int ff_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx)
+int av_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx)
 {
     int i, total;
     i = total = 0;

Modified: concat/libavformat/playlist.h
==============================================================================
--- concat/libavformat/playlist.h	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/playlist.h	Thu Aug 20 16:41:27 2009	(r5200)
@@ -48,127 +48,127 @@ typedef struct AVPlaylistContext {
     int *nb_streams_list;  /**< List of the number of streams in each playlist item*/
 } AVPlaylistContext;
 
-/** @fn AVFormatContext *ff_playlist_alloc_formatcontext(char *filename)
+/** @fn AVFormatContext *av_playlist_alloc_formatcontext(char *filename)
  *  @brief Allocates and opens file, codecs, and streams associated with filename.
  *  @param filename Null-terminated string of file to open.
  *  @return Returns an allocated AVFormatContext.
  */
-AVFormatContext *ff_playlist_alloc_formatcontext(char *filename);
+AVFormatContext *av_playlist_alloc_formatcontext(char *filename);
 
-/** @fn void ff_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
+/** @fn void av_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
  *  @brief Opens the playlist element with the specified index from the AVPlaylistContext.
  *  @param ctx AVPlaylistContext containing the desired playlist element.
  *  @param pe_curidx Index of the playlist element to be opened.
  */
-void ff_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx);
+void av_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx);
 
-/** @fn void ff_playlist_set_streams(AVFormatContext *s)
+/** @fn void av_playlist_set_streams(AVFormatContext *s)
  *  @brief Sets the master concat-type demuxer's streams to those of its currently opened playlist element.
  *  @param s AVFormatContext of the concat-type demuxer, which contains the AVPlaylistContext and substreams.
  */
-void ff_playlist_set_streams(AVFormatContext *s);
+void av_playlist_set_streams(AVFormatContext *s);
 
-/** @fn ff_playlist_formatcontext_from_filelist(const char **flist, int len)
+/** @fn av_playlist_formatcontext_from_filelist(const char **flist, int len)
  *  @brief Allocates and populates a new AVFormatContext for a concat-type demuxer.
  *  @param flist List of filenames from which to construct the playlist.
  *  @param len Length of filename list.
  *  @return Returns NULL if failed, or AVFormatContext if succeeded.
  */
-AVFormatContext *ff_playlist_formatcontext_from_filelist(const char **flist, int len);
+AVFormatContext *av_playlist_formatcontext_from_filelist(const char **flist, int len);
 
-/** @fn AVPlaylistContext* ff_playlist_get_context(AVFormatContext *ic)
+/** @fn AVPlaylistContext* av_playlist_get_context(AVFormatContext *ic)
  *  @brief Returns AVPlaylistContext continaed within a concat-type demuxer.
  *  @param ic AVFormatContext of the concat-type demuxer, which contains the AVPlaylistContext.
  *  @return Returns NULL if failed (not concat-type demuxer or Playlist not yet allocated), or AVPlaylistContext if succeeded.
  */
-AVPlaylistContext* ff_playlist_get_context(AVFormatContext *ic);
+AVPlaylistContext* av_playlist_get_context(AVFormatContext *ic);
 
-/** @fn void ff_playlist_relative_paths(char **flist, int len, const char *workingdir)
+/** @fn void av_playlist_relative_paths(char **flist, int len, const char *workingdir)
  *  @brief Converts a list of mixed relative or absolute paths into all absolute paths.
  *  @param flist List of null-terminated strings of relative or absolute paths.
  *  @param len Number of paths in flist.
  *  @param workingdir Path that strings in flist are relative to.
  */
-void ff_playlist_relative_paths(char **flist,
+void av_playlist_relative_paths(char **flist,
                                 int len,
                                 const char *workingdir);
 
-/** @fn void ff_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr)
+/** @fn void av_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr)
  *  @brief Splits a character-delimited string into a list of strings.
  *  @param s The input character-delimited string ("one,two,three").
  *  @param sep The delimiter character (',').
  *  @param flist_ptr Pointer to string list which will be allocated by function.
  *  @param len_ptr Number of segments the string was split into.
  */
-void ff_playlist_split_encodedstring(const char *s,
+void av_playlist_split_encodedstring(const char *s,
                                      const char sep,
                                      char ***flist_ptr,
                                      int *len_ptr);
 
-/** @fn AVPlaylistContext *ff_playlist_from_filelist(const char **flist, int len)
+/** @fn AVPlaylistContext *av_playlist_from_filelist(const char **flist, int len)
  *  @brief Allocates and returns a AVPlaylistContext with playlist elements specified by a file list.
  *  @param flist List of filenames from which to construct the playlist.
  *  @param len Length of filename list.
  *  @return Returns the allocated AVPlaylistContext.
  */
-AVPlaylistContext *ff_playlist_from_filelist(const char **flist, int len);
+AVPlaylistContext *av_playlist_from_filelist(const char **flist, int len);
 
-/** @fn AVPlaylistContext *ff_playlist_from_encodedstring(char *s, char sep)
+/** @fn AVPlaylistContext *av_playlist_from_encodedstring(char *s, char sep)
  *  @brief Allocates and returns a AVPlaylistContext with playlist elements specified by a character-delimited string.
  *  @param s The input character-delimited string ("one,two,three").
  *  @param sep The delimiter character (',').
  *  @return Returns the allocated AVPlaylistContext.
  */
-AVPlaylistContext *ff_playlist_from_encodedstring(const char *s, const char sep);
+AVPlaylistContext *av_playlist_from_encodedstring(const char *s, const char sep);
 
-/** @fn void ff_playlist_add_path(AVPlaylistContext *ctx, char *itempath)
+/** @fn void av_playlist_add_path(AVPlaylistContext *ctx, char *itempath)
  *  @brief Adds PlayElem for item located at specified path to a AVPlaylistContext.
  *  @param ctx Pre-allocated AVPlaylistContext to add elements to.
  *  @param itempath Absolute path to item for which to add a playlist element.
  */
-void ff_playlist_add_path(AVPlaylistContext *ctx, const char *itempath);
+void av_playlist_add_path(AVPlaylistContext *ctx, const char *itempath);
 
-/** @fn int64_t ff_playlist_time_offset(int64_t *durations, int pe_curidx)
+/** @fn int64_t av_playlist_time_offset(int64_t *durations, int pe_curidx)
  *  @brief Calculates the total time offset of an element in a AVPlaylistContext in AV_TIME_BASE units.
  *  @param durations Durations of playlist items in AV_TIME_BASE units, array must be of size greater than or equal to pe_curidx.
  *  @param pe_curidx Index of the playlist element for which to calculate the time offset.
  *  @return Returns the time offset in AV_TIME_BASE units.
  */
-int64_t ff_playlist_time_offset(const int64_t *durations, int pe_curidx);
+int64_t av_playlist_time_offset(const int64_t *durations, int pe_curidx);
 
-/** @fn int ff_playlist_stream_index_from_time(AVPlaylistContext *ctx, int64_t pts, int64_t *localpts)
+/** @fn int av_playlist_stream_index_from_time(AVPlaylistContext *ctx, int64_t pts, int64_t *localpts)
  *  @brief Calculates the index of the playlist item which would contain the timestamp specified in AV_TIME_BASE units.
  *  @param ctx AVPlaylistContext within which the list of playlist elements and durations are stored.
  *  @param pts Timestamp in AV_TIME_BASE.
  *  @param localpts Time in the local demuxer's timeframe in AV_TIME_BASE units; if null, not calculated.
  *  @return Returns the index of the stream which covers the specified time range.
  */
-int ff_playlist_stream_index_from_time(AVPlaylistContext *ctx,
+int av_playlist_stream_index_from_time(AVPlaylistContext *ctx,
                                        int64_t pts,
                                        int64_t *localpts);
 
-/** @fn int ff_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
+/** @fn int av_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
  *  @brief Calculates the index of the playlist item which contains the specified stream index.
  *  @param ctx AVPlaylistContext within which the list of playlist elements and durations are stored.
  *  @param stream_index Global stream index, the index of the stream within the playlist demuxer.
  *  @return Returns the index of the playlist item which contains the specified stream index.
  */
-int ff_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index);
+int av_playlist_playidx_from_streamidx(AVPlaylistContext *ctx, int stream_index);
 
-/** @fn int ff_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
+/** @fn int av_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index)
  *  @brief Calculates the local stream index which corresponds to a global stream index.
  *  @param ctx AVPlaylistContext within which the list of playlist elements and durations are stored.
  *  @param stream_index Global stream index, the index of the stream within the playlist demuxer.
  *  @return Returns the local stream index, the index of the stream within the child demuxer.
  */
-int ff_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index);
+int av_playlist_localstidx_from_streamidx(AVPlaylistContext *ctx, int stream_index);
 
-/** @fn int ff_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx)
+/** @fn int av_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx)
  *  @brief Calculates the stream offset which corresponds to the given playlist item index.
  *  @param ctx AVPlaylistContext within which the list of playlist elements and durations are stored.
  *  @param playidx Playlist item index, the index of the child demuxer within ctx->icl.
  *  @return Returns the stream offset, which is global stream index - local stream index.
  */
-int ff_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx);
+int av_playlist_streams_offset_from_playidx(AVPlaylistContext *ctx, int playidx);
 
 #endif /* AVFORMAT_PLAYLIST_H */

Modified: concat/libavformat/pls.c
==============================================================================
--- concat/libavformat/pls.c	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/pls.c	Thu Aug 20 16:41:27 2009	(r5200)
@@ -88,9 +88,9 @@ static int pls_list_files(ByteIOContext 
     if (!flist) // no files have been found
         return AVERROR_EOF;
     flist[j] = 0;
-    ff_playlist_relative_paths(flist, j, dirname(filename));
+    av_playlist_relative_paths(flist, j, dirname(filename));
     for (k = 0; k < j; ++k)
-        ff_playlist_add_path(ctx, flist[k]);
+        av_playlist_add_path(ctx, flist[k]);
     av_free(flist);
     return 0;
 }
@@ -104,8 +104,8 @@ static int pls_read_header(AVFormatConte
         return AVERROR_EOF;
     }
     s->priv_data = ctx;
-    ff_playlist_populate_context(ctx, ctx->pe_curidx);
-    ff_playlist_set_streams(s);
+    av_playlist_populate_context(ctx, ctx->pe_curidx);
+    av_playlist_set_streams(s);
     return 0;
 }
 

Modified: concat/libavformat/utils.c.diff
==============================================================================
--- concat/libavformat/utils.c.diff	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/utils.c.diff	Thu Aug 20 16:41:27 2009	(r5200)
@@ -1,5 +1,5 @@
 diff --git a/libavformat/utils.c b/libavformat/utils.c
-index b9f6c00..31a6268 100644
+index b9f6c00..7f03651 100644
 --- a/libavformat/utils.c
 +++ b/libavformat/utils.c
 @@ -27,6 +27,7 @@
@@ -24,16 +24,16 @@ index b9f6c00..31a6268 100644
          fmt = av_probe_input_format(pd, 0);
      }
  
-+    ff_playlist_split_encodedstring(filename, ',', &flist, &flist_len);
++    av_playlist_split_encodedstring(filename, ',', &flist, &flist_len);
 +    if (flist && flist_len > 1) {
-+        AVFormatContext *ic = ff_playlist_formatcontext_from_filelist(flist, flist_len);
++        AVFormatContext *ic = av_playlist_formatcontext_from_filelist(flist, flist_len);
 +        if (ic) {
-+            AVPlaylistContext *playlist_ctx = ff_playlist_get_context(ic);
++            AVPlaylistContext *playlist_ctx = av_playlist_get_context(ic);
 +            if (playlist_ctx) {
 +                av_log(ic, AV_LOG_DEBUG, "Generating playlist from %s\n", filename);
 +                av_strlcpy(ic->filename, filename, sizeof(ic->filename));
-+                ff_playlist_populate_context(playlist_ctx, playlist_ctx->pe_curidx);
-+                ff_playlist_set_streams(ic);
++                av_playlist_populate_context(playlist_ctx, playlist_ctx->pe_curidx);
++                av_playlist_set_streams(ic);
 +                *ic_ptr = ic;
 +                return 0;
 +            }

Modified: concat/libavformat/xspf.c
==============================================================================
--- concat/libavformat/xspf.c	Thu Aug 20 16:35:45 2009	(r5199)
+++ concat/libavformat/xspf.c	Thu Aug 20 16:41:27 2009	(r5200)
@@ -111,9 +111,9 @@ static int xspf_list_files(ByteIOContext
     if (!flist) // no files have been found
         return AVERROR_EOF;
     flist[j] = 0;
-    ff_playlist_relative_paths(flist, j, dirname(filename));
+    av_playlist_relative_paths(flist, j, dirname(filename));
     for (k = 0; k < j; ++k)
-        ff_playlist_add_path(ctx, flist[k]);
+        av_playlist_add_path(ctx, flist[k]);
     av_free(flist);
     return 0;
 }
@@ -127,8 +127,8 @@ static int xspf_read_header(AVFormatCont
         return AVERROR_EOF;
     }
     s->priv_data = ctx;
-    ff_playlist_populate_context(ctx, ctx->pe_curidx);
-    ff_playlist_set_streams(s);
+    av_playlist_populate_context(ctx, ctx->pe_curidx);
+    av_playlist_set_streams(s);
     return 0;
 }
 


More information about the FFmpeg-soc mailing list