#include <linux/videodev2.h>
#include <sys/ioctl.h>
#include <search.h>
#include "encode.h"
#include "libavcodec/avcodec.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/opt.h"
#include "codec_internal.h"
#include "profiles.h"
#include "v4l2_context.h"
#include "v4l2_m2m.h"
#include "v4l2_fmt.h"
Go to the source code of this file.
|
static void | v4l2_set_timeperframe (V4L2m2mContext *s, unsigned int num, unsigned int den) |
|
static void | v4l2_set_ext_ctrl (V4L2m2mContext *s, unsigned int id, signed int value, const char *name, int log_warning) |
|
static int | v4l2_get_ext_ctrl (V4L2m2mContext *s, unsigned int id, signed int *value, const char *name, int log_warning) |
|
static unsigned int | v4l2_h264_profile_from_ff (int p) |
|
static int | v4l2_mpeg4_profile_from_ff (int p) |
|
static int | v4l2_check_b_frame_support (V4L2m2mContext *s) |
|
static void | v4l2_subscribe_eos_event (V4L2m2mContext *s) |
|
static int | v4l2_prepare_encoder (V4L2m2mContext *s) |
|
static int | v4l2_send_frame (AVCodecContext *avctx, const AVFrame *frame) |
|
static int | v4l2_receive_packet (AVCodecContext *avctx, AVPacket *avpkt) |
|
static av_cold int | v4l2_encode_init (AVCodecContext *avctx) |
|
static av_cold int | v4l2_encode_close (AVCodecContext *avctx) |
|
| M2MENC (mpeg4,"MPEG4", mpeg4_options, AV_CODEC_ID_MPEG4) |
|
| M2MENC (h263, "H.263", options, AV_CODEC_ID_H263) |
|
| M2MENC (h264, "H.264", options, AV_CODEC_ID_H264) |
|
| M2MENC (hevc, "HEVC", options, AV_CODEC_ID_HEVC) |
|
| M2MENC (vp8, "VP8", options, AV_CODEC_ID_VP8) |
|
◆ MPEG_CID
#define MPEG_CID |
( |
|
x | ) |
V4L2_CID_MPEG_VIDEO_##x |
◆ MPEG_VIDEO
#define MPEG_VIDEO |
( |
|
x | ) |
V4L2_MPEG_VIDEO_##x |
◆ OFFSET
◆ FLAGS
◆ V4L_M2M_CAPTURE_OPTS
#define V4L_M2M_CAPTURE_OPTS |
Value:
{ "num_capture_buffers", "Number of buffers in the capture context", \
Definition at line 392 of file v4l2_m2m_enc.c.
◆ M2MENC_CLASS
#define M2MENC_CLASS |
( |
|
NAME, |
|
|
|
OPTIONS_NAME |
|
) |
| |
Value: static const AVClass v4l2_m2m_ ## NAME ## _enc_class = { \
.option = OPTIONS_NAME, \
};
Definition at line 414 of file v4l2_m2m_enc.c.
◆ M2MENC
#define M2MENC |
( |
|
NAME, |
|
|
|
LONGNAME, |
|
|
|
OPTIONS_NAME, |
|
|
|
CODEC |
|
) |
| |
Value:
const
FFCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
.
p.
name = #NAME
"_v4l2m2m" , \
CODEC_LONG_NAME("V4L2 mem2mem " LONGNAME " encoder wrapper"), \
.p.id = CODEC , \
.p.priv_class = &v4l2_m2m_ ## NAME ##_enc_class, \
FF_CODEC_CAP_INIT_CLEANUP, \
.p.wrapper_name = "v4l2m2m", \
}
Definition at line 422 of file v4l2_m2m_enc.c.
◆ v4l2_set_timeperframe()
◆ v4l2_set_ext_ctrl()
static void v4l2_set_ext_ctrl |
( |
V4L2m2mContext * |
s, |
|
|
unsigned int |
id, |
|
|
signed int |
value, |
|
|
const char * |
name, |
|
|
int |
log_warning |
|
) |
| |
|
inlinestatic |
◆ v4l2_get_ext_ctrl()
◆ v4l2_h264_profile_from_ff()
static unsigned int v4l2_h264_profile_from_ff |
( |
int |
p | ) |
|
|
inlinestatic |
◆ v4l2_mpeg4_profile_from_ff()
static int v4l2_mpeg4_profile_from_ff |
( |
int |
p | ) |
|
|
inlinestatic |
◆ v4l2_check_b_frame_support()
◆ v4l2_subscribe_eos_event()
◆ v4l2_prepare_encoder()
◆ v4l2_send_frame()
◆ v4l2_receive_packet()
◆ v4l2_encode_init()
◆ v4l2_encode_close()
◆ M2MENC() [1/5]
◆ M2MENC() [2/5]
◆ M2MENC() [3/5]
◆ M2MENC() [4/5]
◆ M2MENC() [5/5]
◆ mpeg4_options
◆ options
◆ v4l2_m2m_defaults
Initial value:= {
{ "qmin", "-1" },
{ "qmax", "-1" },
}
Definition at line 408 of file v4l2_m2m_enc.c.