90     int encoded_buf_size = 0;
   110         film->
start = metadata;
   112     film->
last = metadata;
   121         if (encoded_buf_size != pkt->
size && (pkt->
size % encoded_buf_size) != 0) {
   170     for (
int i = 0; i < format_context->
nb_streams; i++) {
   174                 av_log(format_context, 
AV_LOG_ERROR, 
"Sega FILM allows a maximum of one audio stream.\n");
   183                 av_log(format_context, 
AV_LOG_ERROR, 
"Sega FILM allows a maximum of one video stream.\n");
   206     int64_t pos, pos_end = 
avio_tell(format_context->
pb);
   216     read_buf[1] = buf + shift_size;
   224                "write the header\n", format_context->
url);
   232     avio_seek(format_context->
pb, shift_size, SEEK_SET);
   238 #define READ_BLOCK do {                                                             \   239     read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], shift_size);  \   248         n = read_size[read_buf_id];
   251         avio_write(format_context->
pb, read_buf[read_buf_id], n);
   253     } 
while (pos < pos_end);
   263     int64_t sample_table_size, stabsize, headersize;
   274     stabsize = 16 + sample_table_size;
   292         if (audio_codec < 0) {
   370     packet = film->
start;
   371     while (packet != 
NULL) {
   374         packet = packet->
next;
   397     .priv_class     = &film_muxer_class,
 static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams. 
#define LIBAVUTIL_VERSION_INT
packed RGB 8:8:8, 24bpp, RGBRGB... 
static av_cold int init(AVCodecContext *avctx)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used). 
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext. 
const char * av_default_item_name(void *ptr)
Return the context name. 
#define AVIO_FLAG_READ
read-only 
AVOutputFormat ff_segafilm_muxer
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown. 
AVStream ** streams
A list of all streams in the file. 
static const AVClass film_muxer_class
static double av_q2d(AVRational a)
Convert an AVRational to a double. 
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext. 
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe. 
AVCodecID
Identify the syntax and semantics of the bitstream. 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered. 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
char * url
input or output URL. 
static int film_init(AVFormatContext *format_context)
enum AVMediaType codec_type
General type of the encoded data. 
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int flags
A combination of AV_PKT_FLAG values. 
static int film_write_packet(AVFormatContext *format_context, AVPacket *pkt)
unsigned int nb_streams
Number of elements in AVFormatContext.streams. 
int void avio_flush(AVIOContext *s)
Force flushing of buffered data. 
static int write_trailer(AVFormatContext *s1)
static int shift_data(AVFormatContext *format_context, int64_t shift_size)
static int film_write_header(AVFormatContext *format_context)
AVIOContext * pb
I/O context. 
void avio_w8(AVIOContext *s, int b)
Describe the class of an AVClass context structure. 
void avio_wb16(AVIOContext *s, unsigned int val)
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational. 
int sample_rate
Audio only. 
static int get_audio_codec_id(enum AVCodecID codec_id)
void * priv_data
Format private data. 
int bits_per_coded_sample
The number of bits per sample in the codedwords. 
void avio_wb32(AVIOContext *s, unsigned int val)
AVCodecParameters * codecpar
Codec parameters associated with this stream. 
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
This structure stores compressed data. 
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static int film_write_packet_to_header(AVFormatContext *format_context, FILMPacket *pkt)