Go to the documentation of this file.
35 fprintf(
ret ? stderr : stdout,
36 "Usage: seek_print file [command ...]\n"
39 " seek:stream:min_ts:ts:max_ts:flags\n"
44 int main(
int argc,
char **argv)
52 while ((opt =
getopt(argc, argv,
"h")) != -1) {
73 fprintf(stderr,
"%s: could not find codec parameters: %s\n", filename,
78 for (; argc; argc--, argv++) {
79 if (!strcmp(*argv,
"read")) {
85 printf(
"read: %d size=%d stream=%d dts=%s (%s) pts=%s (%s)\n",
91 }
else if (sscanf(*argv,
"seek:%i:%"SCNi64
":%"SCNi64
":%"SCNi64
":%i",
92 &stream, &min_ts, &ts, &max_ts, &
flags) == 5) {
96 fprintf(stderr,
"'%s': unknown command\n", *argv);
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
AVStream ** streams
A list of all streams in the file.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
static void usage(int ret)
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
static int getopt(int argc, char *argv[], char *opts)
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int main(int argc, char **argv)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Rational number (pair of numerator and denominator).
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
printf("static const uint8_t my_array[100] = {\n")
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
This structure stores compressed data.
#define flags(name, subs,...)
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...