X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fv4l2_context.h;h=22a9532444b9b6a3a15fe301eaaf73889068b917;hb=eb6ea948ed2f86361ae0b9d8689368d466b8337f;hp=632f1d0aac0191dd50824835b65df032fbcd368f;hpb=d6b62ce1aced9e2456582870382f384581cc7cbb;p=ffmpeg diff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h index 632f1d0aac0..22a9532444b 100644 --- a/libavcodec/v4l2_context.h +++ b/libavcodec/v4l2_context.h @@ -69,6 +69,7 @@ typedef struct V4L2Context { * or accepts (in case of an output context, e.g. when encoding). */ int width, height; + AVRational sample_aspect_ratio; /** * Indexed array of V4L2Buffers @@ -113,9 +114,10 @@ int ff_v4l2_context_set_format(V4L2Context* ctx); * Queries the driver for a valid v4l2 format and copies it to the context. * * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. + * @param[in] probe Probe only and ignore changes to the format. * @return 0 in case of success, a negative value representing the error otherwise. */ -int ff_v4l2_context_get_format(V4L2Context* ctx); +int ff_v4l2_context_get_format(V4L2Context* ctx, int probe); /** * Releases a V4L2Context. @@ -153,9 +155,10 @@ int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt); * The frame must be non NULL. * @param[in] ctx The V4L2Context to dequeue from. * @param[inout] f The AVFrame to dequeue to. + * @param[in] timeout The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds) * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. */ -int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f); +int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout); /** * Enqueues a buffer to a V4L2Context from an AVPacket