There is no reason for it to be public, it's only meant to be used
internally.
| ... | ... |
@@ -1374,23 +1374,15 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); |
| 1374 | 1374 |
*/ |
| 1375 | 1375 |
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); |
| 1376 | 1376 |
|
| 1377 |
+#if FF_API_INTERLEAVE_PACKET |
|
| 1377 | 1378 |
/** |
| 1378 |
- * Interleave a packet per dts in an output media file. |
|
| 1379 |
- * |
|
| 1380 |
- * Packets with pkt->destruct == av_destruct_packet will be freed inside this |
|
| 1381 |
- * function, so they cannot be used after it. Note that calling av_free_packet() |
|
| 1382 |
- * on them is still safe. |
|
| 1383 |
- * |
|
| 1384 |
- * @param s media file handle |
|
| 1385 |
- * @param out the interleaved packet will be output here |
|
| 1386 |
- * @param pkt the input packet |
|
| 1387 |
- * @param flush 1 if no further packets are available as input and all |
|
| 1388 |
- * remaining packets should be output |
|
| 1389 |
- * @return 1 if a packet was output, 0 if no packet could be output, |
|
| 1390 |
- * < 0 if an error occurred |
|
| 1379 |
+ * @deprecated this function was never meant to be called by the user |
|
| 1380 |
+ * programs. |
|
| 1391 | 1381 |
*/ |
| 1382 |
+attribute_deprecated |
|
| 1392 | 1383 |
int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, |
| 1393 | 1384 |
AVPacket *pkt, int flush); |
| 1385 |
+#endif |
|
| 1394 | 1386 |
|
| 1395 | 1387 |
/** |
| 1396 | 1388 |
* Write the stream trailer to an output media file and free the |
| ... | ... |
@@ -936,7 +936,7 @@ static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pk |
| 936 | 936 |
if (pkt && s->streams[pkt->stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 937 | 937 |
pkt->duration = 2; // enforce 2 fields |
| 938 | 938 |
return ff_audio_rechunk_interleave(s, out, pkt, flush, |
| 939 |
- av_interleave_packet_per_dts, gxf_compare_field_nb); |
|
| 939 |
+ ff_interleave_packet_per_dts, gxf_compare_field_nb); |
|
| 940 | 940 |
} |
| 941 | 941 |
|
| 942 | 942 |
AVOutputFormat ff_gxf_muxer = {
|
| ... | ... |
@@ -327,4 +327,22 @@ int ff_framehash_write_header(AVFormatContext *s); |
| 327 | 327 |
*/ |
| 328 | 328 |
int ff_read_packet(AVFormatContext *s, AVPacket *pkt); |
| 329 | 329 |
|
| 330 |
+/** |
|
| 331 |
+ * Interleave a packet per dts in an output media file. |
|
| 332 |
+ * |
|
| 333 |
+ * Packets with pkt->destruct == av_destruct_packet will be freed inside this |
|
| 334 |
+ * function, so they cannot be used after it. Note that calling av_free_packet() |
|
| 335 |
+ * on them is still safe. |
|
| 336 |
+ * |
|
| 337 |
+ * @param s media file handle |
|
| 338 |
+ * @param out the interleaved packet will be output here |
|
| 339 |
+ * @param pkt the input packet |
|
| 340 |
+ * @param flush 1 if no further packets are available as input and all |
|
| 341 |
+ * remaining packets should be output |
|
| 342 |
+ * @return 1 if a packet was output, 0 if no packet could be output, |
|
| 343 |
+ * < 0 if an error occurred |
|
| 344 |
+ */ |
|
| 345 |
+int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, |
|
| 346 |
+ AVPacket *pkt, int flush); |
|
| 347 |
+ |
|
| 330 | 348 |
#endif /* AVFORMAT_INTERNAL_H */ |
| ... | ... |
@@ -3068,7 +3068,9 @@ static int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacke |
| 3068 | 3068 |
return comp > 0; |
| 3069 | 3069 |
} |
| 3070 | 3070 |
|
| 3071 |
-int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){
|
|
| 3071 |
+int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, |
|
| 3072 |
+ AVPacket *pkt, int flush) |
|
| 3073 |
+{
|
|
| 3072 | 3074 |
AVPacketList *pktl; |
| 3073 | 3075 |
int stream_count=0; |
| 3074 | 3076 |
int i; |
| ... | ... |
@@ -3098,6 +3100,14 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pk |
| 3098 | 3098 |
} |
| 3099 | 3099 |
} |
| 3100 | 3100 |
|
| 3101 |
+#if FF_API_INTERLEAVE_PACKET |
|
| 3102 |
+int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, |
|
| 3103 |
+ AVPacket *pkt, int flush) |
|
| 3104 |
+{
|
|
| 3105 |
+ return ff_interleave_packet_per_dts(s, out, pkt, flush); |
|
| 3106 |
+} |
|
| 3107 |
+#endif |
|
| 3108 |
+ |
|
| 3101 | 3109 |
/** |
| 3102 | 3110 |
* Interleave an AVPacket correctly so it can be muxed. |
| 3103 | 3111 |
* @param out the interleaved packet will be output here |
| ... | ... |
@@ -3114,7 +3124,7 @@ static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, in |
| 3114 | 3114 |
av_free_packet(in); |
| 3115 | 3115 |
return ret; |
| 3116 | 3116 |
} else |
| 3117 |
- return av_interleave_packet_per_dts(s, out, in, flush); |
|
| 3117 |
+ return ff_interleave_packet_per_dts(s, out, in, flush); |
|
| 3118 | 3118 |
} |
| 3119 | 3119 |
|
| 3120 | 3120 |
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
|