00001 /* 00002 * "Real" compatible muxer and demuxer. 00003 * Copyright (c) 2000, 2001 Fabrice Bellard. 00004 * 00005 * This file is part of FFmpeg. 00006 * 00007 * FFmpeg is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * FFmpeg is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with FFmpeg; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00022 #ifndef FFMPEG_RM_H 00023 #define FFMPEG_RM_H 00024 00025 #include "avformat.h" 00026 00027 00028 typedef struct { 00029 int nb_packets; 00030 int packet_total_size; 00031 int packet_max_size; 00032 /* codec related output */ 00033 int bit_rate; 00034 float frame_rate; 00035 int nb_frames; /* current frame number */ 00036 int total_frames; /* total number of frames */ 00037 int num; 00038 AVCodecContext *enc; 00039 } StreamInfo; 00040 00041 typedef struct { 00042 StreamInfo streams[2]; 00043 StreamInfo *audio_stream, *video_stream; 00044 int data_pos; /* position of the data after the header */ 00045 int nb_packets; 00046 int old_format; 00047 int current_stream; 00048 int remaining_len; 00049 uint8_t *videobuf; 00050 int videobufsize; 00051 int videobufpos; 00052 int curpic_num; 00053 int cur_slice, slices; 00054 int64_t pktpos; 00055 00056 uint8_t *audiobuf; 00057 int64_t audiotimestamp; 00058 int sub_packet_cnt; // Subpacket counter, used while reading 00059 int sub_packet_size, sub_packet_h, coded_framesize; 00060 int audio_stream_num; 00061 int audio_pkt_cnt; 00062 int audio_framesize; 00063 int sub_packet_lengths[16]; 00064 } RMContext; 00065 00066 #endif /* FFMPEG_RM_H */
1.5.5