#include "config.h"
#include "libavformat/avformat.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <asm/types.h>
#include <linux/videodev2.h>
#include <time.h>
#include <strings.h>
#include "libavutil/imgutils.h"
Go to the source code of this file.
static int device_init | ( | AVFormatContext * | ctx, | |
int * | width, | |||
int * | height, | |||
uint32_t | pix_fmt | |||
) | [static] |
static int device_open | ( | AVFormatContext * | ctx, | |
uint32_t * | capabilities | |||
) | [static] |
static uint32_t device_try_init | ( | AVFormatContext * | s1, | |
const AVFormatParameters * | ap, | |||
int * | width, | |||
int * | height, | |||
enum CodecID * | codec_id | |||
) | [static] |
static int first_field | ( | int | fd | ) | [static] |
Definition at line 171 of file v4l2.c.
Referenced by dnxhd_decode_frame(), dnxhd_encode_picture(), and v4l2_read_header().
static uint32_t fmt_ff2v4l | ( | enum PixelFormat | pix_fmt, | |
enum CodecID | codec_id | |||
) | [static] |
static enum CodecID fmt_v4l2codec | ( | uint32_t | v4l2_fmt | ) | [static] |
static enum PixelFormat fmt_v4l2ff | ( | uint32_t | v4l2_fmt, | |
enum CodecID | codec_id | |||
) | [static] |
static void mmap_close | ( | struct video_data * | s | ) | [static] |
static int mmap_init | ( | AVFormatContext * | ctx | ) | [static] |
static int mmap_read_frame | ( | AVFormatContext * | ctx, | |
AVPacket * | pkt | |||
) | [static] |
static void mmap_release_buffer | ( | AVPacket * | pkt | ) | [static] |
static int mmap_start | ( | AVFormatContext * | ctx | ) | [static] |
static int read_frame | ( | AVFormatContext * | ctx, | |
AVPacket * | pkt | |||
) | [static] |
static int read_init | ( | AVFormatContext * | ctx | ) | [static] |
static int v4l2_read_close | ( | AVFormatContext * | s1 | ) | [static] |
static int v4l2_read_header | ( | AVFormatContext * | s1, | |
AVFormatParameters * | ap | |||
) | [static] |
static int v4l2_read_packet | ( | AVFormatContext * | s1, | |
AVPacket * | pkt | |||
) | [static] |
static int v4l2_set_parameters | ( | AVFormatContext * | s1, | |
AVFormatParameters * | ap | |||
) | [static] |
const int desired_video_buffers = 256 [static] |
Initial value:
{ "video4linux2", NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"), sizeof(struct video_data), NULL, v4l2_read_header, v4l2_read_packet, v4l2_read_close, .flags = AVFMT_NOFILE, }
struct fmt_map fmt_conversion_table[] [static] |
Initial value:
{ { PIX_FMT_YUV420P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 }, { PIX_FMT_YUV422P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P }, { PIX_FMT_YUYV422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV }, { PIX_FMT_UYVY422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY }, { PIX_FMT_YUV411P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P }, { PIX_FMT_YUV410P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 }, { PIX_FMT_RGB555, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 }, { PIX_FMT_RGB565, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 }, { PIX_FMT_BGR24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 }, { PIX_FMT_RGB24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 }, { PIX_FMT_BGRA, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 }, { PIX_FMT_GRAY8, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY }, { PIX_FMT_NV12, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 }, { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG }, { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, }