|
FFmpeg
|
#include <linux/videodev2.h>#include <sys/ioctl.h>#include <sys/mman.h>#include <unistd.h>#include <fcntl.h>#include <poll.h>#include "libavcodec/avcodec.h"#include "libavcodec/internal.h"#include "v4l2_buffers.h"#include "v4l2_fmt.h"#include "v4l2_m2m.h"Go to the source code of this file.
Data Structures | |
| struct | v4l2_format_update |
|
inlinestatic |
Definition at line 44 of file v4l2_context.c.
Referenced by ff_v4l2_context_enqueue_frame(), ff_v4l2_context_enqueue_packet(), ff_v4l2_context_get_format(), ff_v4l2_context_init(), ff_v4l2_context_set_format(), ff_v4l2_context_set_status(), logger(), v4l2_dequeue_v4l2buf(), v4l2_get_coded_format(), v4l2_get_framesize_compressed(), v4l2_get_raw_format(), v4l2_get_sar(), v4l2_handle_event(), v4l2_release_buffers(), v4l2_stop_decode(), v4l2_stop_encode(), and v4l2_try_raw_format().
|
inlinestatic |
Definition at line 51 of file v4l2_context.c.
Referenced by ff_v4l2_context_enqueue_frame(), ff_v4l2_context_enqueue_packet(), ff_v4l2_context_init(), ff_v4l2_context_release(), v4l2_dequeue_v4l2buf(), v4l2_handle_event(), v4l2_release_buffers(), and v4l2_resolution_changed().
|
inlinestatic |
Definition at line 56 of file v4l2_context.c.
Referenced by ff_v4l2_context_init(), v4l2_handle_event(), and v4l2_resolution_changed().
|
inlinestatic |
Definition at line 61 of file v4l2_context.c.
Referenced by ff_v4l2_context_init(), v4l2_handle_event(), and v4l2_resolution_changed().
|
static |
Definition at line 66 of file v4l2_context.c.
Referenced by v4l2_handle_event().
|
inlinestatic |
Definition at line 84 of file v4l2_context.c.
Referenced by v4l2_handle_event().
|
inlinestatic |
Definition at line 103 of file v4l2_context.c.
Referenced by ff_v4l2_context_init().
|
inlinestatic |
Definition at line 111 of file v4l2_context.c.
Referenced by v4l2_save_to_context().
|
inlinestatic |
Definition at line 125 of file v4l2_context.c.
Referenced by ff_v4l2_context_get_format().
|
static |
handle resolution change event and end of stream event returns 1 if reinit was successful, negative if it failed returns 0 if reinit was not executed
Definition at line 161 of file v4l2_context.c.
Referenced by v4l2_dequeue_v4l2buf().
|
static |
Definition at line 243 of file v4l2_context.c.
Referenced by ff_v4l2_context_enqueue_packet().
|
static |
Definition at line 263 of file v4l2_context.c.
Referenced by ff_v4l2_context_enqueue_frame().
|
static |
Definition at line 283 of file v4l2_context.c.
Referenced by ff_v4l2_context_dequeue_frame(), ff_v4l2_context_dequeue_packet(), and v4l2_getfree_v4l2buf().
|
static |
Definition at line 434 of file v4l2_context.c.
Referenced by ff_v4l2_context_enqueue_frame(), and ff_v4l2_context_enqueue_packet().
|
static |
Definition at line 453 of file v4l2_context.c.
Referenced by ff_v4l2_context_init(), and ff_v4l2_context_release().
|
inlinestatic |
Definition at line 476 of file v4l2_context.c.
Referenced by v4l2_get_raw_format().
|
static |
Definition at line 500 of file v4l2_context.c.
Referenced by ff_v4l2_context_get_format().
|
static |
Definition at line 535 of file v4l2_context.c.
Referenced by ff_v4l2_context_get_format().
| int ff_v4l2_context_set_status | ( | V4L2Context * | ctx, |
| uint32_t | cmd | ||
| ) |
Sets the status of a V4L2Context.
| [in] | ctx | A pointer to a V4L2Context. |
| [in] | cmd | The status to set (VIDIOC_STREAMON or VIDIOC_STREAMOFF). Warning: If VIDIOC_STREAMOFF is sent to a buffer context that still has some frames buffered, those frames will be dropped. |
Definition at line 572 of file v4l2_context.c.
Referenced by ff_v4l2_m2m_codec_end(), ff_v4l2_m2m_codec_full_reinit(), ff_v4l2_m2m_codec_reinit(), v4l2_receive_packet(), v4l2_stop_decode(), v4l2_stop_encode(), and v4l2_try_start().
| int ff_v4l2_context_enqueue_frame | ( | V4L2Context * | ctx, |
| const AVFrame * | f | ||
| ) |
Enqueues a buffer to a V4L2Context from an AVFrame.
The frame must be non NULL.
| [in] | ctx | The V4L2Context to enqueue to. |
| [in] | f | A pointer to an AVFrame to enqueue. |
Definition at line 586 of file v4l2_context.c.
Referenced by v4l2_send_frame().
| int ff_v4l2_context_enqueue_packet | ( | V4L2Context * | ctx, |
| const AVPacket * | pkt | ||
| ) |
Enqueues a buffer to a V4L2Context from an AVPacket.
The packet must be non NULL. When the size of the pkt is null, the buffer is not queued but a V4L2_DEC_CMD_STOP command is sent instead to the driver.
| [in] | ctx | The V4L2Context to enqueue to. |
| [in] | pkt | A pointer to an AVPacket. |
Definition at line 611 of file v4l2_context.c.
Referenced by v4l2_receive_frame().
| int ff_v4l2_context_dequeue_frame | ( | V4L2Context * | ctx, |
| AVFrame * | f, | ||
| int | timeout | ||
| ) |
Dequeues a buffer from a V4L2Context to an AVFrame.
The frame must be non NULL.
| [in] | ctx | The V4L2Context to dequeue from. |
| [in,out] | f | The AVFrame to dequeue to. |
| [in] | timeout | The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds) |
Definition at line 636 of file v4l2_context.c.
Referenced by v4l2_receive_frame().
| int ff_v4l2_context_dequeue_packet | ( | V4L2Context * | ctx, |
| AVPacket * | pkt | ||
| ) |
Dequeues a buffer from a V4L2Context to an AVPacket.
The pkt must be non NULL.
| [in] | ctx | The V4L2Context to dequeue from. |
| [in,out] | pkt | The AVPacket to dequeue to. |
Definition at line 656 of file v4l2_context.c.
Referenced by v4l2_receive_packet().
| int ff_v4l2_context_get_format | ( | V4L2Context * | ctx, |
| int | probe | ||
| ) |
Queries the driver for a valid v4l2 format and copies it to the context.
| [in] | ctx | A pointer to a V4L2Context. See V4L2Context description for required variables. |
| [in] | probe | Probe only and ignore changes to the format. |
Definition at line 676 of file v4l2_context.c.
Referenced by ff_v4l2_m2m_codec_full_reinit(), ff_v4l2_m2m_codec_reinit(), and v4l2_probe_driver().
| int ff_v4l2_context_set_format | ( | V4L2Context * | ctx | ) |
Sets the V4L2Context format in the v4l2 driver.
| [in] | ctx | A pointer to a V4L2Context. See V4L2Context description for required variables. |
Definition at line 703 of file v4l2_context.c.
Referenced by ff_v4l2_m2m_codec_full_reinit(), ff_v4l2_m2m_codec_reinit(), and v4l2_configure_contexts().
| void ff_v4l2_context_release | ( | V4L2Context * | ctx | ) |
Releases a V4L2Context.
| [in] | ctx | A pointer to a V4L2Context. The caller is reponsible for freeing it. It must not be used after calling this function. |
Definition at line 708 of file v4l2_context.c.
Referenced by ff_v4l2_m2m_codec_end(), ff_v4l2_m2m_codec_full_reinit(), ff_v4l2_m2m_codec_reinit(), and v4l2_m2m_destroy_context().
| int ff_v4l2_context_init | ( | V4L2Context * | ctx | ) |
Initializes a V4L2Context.
| [in] | ctx | A pointer to a V4L2Context. See V4L2Context description for required variables. |
Definition at line 722 of file v4l2_context.c.
Referenced by ff_v4l2_m2m_codec_full_reinit(), v4l2_configure_contexts(), and v4l2_try_start().
1.8.17