]> git.sesse.net Git - ffmpeg/blob - libavformat/rm.h
split rm muxer and demuxer in their own files
[ffmpeg] / libavformat / rm.h
1 /*
2  * "Real" compatible muxer and demuxer.
3  * Copyright (c) 2000, 2001 Fabrice Bellard.
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 #ifndef RM_H
23 #define RM_H
24
25 #include "avformat.h"
26
27
28 typedef struct {
29     int nb_packets;
30     int packet_total_size;
31     int packet_max_size;
32     /* codec related output */
33     int bit_rate;
34     float frame_rate;
35     int nb_frames;    /* current frame number */
36     int total_frames; /* total number of frames */
37     int num;
38     AVCodecContext *enc;
39 } StreamInfo;
40
41 typedef struct {
42     StreamInfo streams[2];
43     StreamInfo *audio_stream, *video_stream;
44     int data_pos; /* position of the data after the header */
45     int nb_packets;
46     int old_format;
47     int current_stream;
48     int remaining_len;
49     /// Audio descrambling matrix parameters
50     uint8_t *audiobuf; ///< place to store reordered audio data
51     int64_t audiotimestamp; ///< Audio packet timestamp
52     int sub_packet_cnt; // Subpacket counter, used while reading
53     int sub_packet_size, sub_packet_h, coded_framesize; ///< Descrambling parameters from container
54     int audio_stream_num; ///< Stream number for audio packets
55     int audio_pkt_cnt; ///< Output packet counter
56     int audio_framesize; /// Audio frame size from container
57     int sub_packet_lengths[16]; /// Length of each aac subpacket
58 } RMContext;
59
60 #endif /* RM_H */