Mercurial > libavformat.hg
annotate audiointerleave.h @ 4404:7cf3b77ad6ff libavformat
reuse MXFCodecUL for data def and simplify
author | bcoudurier |
---|---|
date | Sun, 08 Feb 2009 05:12:30 +0000 |
parents | 65adb9e5214f |
children | e059726dfb1b |
rev | line source |
---|---|
4400
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
1 /* |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
2 * Audio Interleaving prototypes and declarations |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
3 * |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
4 * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot com> |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
5 * |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
6 * This file is part of FFmpeg. |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
7 * |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
8 * FFmpeg is free software; you can redistribute it and/or |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
10 * License as published by the Free Software Foundation; either |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
11 * version 2.1 of the License, or (at your option) any later version. |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
12 * |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
13 * FFmpeg is distributed in the hope that it will be useful, |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
16 * Lesser General Public License for more details. |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
17 * |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
19 * License along with FFmpeg; if not, write to the Free Software |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
21 */ |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
22 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
23 #ifndef AVFORMAT_AUDIOINTERLEAVE_H |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
24 #define AVFORMAT_AUDIOINTERLEAVE_H |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
25 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
26 #include "libavutil/fifo.h" |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
27 #include "avformat.h" |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
28 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
29 typedef struct { |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
30 AVFifoBuffer fifo; |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
31 unsigned fifo_size; ///< current fifo size allocated |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
32 uint64_t dts; ///< current dts |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
33 int sample_size; ///< size of one sample all channels included |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
34 const int *samples_per_frame; ///< must be 0 terminated |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
35 const int *samples; ///< current samples per frame, pointer to samples_per_frame |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
36 AVRational time_base; ///< time base of output audio packets |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
37 } AudioInterleaveContext; |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
38 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
39 int ff_audio_interleave_init(AVFormatContext *s, const int *samples_per_frame, AVRational time_base); |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
40 void ff_audio_interleave_close(AVFormatContext *s); |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
41 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
42 int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacket *pkt); |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
43 int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt, |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
44 int stream_index, int flush); |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
45 int ff_audio_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush, |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
46 int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
47 int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *)); |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
48 |
65adb9e5214f
extract audio interleaving code from mxf muxer, will be used by gxf and dv
bcoudurier
parents:
diff
changeset
|
49 #endif // AVFORMAT_AUDIOINTERLEAVE_H |