FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
v4l2_m2m.c File Reference
#include <linux/videodev2.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
#include "libavcodec/avcodec.h"
#include "libavcodec/internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
#include "v4l2_context.h"
#include "v4l2_fmt.h"
#include "v4l2_m2m.h"

Go to the source code of this file.

Functions

static int v4l2_splane_video (struct v4l2_capability *cap)
 
static int v4l2_mplane_video (struct v4l2_capability *cap)
 
static int v4l2_prepare_contexts (V4L2m2mContext *s)
 
static int v4l2_probe_driver (V4L2m2mContext *s)
 
static int v4l2_configure_contexts (V4L2m2mContext *s)
 
int ff_v4l2_m2m_codec_reinit (V4L2m2mContext *s)
 Reinitializes the V4L2m2mContext when the driver cant continue processing with the capture parameters. More...
 
int ff_v4l2_m2m_codec_full_reinit (V4L2m2mContext *s)
 Reinitializes the V4L2m2mContext when the driver cant continue processing with the any of the current V4L2Contexts (ie, changes in output and capture). More...
 
int ff_v4l2_m2m_codec_end (AVCodecContext *avctx)
 Releases all the codec resources if all AVBufferRefs have been returned to the ctx. More...
 
int ff_v4l2_m2m_codec_init (AVCodecContext *avctx)
 Probes the video nodes looking for the required codec capabilities. More...
 

Function Documentation

static int v4l2_splane_video ( struct v4l2_capability *  cap)
inlinestatic

Definition at line 39 of file v4l2_m2m.c.

Referenced by v4l2_prepare_contexts().

static int v4l2_mplane_video ( struct v4l2_capability *  cap)
inlinestatic

Definition at line 51 of file v4l2_m2m.c.

Referenced by v4l2_prepare_contexts().

static int v4l2_prepare_contexts ( V4L2m2mContext s)
static
static int v4l2_probe_driver ( V4L2m2mContext s)
static

Definition at line 96 of file v4l2_m2m.c.

Referenced by ff_v4l2_m2m_codec_init().

static int v4l2_configure_contexts ( V4L2m2mContext s)
static

Definition at line 131 of file v4l2_m2m.c.

Referenced by ff_v4l2_m2m_codec_init().

int ff_v4l2_m2m_codec_reinit ( V4L2m2mContext ctx)

Reinitializes the V4L2m2mContext when the driver cant continue processing with the capture parameters.

Parameters
[in]ctxThe V4L2m2mContext instantiated by the encoder/decoder.
Returns
0 in case of success, negative number otherwise

Definition at line 189 of file v4l2_m2m.c.

Referenced by v4l2_handle_event().

int ff_v4l2_m2m_codec_full_reinit ( V4L2m2mContext ctx)

Reinitializes the V4L2m2mContext when the driver cant continue processing with the any of the current V4L2Contexts (ie, changes in output and capture).

Parameters
[in]ctxThe V4L2m2mContext instantiated by the encoder/decoder.
Returns
0 in case of success, negative number otherwise

Definition at line 233 of file v4l2_m2m.c.

Referenced by v4l2_handle_event().

int ff_v4l2_m2m_codec_end ( AVCodecContext avctx)

Releases all the codec resources if all AVBufferRefs have been returned to the ctx.

Otherwise keep the driver open.

Parameters
[in]TheAVCodecContext instantiated by the encoder/decoder.
Returns
0

Definition at line 314 of file v4l2_m2m.c.

Referenced by ff_v4l2_m2m_codec_full_reinit(), and v4l2_free_buffer().

int ff_v4l2_m2m_codec_init ( AVCodecContext avctx)

Probes the video nodes looking for the required codec capabilities.

Parameters
[in]ctxThe AVCodecContext instantiated by the encoder/decoder.
Returns
0 if a driver is found, a negative number otherwise.

Definition at line 344 of file v4l2_m2m.c.

Referenced by v4l2_decode_init(), and v4l2_encode_init().