Browse code

lavf: rename remaining av_set_pts_info() to avpriv_set_pts_info().

Clément Bœsch authored on 2011/12/03 08:45:46
Showing 18 changed files
... ...
@@ -39,6 +39,7 @@
39 39
 
40 40
 #include <alsa/asoundlib.h>
41 41
 
42
+#include "libavformat/internal.h"
42 43
 #include "avdevice.h"
43 44
 #include "alsa-audio.h"
44 45
 
... ...
@@ -61,7 +62,7 @@ static av_cold int audio_write_header(AVFormatContext *s1)
61 61
                st->codec->sample_rate, sample_rate);
62 62
         goto fail;
63 63
     }
64
-    av_set_pts_info(st, 64, 1, sample_rate);
64
+    avpriv_set_pts_info(st, 64, 1, sample_rate);
65 65
 
66 66
     return res;
67 67
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "libavutil/parseutils.h"
23 23
 #include "libavutil/opt.h"
24
-
24
+#include "libavformat/internal.h"
25 25
 #include "avdevice.h"
26 26
 #include "dshow.h"
27 27
 
... ...
@@ -739,7 +739,7 @@ dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
739 739
         codec->channels    = fx->nChannels;
740 740
     }
741 741
 
742
-    av_set_pts_info(st, 64, 1, 10000000);
742
+    avpriv_set_pts_info(st, 64, 1, 10000000);
743 743
 
744 744
     ret = 0;
745 745
 
... ...
@@ -35,6 +35,7 @@
35 35
 #include "libavfilter/avfilter.h"
36 36
 #include "libavfilter/avfiltergraph.h"
37 37
 #include "libavfilter/buffersink.h"
38
+#include "libavformat/internal.h"
38 39
 #include "avdevice.h"
39 40
 
