FFmpeg: libavformat/framecrcenc.c Source File
Go to the documentation of this file. 1 /*
2 * frame CRC encoder (for codec/format testing)
3 * Copyright (c) 2002 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 #include <inttypes.h>
23
26
30
34
36 {
38 for (
i = 0;
i <
s->nb_streams;
i++) {
43 avio_printf(
s->pb,
"#extradata %d: %8d, 0x%08"PRIx32
"\n",
45 }
46 }
47
49 }
50
52 {
54 char buf[256];
55
56 snprintf(buf,
sizeof(buf),
"%d, %10"PRId64
", %10"PRId64
", %8"PRId64
", %8d, 0x%08"PRIx32,
62
66 }
67 }
70 return 0;
71 }
72
82 };
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
This struct describes the properties of an encoded stream.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int framecrc_write_header(struct AVFormatContext *s)
AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, size_t len)
Calculate the Adler32 checksum of a buffer.
int extradata_size
Size of the extradata content in bytes.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int flags
A combination of AV_PKT_FLAG values.
#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...
const FFOutputFormat ff_framecrc_muxer
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
This structure stores compressed data.
int ff_framehash_write_header(AVFormatContext *s)
Set the timebase for each stream from the corresponding codec timebase and print it.
Generated on Tue Feb 28 2023 21:34:04 for FFmpeg by
doxygen
1.8.17