Go to the documentation of this file.
89 int encoded_buf_size = 0;
109 film->
start = metadata;
111 film->
last = metadata;
120 if (encoded_buf_size !=
pkt->
size && (
pkt->
size % encoded_buf_size) != 0) {
170 av_log(format_context,
AV_LOG_ERROR,
"Sega FILM allows a maximum of one audio stream.\n");
175 "Incompatible audio stream format.\n");
183 av_log(format_context,
AV_LOG_ERROR,
"Sega FILM allows a maximum of one video stream.\n");
189 "Incompatible video stream format.\n");
194 "Pixel format must be rgb24.\n");
212 int64_t
pos, pos_end;
222 read_buf[1] = buf + shift_size;
230 "write the header\n", format_context->
url);
238 avio_seek(format_context->
pb, shift_size, SEEK_SET);
244 #define READ_BLOCK do { \
245 read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], shift_size); \
254 n = read_size[read_buf_id];
257 avio_write(format_context->
pb, read_buf[read_buf_id], n);
259 }
while (
pos < pos_end);
269 int64_t sample_table_size, stabsize, headersize;
278 stabsize = 16 + sample_table_size;
306 switch (
video->codecpar->codec_id) {
356 packet = film->
start;
357 while (packet !=
NULL) {
360 packet = packet->
next;
372 while (packet !=
NULL) {
static av_cold int init(AVCodecContext *avctx)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
enum AVMediaType codec_type
General type of the encoded data.
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
static int film_init(AVFormatContext *format_context)
AVStream ** streams
A list of all streams in the file.
static int film_write_packet_to_header(AVFormatContext *format_context, FILMPacket *pkt)
@ AV_CODEC_ID_PCM_S16BE_PLANAR
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
static int film_write_packet(AVFormatContext *format_context, AVPacket *pkt)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static int shift_data(AVFormatContext *format_context, int64_t shift_size)
static int get_audio_codec_id(enum AVCodecID codec_id)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static double av_q2d(AVRational a)
Convert an AVRational to a double.
void avio_flush(AVIOContext *s)
Force flushing of buffered data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int write_trailer(AVFormatContext *s1)
AVIOContext * pb
I/O context.
void avio_w8(AVIOContext *s, int b)
int sample_rate
Audio only.
AVCodecID
Identify the syntax and semantics of the bitstream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
char * url
input or output URL.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void avio_wb32(AVIOContext *s, unsigned int val)
int flags
A combination of AV_PKT_FLAG values.
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
AVOutputFormat ff_segafilm_muxer
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
static void film_deinit(AVFormatContext *format_context)
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
A Quick Description Of Rate Distortion Theory We want to encode a video
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
#define AVIO_FLAG_READ
read-only
int bits_per_coded_sample
The number of bits per sample in the codedwords.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
@ AV_CODEC_ID_PCM_S8_PLANAR
static int film_write_header(AVFormatContext *format_context)
void avio_wb16(AVIOContext *s, unsigned int val)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
void * priv_data
Format private data.