21 #include <quvi/quvi.h>
34 #define OFFSET(x) offsetof(LibQuviContext, x)
35 #define FLAGS AV_OPT_FLAG_DECODING_PARAM
63 char *media_url, *pagetitle;
71 quvi_setopt(q, QUVIOPT_FORMAT, qc->
format);
80 rc = quvi_getprop(m, QUVIPROP_MEDIAURL, &media_url);
84 goto err_quvi_cleanup;
89 goto err_quvi_cleanup;
95 goto err_quvi_cleanup;
100 goto err_quvi_cleanup;
102 rc = quvi_getprop(m, QUVIPROP_PAGETITLE, &pagetitle);
111 goto err_close_input;
122 quvi_parse_close(&m);
163 .priv_class = &libquvi_context_class,
#define LIBAVUTIL_VERSION_INT
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Copy the settings of the source AVCodecContext into the destination AVCodecContext.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static int libquvi_read_header(AVFormatContext *s)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVStream ** streams
A list of all streams in the file.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
static av_cold int read_close(AVFormatContext *ctx)
static int libquvi_probe(AVProbeData *p)
static const AVOption libquvi_options[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
simple assert() macros that are a bit more flexible than ISO C assert().
AVCodecContext * codec
Codec context associated with this stream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
static const AVClass libquvi_context_class
char filename[1024]
input or output filename
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int libquvi_read_packet(AVFormatContext *s, AVPacket *pkt)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Describe the class of an AVClass context structure.
static int libquvi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
This structure contains the data a format has to probe a file.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Seek to the keyframe at timestamp.
AVInputFormat ff_libquvi_demuxer
int pts_wrap_bits
number of bits in pts (used for wrapping control)
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
void * priv_data
Format private data.
static int libquvi_close(AVFormatContext *s)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
#define AVERROR_EXTERNAL
Generic error in an external library.
This structure stores compressed data.