24int main(
int argc,
char **argv)
44 printf(
"coded_rate_at_open=%d/%d\n", rate.
num, rate.
den);
48 printf(
"coded_rate_after_probe=%d/%d\n", rate.
num, rate.
den);
53 printf(
"duration=%" PRId64
"\n",
pkt->duration);
54 printf(
"avg_frame_rate=%d/%d|time_base=%d/%d\n",
static AVDictionary * opts
__device__ int printf(const char *,...)
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_LOG_QUIET
Print no output.
void av_log_set_level(int level)
Set the log level.
AVRational framerate
Number of frames per second, for streams with constant frame durations.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
AVStream ** streams
A list of all streams in the file.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational avg_frame_rate
Average framerate.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.