40 41
 typedef struct {
... ...
@@ -231,7 +232,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx,
231 231
         AVFilterLink *link = lavfi->sinks[lavfi->stream_sink_map[i]]->inputs[0];
232 232
         AVStream *st = avctx->streams[i];
233 233
         st->codec->codec_type = link->type;
234
-        av_set_pts_info(st, 64, link->time_base.num, link->time_base.den);
234
+        avpriv_set_pts_info(st, 64, link->time_base.num, link->time_base.den);
235 235
         if (link->type == AVMEDIA_TYPE_VIDEO) {
236 236
             st->codec->codec_id   = CODEC_ID_RAWVIDEO;
237 237
             st->codec->pix_fmt    = link->format;
... ...
@@ -25,6 +25,7 @@
25 25
 #include <AL/alc.h>
26 26
 
27 27
 #include "libavutil/opt.h"
28
+#include "libavformat/internal.h"
28 29
 #include "avdevice.h"
29 30
 
30 31
 typedef struct {
... ...
@@ -151,7 +152,7 @@ static int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
151 151
     }
152 152
 
153 153
     /* We work in microseconds */
154
-    av_set_pts_info(st, 64, 1, 1000000);
154
+    avpriv_set_pts_info(st, 64, 1, 1000000);
155 155
 
156 156
     /* Set codec parameters */
157 157
     codec = st->codec;
... ...
@@ -20,6 +20,7 @@
20 20
  */
21 21
 #include "avformat.h"
22 22
 #include "riff.h"
23
+#include "internal.h"
23 24
 #include "libavcodec/get_bits.h"
24 25
 
25 26
 #define CHUNK_SIZE 512
... ...
@@ -88,7 +89,7 @@ static int read_header(AVFormatContext *s,
88 88
 
89 89
     st->codec->frame_size=80;
90 90
     st->codec->channels=1;
91
-    av_set_pts_info(st, 64, 1, 100);
91
+    avpriv_set_pts_info(st, 64, 1, 100);
92 92
 
93 93
     st->codec->codec_id=CODEC_ID_G729;
94 94
 
... ...
@@ -32,6 +32,7 @@
32 32
 
33 33
 #include "libavutil/intreadwrite.h"
34 34
 #include "avformat.h"
35
+#include "internal.h"
35 36
 #include "sauce.h"
36 37
 #include "libavcodec/bintext.h"
37 38
 
... ...
@@ -109,9 +110,9 @@ static AVStream * init_stream(AVFormatContext *s,
109 109
     st->codec->codec_type  = AVMEDIA_TYPE_VIDEO;
110 110
 
111 111
     if (!ap->time_base.num) {
112
-        av_set_pts_info(st, 60, 1, 25);
112
+        avpriv_set_pts_info(st, 60, 1, 25);
113 113
     } else {
114
-        av_set_pts_info(st, 60, ap->time_base.num, ap->time_base.den);
114
+        avpriv_set_pts_info(st, 60, ap->time_base.num, ap->time_base.den);
115 115
     }
116 116
 
117 117
     /* simulate tty display speed */
... ...
@@ -19,6 +19,7 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 #include "avformat.h"
22
+#include "internal.h"
22 23
 #include "libavcodec/get_bits.h"
23 24
 #include "libavcodec/put_bits.h"
24 25
 
... ...
@@ -60,7 +61,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
60 60
     st->codec->block_align = 16;
61 61
     st->codec->channels=1;
62 62
 
63
-    av_set_pts_info(st, 64, 1, 100);
63
+    avpriv_set_pts_info(st, 64, 1, 100);
64 64
     return 0;
65 65
 }
66 66
 
... ...
@@ -420,7 +420,7 @@ static int ea_read_header(AVFormatContext *s,
420 420
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
421 421
         st->codec->codec_tag = 0;  /* no fourcc */
422 422
         if (ea->time_base.num)
423
-            av_set_pts_info(st, 64, ea->time_base.num, ea->time_base.den);
423
+            avpriv_set_pts_info(st, 64, ea->time_base.num, ea->time_base.den);
424 424
         st->codec->width = ea->width;
425 425
         st->codec->height = ea->height;
426 426
     }
... ...
@@ -25,6 +25,7 @@
25 25
  */
26 26
 
27 27
 #include "avformat.h"
28
+#include "internal.h"
28 29
 
29 30
 static const uint8_t frame_size[4] = {24, 20, 4, 1};
30 31
 
... ...
@@ -41,7 +42,7 @@ static int g723_1_init(AVFormatContext *s, AVFormatParameters *ap)
41 41
     st->codec->channels    = 1;
42 42
     st->codec->sample_rate = 8000;
43 43
 
44
-    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
44
+    avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
45 45
 
46 46
     return 0;
47 47
 }
... ...
@@ -20,6 +20,7 @@
20 20
  */
21 21
 
22 22
 #include "avformat.h"
23
+#include "internal.h"
23 24
 #include "libavutil/log.h"
24 25
 #include "libavutil/opt.h"
25 26
 
... ...
@@ -60,7 +61,7 @@ static int g729_read_header(AVFormatContext *s, AVFormatParameters *ap)
60 60
         return AVERROR_INVALIDDATA;
61 61
     }
62 62
 
63
-    av_set_pts_info(st, st->codec->block_align << 3, 1, st->codec->sample_rate);
63
+    avpriv_set_pts_info(st, st->codec->block_align << 3, 1, st->codec->sample_rate);
64 64
     return 0;
65 65
 }
66 66
 static int g729_read_packet(AVFormatContext *s, AVPacket *pkt)
... ...
@@ -27,6 +27,7 @@
27 27
 #include "libavutil/eval.h"
28 28
 #include "libavutil/opt.h"
29 29
 #include "avformat.h"
30
+#include "internal.h"
30 31
 
31 32
 typedef struct ModPlugContext {
32 33
     const AVClass *class;
... ...
@@ -220,7 +221,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
220 220
     st = avformat_new_stream(s, NULL);
221 221
     if (!st)
222 222
         return AVERROR(ENOMEM);
223
-    av_set_pts_info(st, 64, 1, 1000);
223
+    avpriv_set_pts_info(st, 64, 1, 1000);
224 224
     st->duration = ModPlug_GetLength(modplug->f);
225 225
     st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
226 226
     st->codec->codec_id    = CODEC_ID_PCM_S16LE;
... ...
@@ -234,7 +235,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
234 234
         AVStream *vst = avformat_new_stream(s, NULL);
235 235
         if (!vst)
236 236
             return AVERROR(ENOMEM);
237
-        av_set_pts_info(vst, 64, 1, 1000);
237
+        avpriv_set_pts_info(vst, 64, 1, 1000);
238 238
         vst->duration = st->duration;
239 239
         vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
240 240
         vst->codec->codec_id   = CODEC_ID_XBIN;
... ...
@@ -22,6 +22,7 @@
22 22
 #include "libavutil/intreadwrite.h"
23 23
 #include "libavutil/internal.h"
24 24
 #include "avformat.h"
25
+#include "internal.h"
25 26
 #include "rawdec.h"
26 27
 
27 28
 static int loas_probe(AVProbeData *p)
... ...
@@ -72,7 +73,7 @@ static int loas_read_header(AVFormatContext *s,
72 72
     st->need_parsing = AVSTREAM_PARSE_FULL;
73 73
 
74 74
     //LCM of all possible AAC sample rates
75
-    av_set_pts_info(st, 64, 1, 28224000);
75
+    avpriv_set_pts_info(st, 64, 1, 28224000);
76 76
 
77 77
     return 0;
78 78
 }
... ...
@@ -74,7 +74,7 @@ static int microdvd_read_header(AVFormatContext *s, AVFormatParameters *ap)
74 74
             i--;
75 75
         }
