libavformat/swf.h

Go to the documentation of this file.
00001 /*
00002  * Flash Compatible Streaming Format common header.
00003  * Copyright (c) 2000 Fabrice Bellard
00004  * Copyright (c) 2003 Tinic Uro
00005  *
00006  * This file is part of FFmpeg.
00007  *
00008  * FFmpeg is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * FFmpeg is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with FFmpeg; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00021  */
00022 
00023 #ifndef AVFORMAT_SWF_H
00024 #define AVFORMAT_SWF_H
00025 
00026 #include "libavutil/fifo.h"
00027 #include "avformat.h"
00028 #include "avio.h"
00029 #include "riff.h" /* for CodecTag */
00030 
00031 /* should have a generic way to indicate probable size */
00032 #define DUMMY_FILE_SIZE (100 * 1024 * 1024)
00033 #define DUMMY_DURATION 600 /* in seconds */
00034 
00035 #define TAG_END 0
00036 #define TAG_SHOWFRAME 1
00037 #define TAG_DEFINESHAPE 2
00038 #define TAG_FREECHARACTER 3
00039 #define TAG_PLACEOBJECT 4
00040 #define TAG_REMOVEOBJECT 5
00041 #define TAG_STREAMHEAD 18
00042 #define TAG_STREAMBLOCK 19
00043 #define TAG_JPEG2 21
00044 #define TAG_PLACEOBJECT2 26
00045 #define TAG_STREAMHEAD2 45
00046 #define TAG_VIDEOSTREAM 60
00047 #define TAG_VIDEOFRAME 61
00048 #define TAG_FILEATTRIBUTES 69
00049 
00050 #define TAG_LONG 0x100
00051 
00052 /* flags for shape definition */
00053 #define FLAG_MOVETO 0x01
00054 #define FLAG_SETFILL0 0x02
00055 #define FLAG_SETFILL1 0x04
00056 
00057 #define AUDIO_FIFO_SIZE 65536
00058 
00059 /* character id used */
00060 #define BITMAP_ID 0
00061 #define VIDEO_ID 0
00062 #define SHAPE_ID 1
00063 
00064 #undef NDEBUG
00065 #include <assert.h>
00066 
00067 typedef struct {
00068 int64_t duration_pos;
00069 int64_t tag_pos;
00070 int64_t vframes_pos;
00071 int samples_per_frame;
00072 int sound_samples;
00073 int swf_frame_number;
00074 int video_frame_number;
00075 int frame_rate;
00076 int tag;
00077 AVFifoBuffer *audio_fifo;
00078 AVCodecContext *audio_enc, *video_enc;
00079 } SWFContext;
00080 
00081 static const AVCodecTag swf_codec_tags[] = {
00082 {CODEC_ID_FLV1, 0x02},
00083 {CODEC_ID_VP6F, 0x04},
00084 {CODEC_ID_NONE, 0},
00085 };
00086 
00087 static const AVCodecTag swf_audio_codec_tags[] = {
00088 {CODEC_ID_PCM_S16LE, 0x00},
00089 {CODEC_ID_ADPCM_SWF, 0x01},
00090 {CODEC_ID_MP3, 0x02},
00091 {CODEC_ID_PCM_S16LE, 0x03},
00092 //{CODEC_ID_NELLYMOSER, 0x06},
00093 {CODEC_ID_NONE, 0},
00094 };
00095 
00096 #endif /* AVFORMAT_SWF_H */

Generated on Fri Oct 26 02:39:41 2012 for FFmpeg by doxygen 1.5.8

AltStyle によって変換されたページ (->オリジナル) /