76 76
     }
77
-    av_set_pts_info(st, 64, pts_info.den, pts_info.num);
77
+    avpriv_set_pts_info(st, 64, pts_info.den, pts_info.num);
78 78
     st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
79 79
     st->codec->codec_id   = CODEC_ID_MICRODVD;
80 80
     return 0;
... ...
@@ -20,12 +20,13 @@
20 20
  */
21 21
 
22 22
 #include "avformat.h"
23
+#include "internal.h"
23 24
 
24 25
 static int write_header(AVFormatContext *s)
25 26
 {
26 27
     static const char *header = "# timecode format v2\n";
27 28
     put_buffer(s->pb, header, strlen(header));
28
-    av_set_pts_info(s->streams[0], 64, 1, 1000);
29
+    avpriv_set_pts_info(s->streams[0], 64, 1, 1000);
29 30
     return 0;
30 31
 }
31 32
 
... ...
@@ -21,6 +21,7 @@
21 21
 
22 22
 #include "libavutil/intreadwrite.h"
23 23
 #include "avformat.h"
24
+#include "internal.h"
24 25
 
25 26
 typedef struct {
26 27
     int cur_stream;
... ...
@@ -70,7 +71,7 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap)
70 70
 
71 71
     tb_num = avio_rl32(pb);
72 72
     tb_den = avio_rl32(pb);
73
-    av_set_pts_info(vst, 32, tb_num, tb_den);
73
+    avpriv_set_pts_info(vst, 32, tb_num, tb_den);
74 74
     vst->nb_frames = index_cnt;
75 75
     vst->duration = index_cnt;
76 76
 
... ...
@@ -98,7 +99,7 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap)
98 98
         ast->codec->codec_id = audio_codec_id;
99 99
         ast->codec->channels = channels;
100 100
         ast->codec->sample_rate = srate;
101
-        av_set_pts_info(ast, 32, 1, srate);
101
+        avpriv_set_pts_info(ast, 32, 1, srate);
102 102
     }
103 103
     pos = avio_tell(pb) + 4*index_cnt;
104 104
     for (i = 0; i < index_cnt; i++) {
... ...
@@ -498,7 +498,7 @@ static int wav_read_header(AVFormatContext *s,
498 498
             wav->smv_data_ofs = avio_tell(pb) + (size - 5) * 3;
499 499
             avio_rl24(pb);
500 500
             wav->smv_block_size = avio_rl24(pb);
501
-            av_set_pts_info(vst, 32, 1, avio_rl24(pb));
501
+            avpriv_set_pts_info(vst, 32, 1, avio_rl24(pb));
502 502
             vst->duration = avio_rl24(pb);
503 503
             avio_rl24(pb);
504 504
             avio_rl24(pb);
... ...
@@ -570,7 +570,7 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
570 570
     }
571 571
     st->codec->codec_type = codec_type;
572 572
     st->need_parsing      = AVSTREAM_PARSE_FULL;
573
-    av_set_pts_info(st, 64, 1, 10000000);
573
+    avpriv_set_pts_info(st, 64, 1, 10000000);
574 574
     return st;
575 575
 }
576 576
 
... ...
@@ -327,7 +327,7 @@ static int write_stream_data(AVFormatContext *s, AVStream *st, int flag)
327 327
     }
328 328
     finish_chunk(s);
329 329
 
330
-    av_set_pts_info(st, 64, 1, 10000000);
330
+    avpriv_set_pts_info(st, 64, 1, 10000000);
331 331
 
332 332
     return 0;
333 333
 }