mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 21:16:51 +07:00
doc-rst: linux_tv: remove whitespaces
Let's remove bad whitespaces on the entire book. That helps to avoid mixing whitespace removal with other patches. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
a163ad5ceb
commit
0579e6e3a3
@ -34,52 +34,52 @@ file: audio.h
|
||||
#include <linux/types.h>
|
||||
|
||||
typedef enum {
|
||||
AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
|
||||
AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
|
||||
AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
|
||||
AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
|
||||
} audio_stream_source_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
AUDIO_STOPPED, /* Device is stopped */
|
||||
AUDIO_PLAYING, /* Device is currently playing */
|
||||
AUDIO_PAUSED /* Device is paused */
|
||||
AUDIO_STOPPED, /* Device is stopped */
|
||||
AUDIO_PLAYING, /* Device is currently playing */
|
||||
AUDIO_PAUSED /* Device is paused */
|
||||
} audio_play_state_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
AUDIO_STEREO,
|
||||
AUDIO_MONO_LEFT,
|
||||
AUDIO_MONO_RIGHT,
|
||||
AUDIO_MONO,
|
||||
AUDIO_STEREO_SWAPPED
|
||||
AUDIO_STEREO,
|
||||
AUDIO_MONO_LEFT,
|
||||
AUDIO_MONO_RIGHT,
|
||||
AUDIO_MONO,
|
||||
AUDIO_STEREO_SWAPPED
|
||||
} audio_channel_select_t;
|
||||
|
||||
|
||||
typedef struct audio_mixer {
|
||||
unsigned int volume_left;
|
||||
unsigned int volume_right;
|
||||
unsigned int volume_left;
|
||||
unsigned int volume_right;
|
||||
// what else do we need? bass, pass-through, ...
|
||||
} audio_mixer_t;
|
||||
|
||||
|
||||
typedef struct audio_status {
|
||||
int AV_sync_state; /* sync audio and video? */
|
||||
int mute_state; /* audio is muted */
|
||||
audio_play_state_t play_state; /* current playback state */
|
||||
audio_stream_source_t stream_source; /* current stream source */
|
||||
audio_channel_select_t channel_select; /* currently selected channel */
|
||||
int bypass_mode; /* pass on audio data to */
|
||||
audio_mixer_t mixer_state; /* current mixer state */
|
||||
int AV_sync_state; /* sync audio and video? */
|
||||
int mute_state; /* audio is muted */
|
||||
audio_play_state_t play_state; /* current playback state */
|
||||
audio_stream_source_t stream_source; /* current stream source */
|
||||
audio_channel_select_t channel_select; /* currently selected channel */
|
||||
int bypass_mode; /* pass on audio data to */
|
||||
audio_mixer_t mixer_state; /* current mixer state */
|
||||
} audio_status_t; /* separate decoder hardware */
|
||||
|
||||
|
||||
typedef
|
||||
struct audio_karaoke { /* if Vocal1 or Vocal2 are non-zero, they get mixed */
|
||||
int vocal1; /* into left and right t at 70% each */
|
||||
int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
|
||||
int melody; /* mixed into the left channel and */
|
||||
/* Vocal2 into the right channel at 100% each. */
|
||||
/* if Melody is non-zero, the melody channel gets mixed*/
|
||||
int vocal1; /* into left and right t at 70% each */
|
||||
int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
|
||||
int melody; /* mixed into the left channel and */
|
||||
/* Vocal2 into the right channel at 100% each. */
|
||||
/* if Melody is non-zero, the melody channel gets mixed*/
|
||||
} audio_karaoke_t; /* into left and right */
|
||||
|
||||
|
||||
|
@ -34,16 +34,16 @@ file: ca.h
|
||||
/* slot interface types and info */
|
||||
|
||||
typedef struct ca_slot_info {
|
||||
int num; /* slot number */
|
||||
int num; /* slot number */
|
||||
|
||||
int type; /* CA interface this slot supports */
|
||||
int type; /* CA interface this slot supports */
|
||||
#define CA_CI 1 /* CI high level interface */
|
||||
#define CA_CI_LINK 2 /* CI link layer level interface */
|
||||
#define CA_CI_PHYS 4 /* CI physical layer level interface */
|
||||
#define CA_DESCR 8 /* built-in descrambler */
|
||||
#define CA_SC 128 /* simple smart card interface */
|
||||
|
||||
unsigned int flags;
|
||||
unsigned int flags;
|
||||
#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
|
||||
#define CA_CI_MODULE_READY 2
|
||||
} ca_slot_info_t;
|
||||
@ -52,37 +52,37 @@ file: ca.h
|
||||
/* descrambler types and info */
|
||||
|
||||
typedef struct ca_descr_info {
|
||||
unsigned int num; /* number of available descramblers (keys) */
|
||||
unsigned int type; /* type of supported scrambling system */
|
||||
unsigned int num; /* number of available descramblers (keys) */
|
||||
unsigned int type; /* type of supported scrambling system */
|
||||
#define CA_ECD 1
|
||||
#define CA_NDS 2
|
||||
#define CA_DSS 4
|
||||
} ca_descr_info_t;
|
||||
|
||||
typedef struct ca_caps {
|
||||
unsigned int slot_num; /* total number of CA card and module slots */
|
||||
unsigned int slot_type; /* OR of all supported types */
|
||||
unsigned int descr_num; /* total number of descrambler slots (keys) */
|
||||
unsigned int descr_type; /* OR of all supported types */
|
||||
unsigned int slot_num; /* total number of CA card and module slots */
|
||||
unsigned int slot_type; /* OR of all supported types */
|
||||
unsigned int descr_num; /* total number of descrambler slots (keys) */
|
||||
unsigned int descr_type; /* OR of all supported types */
|
||||
} ca_caps_t;
|
||||
|
||||
/* a message to/from a CI-CAM */
|
||||
typedef struct ca_msg {
|
||||
unsigned int index;
|
||||
unsigned int type;
|
||||
unsigned int length;
|
||||
unsigned char msg[256];
|
||||
unsigned int index;
|
||||
unsigned int type;
|
||||
unsigned int length;
|
||||
unsigned char msg[256];
|
||||
} ca_msg_t;
|
||||
|
||||
typedef struct ca_descr {
|
||||
unsigned int index;
|
||||
unsigned int parity; /* 0 == even, 1 == odd */
|
||||
unsigned char cw[8];
|
||||
unsigned int index;
|
||||
unsigned int parity; /* 0 == even, 1 == odd */
|
||||
unsigned char cw[8];
|
||||
} ca_descr_t;
|
||||
|
||||
typedef struct ca_pid {
|
||||
unsigned int pid;
|
||||
int index; /* -1 == disable*/
|
||||
unsigned int pid;
|
||||
int index; /* -1 == disable*/
|
||||
} ca_pid_t;
|
||||
|
||||
#define CA_RESET _IO('o', 128)
|
||||
|
@ -41,51 +41,51 @@ file: dmx.h
|
||||
|
||||
enum dmx_output
|
||||
{
|
||||
DMX_OUT_DECODER, /* Streaming directly to decoder. */
|
||||
DMX_OUT_TAP, /* Output going to a memory buffer */
|
||||
/* (to be retrieved via the read command).*/
|
||||
DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */
|
||||
/* (to be retrieved by reading from the */
|
||||
/* logical DVR device). */
|
||||
DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
|
||||
DMX_OUT_DECODER, /* Streaming directly to decoder. */
|
||||
DMX_OUT_TAP, /* Output going to a memory buffer */
|
||||
/* (to be retrieved via the read command).*/
|
||||
DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */
|
||||
/* (to be retrieved by reading from the */
|
||||
/* logical DVR device). */
|
||||
DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
|
||||
};
|
||||
|
||||
typedef enum dmx_output dmx_output_t;
|
||||
|
||||
typedef enum dmx_input
|
||||
{
|
||||
DMX_IN_FRONTEND, /* Input from a front-end device. */
|
||||
DMX_IN_DVR /* Input from the logical DVR device. */
|
||||
DMX_IN_FRONTEND, /* Input from a front-end device. */
|
||||
DMX_IN_DVR /* Input from the logical DVR device. */
|
||||
} dmx_input_t;
|
||||
|
||||
|
||||
typedef enum dmx_ts_pes
|
||||
{
|
||||
DMX_PES_AUDIO0,
|
||||
DMX_PES_VIDEO0,
|
||||
DMX_PES_TELETEXT0,
|
||||
DMX_PES_SUBTITLE0,
|
||||
DMX_PES_PCR0,
|
||||
DMX_PES_AUDIO0,
|
||||
DMX_PES_VIDEO0,
|
||||
DMX_PES_TELETEXT0,
|
||||
DMX_PES_SUBTITLE0,
|
||||
DMX_PES_PCR0,
|
||||
|
||||
DMX_PES_AUDIO1,
|
||||
DMX_PES_VIDEO1,
|
||||
DMX_PES_TELETEXT1,
|
||||
DMX_PES_SUBTITLE1,
|
||||
DMX_PES_PCR1,
|
||||
DMX_PES_AUDIO1,
|
||||
DMX_PES_VIDEO1,
|
||||
DMX_PES_TELETEXT1,
|
||||
DMX_PES_SUBTITLE1,
|
||||
DMX_PES_PCR1,
|
||||
|
||||
DMX_PES_AUDIO2,
|
||||
DMX_PES_VIDEO2,
|
||||
DMX_PES_TELETEXT2,
|
||||
DMX_PES_SUBTITLE2,
|
||||
DMX_PES_PCR2,
|
||||
DMX_PES_AUDIO2,
|
||||
DMX_PES_VIDEO2,
|
||||
DMX_PES_TELETEXT2,
|
||||
DMX_PES_SUBTITLE2,
|
||||
DMX_PES_PCR2,
|
||||
|
||||
DMX_PES_AUDIO3,
|
||||
DMX_PES_VIDEO3,
|
||||
DMX_PES_TELETEXT3,
|
||||
DMX_PES_SUBTITLE3,
|
||||
DMX_PES_PCR3,
|
||||
DMX_PES_AUDIO3,
|
||||
DMX_PES_VIDEO3,
|
||||
DMX_PES_TELETEXT3,
|
||||
DMX_PES_SUBTITLE3,
|
||||
DMX_PES_PCR3,
|
||||
|
||||
DMX_PES_OTHER
|
||||
DMX_PES_OTHER
|
||||
} dmx_pes_type_t;
|
||||
|
||||
#define DMX_PES_AUDIO DMX_PES_AUDIO0
|
||||
@ -97,18 +97,18 @@ file: dmx.h
|
||||
|
||||
typedef struct dmx_filter
|
||||
{
|
||||
__u8 filter[DMX_FILTER_SIZE];
|
||||
__u8 mask[DMX_FILTER_SIZE];
|
||||
__u8 mode[DMX_FILTER_SIZE];
|
||||
__u8 filter[DMX_FILTER_SIZE];
|
||||
__u8 mask[DMX_FILTER_SIZE];
|
||||
__u8 mode[DMX_FILTER_SIZE];
|
||||
} dmx_filter_t;
|
||||
|
||||
|
||||
struct dmx_sct_filter_params
|
||||
{
|
||||
__u16 pid;
|
||||
dmx_filter_t filter;
|
||||
__u32 timeout;
|
||||
__u32 flags;
|
||||
__u16 pid;
|
||||
dmx_filter_t filter;
|
||||
__u32 timeout;
|
||||
__u32 flags;
|
||||
#define DMX_CHECK_CRC 1
|
||||
#define DMX_ONESHOT 2
|
||||
#define DMX_IMMEDIATE_START 4
|
||||
@ -118,33 +118,33 @@ file: dmx.h
|
||||
|
||||
struct dmx_pes_filter_params
|
||||
{
|
||||
__u16 pid;
|
||||
dmx_input_t input;
|
||||
dmx_output_t output;
|
||||
dmx_pes_type_t pes_type;
|
||||
__u32 flags;
|
||||
__u16 pid;
|
||||
dmx_input_t input;
|
||||
dmx_output_t output;
|
||||
dmx_pes_type_t pes_type;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
typedef struct dmx_caps {
|
||||
__u32 caps;
|
||||
int num_decoders;
|
||||
__u32 caps;
|
||||
int num_decoders;
|
||||
} dmx_caps_t;
|
||||
|
||||
typedef enum dmx_source {
|
||||
DMX_SOURCE_FRONT0 = 0,
|
||||
DMX_SOURCE_FRONT1,
|
||||
DMX_SOURCE_FRONT2,
|
||||
DMX_SOURCE_FRONT3,
|
||||
DMX_SOURCE_DVR0 = 16,
|
||||
DMX_SOURCE_DVR1,
|
||||
DMX_SOURCE_DVR2,
|
||||
DMX_SOURCE_DVR3
|
||||
DMX_SOURCE_FRONT0 = 0,
|
||||
DMX_SOURCE_FRONT1,
|
||||
DMX_SOURCE_FRONT2,
|
||||
DMX_SOURCE_FRONT3,
|
||||
DMX_SOURCE_DVR0 = 16,
|
||||
DMX_SOURCE_DVR1,
|
||||
DMX_SOURCE_DVR2,
|
||||
DMX_SOURCE_DVR3
|
||||
} dmx_source_t;
|
||||
|
||||
struct dmx_stc {
|
||||
unsigned int num; /* input : which STC? 0..N */
|
||||
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
|
||||
__u64 stc; /* output: stc in 'base'*90 kHz units */
|
||||
unsigned int num; /* input : which STC? 0..N */
|
||||
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
|
||||
__u64 stc; /* output: stc in 'base'*90 kHz units */
|
||||
};
|
||||
|
||||
#define DMX_START _IO('o', 41)
|
||||
|
@ -36,58 +36,58 @@ file: frontend.h
|
||||
#include <linux/types.h>
|
||||
|
||||
enum fe_type {
|
||||
FE_QPSK,
|
||||
FE_QAM,
|
||||
FE_OFDM,
|
||||
FE_ATSC
|
||||
FE_QPSK,
|
||||
FE_QAM,
|
||||
FE_OFDM,
|
||||
FE_ATSC
|
||||
};
|
||||
|
||||
enum fe_caps {
|
||||
FE_IS_STUPID = 0,
|
||||
FE_CAN_INVERSION_AUTO = 0x1,
|
||||
FE_CAN_FEC_1_2 = 0x2,
|
||||
FE_CAN_FEC_2_3 = 0x4,
|
||||
FE_CAN_FEC_3_4 = 0x8,
|
||||
FE_CAN_FEC_4_5 = 0x10,
|
||||
FE_CAN_FEC_5_6 = 0x20,
|
||||
FE_CAN_FEC_6_7 = 0x40,
|
||||
FE_CAN_FEC_7_8 = 0x80,
|
||||
FE_CAN_FEC_8_9 = 0x100,
|
||||
FE_CAN_FEC_AUTO = 0x200,
|
||||
FE_CAN_QPSK = 0x400,
|
||||
FE_CAN_QAM_16 = 0x800,
|
||||
FE_CAN_QAM_32 = 0x1000,
|
||||
FE_CAN_QAM_64 = 0x2000,
|
||||
FE_CAN_QAM_128 = 0x4000,
|
||||
FE_CAN_QAM_256 = 0x8000,
|
||||
FE_CAN_QAM_AUTO = 0x10000,
|
||||
FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
|
||||
FE_CAN_BANDWIDTH_AUTO = 0x40000,
|
||||
FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
|
||||
FE_CAN_HIERARCHY_AUTO = 0x100000,
|
||||
FE_CAN_8VSB = 0x200000,
|
||||
FE_CAN_16VSB = 0x400000,
|
||||
FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
|
||||
FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
|
||||
FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
|
||||
FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
|
||||
FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
|
||||
FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
|
||||
FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
|
||||
FE_IS_STUPID = 0,
|
||||
FE_CAN_INVERSION_AUTO = 0x1,
|
||||
FE_CAN_FEC_1_2 = 0x2,
|
||||
FE_CAN_FEC_2_3 = 0x4,
|
||||
FE_CAN_FEC_3_4 = 0x8,
|
||||
FE_CAN_FEC_4_5 = 0x10,
|
||||
FE_CAN_FEC_5_6 = 0x20,
|
||||
FE_CAN_FEC_6_7 = 0x40,
|
||||
FE_CAN_FEC_7_8 = 0x80,
|
||||
FE_CAN_FEC_8_9 = 0x100,
|
||||
FE_CAN_FEC_AUTO = 0x200,
|
||||
FE_CAN_QPSK = 0x400,
|
||||
FE_CAN_QAM_16 = 0x800,
|
||||
FE_CAN_QAM_32 = 0x1000,
|
||||
FE_CAN_QAM_64 = 0x2000,
|
||||
FE_CAN_QAM_128 = 0x4000,
|
||||
FE_CAN_QAM_256 = 0x8000,
|
||||
FE_CAN_QAM_AUTO = 0x10000,
|
||||
FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
|
||||
FE_CAN_BANDWIDTH_AUTO = 0x40000,
|
||||
FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
|
||||
FE_CAN_HIERARCHY_AUTO = 0x100000,
|
||||
FE_CAN_8VSB = 0x200000,
|
||||
FE_CAN_16VSB = 0x400000,
|
||||
FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
|
||||
FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
|
||||
FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
|
||||
FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
|
||||
FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
|
||||
FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
|
||||
FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
|
||||
};
|
||||
|
||||
struct dvb_frontend_info {
|
||||
char name[128];
|
||||
enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
|
||||
__u32 frequency_min;
|
||||
__u32 frequency_max;
|
||||
__u32 frequency_stepsize;
|
||||
__u32 frequency_tolerance;
|
||||
__u32 symbol_rate_min;
|
||||
__u32 symbol_rate_max;
|
||||
__u32 symbol_rate_tolerance; /* ppm */
|
||||
__u32 notifier_delay; /* DEPRECATED */
|
||||
enum fe_caps caps;
|
||||
char name[128];
|
||||
enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
|
||||
__u32 frequency_min;
|
||||
__u32 frequency_max;
|
||||
__u32 frequency_stepsize;
|
||||
__u32 frequency_tolerance;
|
||||
__u32 symbol_rate_min;
|
||||
__u32 symbol_rate_max;
|
||||
__u32 symbol_rate_tolerance; /* ppm */
|
||||
__u32 notifier_delay; /* DEPRECATED */
|
||||
enum fe_caps caps;
|
||||
};
|
||||
|
||||
|
||||
@ -96,30 +96,30 @@ file: frontend.h
|
||||
* the meaning of this struct...
|
||||
*/
|
||||
struct dvb_diseqc_master_cmd {
|
||||
__u8 msg [6]; /* { framing, address, command, data [3] } */
|
||||
__u8 msg_len; /* valid values are 3...6 */
|
||||
__u8 msg [6]; /* { framing, address, command, data [3] } */
|
||||
__u8 msg_len; /* valid values are 3...6 */
|
||||
};
|
||||
|
||||
struct dvb_diseqc_slave_reply {
|
||||
__u8 msg [4]; /* { framing, data [3] } */
|
||||
__u8 msg_len; /* valid values are 0...4, 0 means no msg */
|
||||
int timeout; /* return from ioctl after timeout ms with */
|
||||
__u8 msg [4]; /* { framing, data [3] } */
|
||||
__u8 msg_len; /* valid values are 0...4, 0 means no msg */
|
||||
int timeout; /* return from ioctl after timeout ms with */
|
||||
}; /* errorcode when no message was received */
|
||||
|
||||
enum fe_sec_voltage {
|
||||
SEC_VOLTAGE_13,
|
||||
SEC_VOLTAGE_18,
|
||||
SEC_VOLTAGE_OFF
|
||||
SEC_VOLTAGE_13,
|
||||
SEC_VOLTAGE_18,
|
||||
SEC_VOLTAGE_OFF
|
||||
};
|
||||
|
||||
enum fe_sec_tone_mode {
|
||||
SEC_TONE_ON,
|
||||
SEC_TONE_OFF
|
||||
SEC_TONE_ON,
|
||||
SEC_TONE_OFF
|
||||
};
|
||||
|
||||
enum fe_sec_mini_cmd {
|
||||
SEC_MINI_A,
|
||||
SEC_MINI_B
|
||||
SEC_MINI_A,
|
||||
SEC_MINI_B
|
||||
};
|
||||
|
||||
/**
|
||||
@ -134,93 +134,93 @@ file: frontend.h
|
||||
* to reset DiSEqC, tone and parameters
|
||||
*/
|
||||
enum fe_status {
|
||||
FE_HAS_SIGNAL = 0x01,
|
||||
FE_HAS_CARRIER = 0x02,
|
||||
FE_HAS_VITERBI = 0x04,
|
||||
FE_HAS_SYNC = 0x08,
|
||||
FE_HAS_LOCK = 0x10,
|
||||
FE_TIMEDOUT = 0x20,
|
||||
FE_REINIT = 0x40,
|
||||
FE_HAS_SIGNAL = 0x01,
|
||||
FE_HAS_CARRIER = 0x02,
|
||||
FE_HAS_VITERBI = 0x04,
|
||||
FE_HAS_SYNC = 0x08,
|
||||
FE_HAS_LOCK = 0x10,
|
||||
FE_TIMEDOUT = 0x20,
|
||||
FE_REINIT = 0x40,
|
||||
};
|
||||
|
||||
enum fe_spectral_inversion {
|
||||
INVERSION_OFF,
|
||||
INVERSION_ON,
|
||||
INVERSION_AUTO
|
||||
INVERSION_OFF,
|
||||
INVERSION_ON,
|
||||
INVERSION_AUTO
|
||||
};
|
||||
|
||||
enum fe_code_rate {
|
||||
FEC_NONE = 0,
|
||||
FEC_1_2,
|
||||
FEC_2_3,
|
||||
FEC_3_4,
|
||||
FEC_4_5,
|
||||
FEC_5_6,
|
||||
FEC_6_7,
|
||||
FEC_7_8,
|
||||
FEC_8_9,
|
||||
FEC_AUTO,
|
||||
FEC_3_5,
|
||||
FEC_9_10,
|
||||
FEC_2_5,
|
||||
FEC_NONE = 0,
|
||||
FEC_1_2,
|
||||
FEC_2_3,
|
||||
FEC_3_4,
|
||||
FEC_4_5,
|
||||
FEC_5_6,
|
||||
FEC_6_7,
|
||||
FEC_7_8,
|
||||
FEC_8_9,
|
||||
FEC_AUTO,
|
||||
FEC_3_5,
|
||||
FEC_9_10,
|
||||
FEC_2_5,
|
||||
};
|
||||
|
||||
enum fe_modulation {
|
||||
QPSK,
|
||||
QAM_16,
|
||||
QAM_32,
|
||||
QAM_64,
|
||||
QAM_128,
|
||||
QAM_256,
|
||||
QAM_AUTO,
|
||||
VSB_8,
|
||||
VSB_16,
|
||||
PSK_8,
|
||||
APSK_16,
|
||||
APSK_32,
|
||||
DQPSK,
|
||||
QAM_4_NR,
|
||||
QPSK,
|
||||
QAM_16,
|
||||
QAM_32,
|
||||
QAM_64,
|
||||
QAM_128,
|
||||
QAM_256,
|
||||
QAM_AUTO,
|
||||
VSB_8,
|
||||
VSB_16,
|
||||
PSK_8,
|
||||
APSK_16,
|
||||
APSK_32,
|
||||
DQPSK,
|
||||
QAM_4_NR,
|
||||
};
|
||||
|
||||
enum fe_transmit_mode {
|
||||
TRANSMISSION_MODE_2K,
|
||||
TRANSMISSION_MODE_8K,
|
||||
TRANSMISSION_MODE_AUTO,
|
||||
TRANSMISSION_MODE_4K,
|
||||
TRANSMISSION_MODE_1K,
|
||||
TRANSMISSION_MODE_16K,
|
||||
TRANSMISSION_MODE_32K,
|
||||
TRANSMISSION_MODE_C1,
|
||||
TRANSMISSION_MODE_C3780,
|
||||
TRANSMISSION_MODE_2K,
|
||||
TRANSMISSION_MODE_8K,
|
||||
TRANSMISSION_MODE_AUTO,
|
||||
TRANSMISSION_MODE_4K,
|
||||
TRANSMISSION_MODE_1K,
|
||||
TRANSMISSION_MODE_16K,
|
||||
TRANSMISSION_MODE_32K,
|
||||
TRANSMISSION_MODE_C1,
|
||||
TRANSMISSION_MODE_C3780,
|
||||
};
|
||||
|
||||
enum fe_guard_interval {
|
||||
GUARD_INTERVAL_1_32,
|
||||
GUARD_INTERVAL_1_16,
|
||||
GUARD_INTERVAL_1_8,
|
||||
GUARD_INTERVAL_1_4,
|
||||
GUARD_INTERVAL_AUTO,
|
||||
GUARD_INTERVAL_1_128,
|
||||
GUARD_INTERVAL_19_128,
|
||||
GUARD_INTERVAL_19_256,
|
||||
GUARD_INTERVAL_PN420,
|
||||
GUARD_INTERVAL_PN595,
|
||||
GUARD_INTERVAL_PN945,
|
||||
GUARD_INTERVAL_1_32,
|
||||
GUARD_INTERVAL_1_16,
|
||||
GUARD_INTERVAL_1_8,
|
||||
GUARD_INTERVAL_1_4,
|
||||
GUARD_INTERVAL_AUTO,
|
||||
GUARD_INTERVAL_1_128,
|
||||
GUARD_INTERVAL_19_128,
|
||||
GUARD_INTERVAL_19_256,
|
||||
GUARD_INTERVAL_PN420,
|
||||
GUARD_INTERVAL_PN595,
|
||||
GUARD_INTERVAL_PN945,
|
||||
};
|
||||
|
||||
enum fe_hierarchy {
|
||||
HIERARCHY_NONE,
|
||||
HIERARCHY_1,
|
||||
HIERARCHY_2,
|
||||
HIERARCHY_4,
|
||||
HIERARCHY_AUTO
|
||||
HIERARCHY_NONE,
|
||||
HIERARCHY_1,
|
||||
HIERARCHY_2,
|
||||
HIERARCHY_4,
|
||||
HIERARCHY_AUTO
|
||||
};
|
||||
|
||||
enum fe_interleaving {
|
||||
INTERLEAVING_NONE,
|
||||
INTERLEAVING_AUTO,
|
||||
INTERLEAVING_240,
|
||||
INTERLEAVING_720,
|
||||
INTERLEAVING_NONE,
|
||||
INTERLEAVING_AUTO,
|
||||
INTERLEAVING_240,
|
||||
INTERLEAVING_720,
|
||||
};
|
||||
|
||||
/* S2API Commands */
|
||||
@ -317,38 +317,38 @@ file: frontend.h
|
||||
#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
|
||||
|
||||
enum fe_pilot {
|
||||
PILOT_ON,
|
||||
PILOT_OFF,
|
||||
PILOT_AUTO,
|
||||
PILOT_ON,
|
||||
PILOT_OFF,
|
||||
PILOT_AUTO,
|
||||
};
|
||||
|
||||
enum fe_rolloff {
|
||||
ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
|
||||
ROLLOFF_20,
|
||||
ROLLOFF_25,
|
||||
ROLLOFF_AUTO,
|
||||
ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
|
||||
ROLLOFF_20,
|
||||
ROLLOFF_25,
|
||||
ROLLOFF_AUTO,
|
||||
};
|
||||
|
||||
enum fe_delivery_system {
|
||||
SYS_UNDEFINED,
|
||||
SYS_DVBC_ANNEX_A,
|
||||
SYS_DVBC_ANNEX_B,
|
||||
SYS_DVBT,
|
||||
SYS_DSS,
|
||||
SYS_DVBS,
|
||||
SYS_DVBS2,
|
||||
SYS_DVBH,
|
||||
SYS_ISDBT,
|
||||
SYS_ISDBS,
|
||||
SYS_ISDBC,
|
||||
SYS_ATSC,
|
||||
SYS_ATSCMH,
|
||||
SYS_DTMB,
|
||||
SYS_CMMB,
|
||||
SYS_DAB,
|
||||
SYS_DVBT2,
|
||||
SYS_TURBO,
|
||||
SYS_DVBC_ANNEX_C,
|
||||
SYS_UNDEFINED,
|
||||
SYS_DVBC_ANNEX_A,
|
||||
SYS_DVBC_ANNEX_B,
|
||||
SYS_DVBT,
|
||||
SYS_DSS,
|
||||
SYS_DVBS,
|
||||
SYS_DVBS2,
|
||||
SYS_DVBH,
|
||||
SYS_ISDBT,
|
||||
SYS_ISDBS,
|
||||
SYS_ISDBC,
|
||||
SYS_ATSC,
|
||||
SYS_ATSCMH,
|
||||
SYS_DTMB,
|
||||
SYS_CMMB,
|
||||
SYS_DAB,
|
||||
SYS_DVBT2,
|
||||
SYS_TURBO,
|
||||
SYS_DVBC_ANNEX_C,
|
||||
};
|
||||
|
||||
/* backward compatibility */
|
||||
@ -358,47 +358,47 @@ file: frontend.h
|
||||
/* ATSC-MH */
|
||||
|
||||
enum atscmh_sccc_block_mode {
|
||||
ATSCMH_SCCC_BLK_SEP = 0,
|
||||
ATSCMH_SCCC_BLK_COMB = 1,
|
||||
ATSCMH_SCCC_BLK_RES = 2,
|
||||
ATSCMH_SCCC_BLK_SEP = 0,
|
||||
ATSCMH_SCCC_BLK_COMB = 1,
|
||||
ATSCMH_SCCC_BLK_RES = 2,
|
||||
};
|
||||
|
||||
enum atscmh_sccc_code_mode {
|
||||
ATSCMH_SCCC_CODE_HLF = 0,
|
||||
ATSCMH_SCCC_CODE_QTR = 1,
|
||||
ATSCMH_SCCC_CODE_RES = 2,
|
||||
ATSCMH_SCCC_CODE_HLF = 0,
|
||||
ATSCMH_SCCC_CODE_QTR = 1,
|
||||
ATSCMH_SCCC_CODE_RES = 2,
|
||||
};
|
||||
|
||||
enum atscmh_rs_frame_ensemble {
|
||||
ATSCMH_RSFRAME_ENS_PRI = 0,
|
||||
ATSCMH_RSFRAME_ENS_SEC = 1,
|
||||
ATSCMH_RSFRAME_ENS_PRI = 0,
|
||||
ATSCMH_RSFRAME_ENS_SEC = 1,
|
||||
};
|
||||
|
||||
enum atscmh_rs_frame_mode {
|
||||
ATSCMH_RSFRAME_PRI_ONLY = 0,
|
||||
ATSCMH_RSFRAME_PRI_SEC = 1,
|
||||
ATSCMH_RSFRAME_RES = 2,
|
||||
ATSCMH_RSFRAME_PRI_ONLY = 0,
|
||||
ATSCMH_RSFRAME_PRI_SEC = 1,
|
||||
ATSCMH_RSFRAME_RES = 2,
|
||||
};
|
||||
|
||||
enum atscmh_rs_code_mode {
|
||||
ATSCMH_RSCODE_211_187 = 0,
|
||||
ATSCMH_RSCODE_223_187 = 1,
|
||||
ATSCMH_RSCODE_235_187 = 2,
|
||||
ATSCMH_RSCODE_RES = 3,
|
||||
ATSCMH_RSCODE_211_187 = 0,
|
||||
ATSCMH_RSCODE_223_187 = 1,
|
||||
ATSCMH_RSCODE_235_187 = 2,
|
||||
ATSCMH_RSCODE_RES = 3,
|
||||
};
|
||||
|
||||
#define NO_STREAM_ID_FILTER (~0U)
|
||||
#define LNA_AUTO (~0U)
|
||||
|
||||
struct dtv_cmds_h {
|
||||
char *name; /* A display name for debugging purposes */
|
||||
char *name; /* A display name for debugging purposes */
|
||||
|
||||
__u32 cmd; /* A unique ID */
|
||||
__u32 cmd; /* A unique ID */
|
||||
|
||||
/* Flags */
|
||||
__u32 set:1; /* Either a set or get property */
|
||||
__u32 buffer:1; /* Does this property use the buffer? */
|
||||
__u32 reserved:30; /* Align */
|
||||
/* Flags */
|
||||
__u32 set:1; /* Either a set or get property */
|
||||
__u32 buffer:1; /* Does this property use the buffer? */
|
||||
__u32 reserved:30; /* Align */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -414,10 +414,10 @@ file: frontend.h
|
||||
* bit error, block error, lapsed time.
|
||||
*/
|
||||
enum fecap_scale_params {
|
||||
FE_SCALE_NOT_AVAILABLE = 0,
|
||||
FE_SCALE_DECIBEL,
|
||||
FE_SCALE_RELATIVE,
|
||||
FE_SCALE_COUNTER
|
||||
FE_SCALE_NOT_AVAILABLE = 0,
|
||||
FE_SCALE_DECIBEL,
|
||||
FE_SCALE_RELATIVE,
|
||||
FE_SCALE_COUNTER
|
||||
};
|
||||
|
||||
/**
|
||||
@ -452,43 +452,43 @@ file: frontend.h
|
||||
* u.st.len = 4;
|
||||
*/
|
||||
struct dtv_stats {
|
||||
__u8 scale; /* enum fecap_scale_params type */
|
||||
union {
|
||||
__u64 uvalue; /* for counters and relative scales */
|
||||
__s64 svalue; /* for 0.001 dB measures */
|
||||
};
|
||||
__u8 scale; /* enum fecap_scale_params type */
|
||||
union {
|
||||
__u64 uvalue; /* for counters and relative scales */
|
||||
__s64 svalue; /* for 0.001 dB measures */
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#define MAX_DTV_STATS 4
|
||||
|
||||
struct dtv_fe_stats {
|
||||
__u8 len;
|
||||
struct dtv_stats stat[MAX_DTV_STATS];
|
||||
__u8 len;
|
||||
struct dtv_stats stat[MAX_DTV_STATS];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct dtv_property {
|
||||
__u32 cmd;
|
||||
__u32 reserved[3];
|
||||
union {
|
||||
__u32 data;
|
||||
struct dtv_fe_stats st;
|
||||
struct {
|
||||
__u8 data[32];
|
||||
__u32 len;
|
||||
__u32 reserved1[3];
|
||||
void *reserved2;
|
||||
} buffer;
|
||||
} u;
|
||||
int result;
|
||||
__u32 cmd;
|
||||
__u32 reserved[3];
|
||||
union {
|
||||
__u32 data;
|
||||
struct dtv_fe_stats st;
|
||||
struct {
|
||||
__u8 data[32];
|
||||
__u32 len;
|
||||
__u32 reserved1[3];
|
||||
void *reserved2;
|
||||
} buffer;
|
||||
} u;
|
||||
int result;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
|
||||
#define DTV_IOCTL_MAX_MSGS 64
|
||||
|
||||
struct dtv_properties {
|
||||
__u32 num;
|
||||
struct dtv_property *props;
|
||||
__u32 num;
|
||||
struct dtv_property *props;
|
||||
};
|
||||
|
||||
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
|
||||
@ -500,13 +500,13 @@ file: frontend.h
|
||||
*/
|
||||
|
||||
enum fe_bandwidth {
|
||||
BANDWIDTH_8_MHZ,
|
||||
BANDWIDTH_7_MHZ,
|
||||
BANDWIDTH_6_MHZ,
|
||||
BANDWIDTH_AUTO,
|
||||
BANDWIDTH_5_MHZ,
|
||||
BANDWIDTH_10_MHZ,
|
||||
BANDWIDTH_1_712_MHZ,
|
||||
BANDWIDTH_8_MHZ,
|
||||
BANDWIDTH_7_MHZ,
|
||||
BANDWIDTH_6_MHZ,
|
||||
BANDWIDTH_AUTO,
|
||||
BANDWIDTH_5_MHZ,
|
||||
BANDWIDTH_10_MHZ,
|
||||
BANDWIDTH_1_712_MHZ,
|
||||
};
|
||||
|
||||
/* This is needed for legacy userspace support */
|
||||
@ -528,45 +528,45 @@ file: frontend.h
|
||||
typedef enum fe_delivery_system fe_delivery_system_t;
|
||||
|
||||
struct dvb_qpsk_parameters {
|
||||
__u32 symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
__u32 symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
};
|
||||
|
||||
struct dvb_qam_parameters {
|
||||
__u32 symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
__u32 symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
};
|
||||
|
||||
struct dvb_vsb_parameters {
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
};
|
||||
|
||||
struct dvb_ofdm_parameters {
|
||||
fe_bandwidth_t bandwidth;
|
||||
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
|
||||
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
|
||||
fe_modulation_t constellation; /* modulation type (see above) */
|
||||
fe_transmit_mode_t transmission_mode;
|
||||
fe_guard_interval_t guard_interval;
|
||||
fe_hierarchy_t hierarchy_information;
|
||||
fe_bandwidth_t bandwidth;
|
||||
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
|
||||
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
|
||||
fe_modulation_t constellation; /* modulation type (see above) */
|
||||
fe_transmit_mode_t transmission_mode;
|
||||
fe_guard_interval_t guard_interval;
|
||||
fe_hierarchy_t hierarchy_information;
|
||||
};
|
||||
|
||||
struct dvb_frontend_parameters {
|
||||
__u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
|
||||
/* intermediate frequency in kHz for DVB-S */
|
||||
fe_spectral_inversion_t inversion;
|
||||
union {
|
||||
struct dvb_qpsk_parameters qpsk; /* DVB-S */
|
||||
struct dvb_qam_parameters qam; /* DVB-C */
|
||||
struct dvb_ofdm_parameters ofdm; /* DVB-T */
|
||||
struct dvb_vsb_parameters vsb; /* ATSC */
|
||||
} u;
|
||||
__u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
|
||||
/* intermediate frequency in kHz for DVB-S */
|
||||
fe_spectral_inversion_t inversion;
|
||||
union {
|
||||
struct dvb_qpsk_parameters qpsk; /* DVB-S */
|
||||
struct dvb_qam_parameters qam; /* DVB-C */
|
||||
struct dvb_ofdm_parameters ofdm; /* DVB-T */
|
||||
struct dvb_vsb_parameters vsb; /* ATSC */
|
||||
} u;
|
||||
};
|
||||
|
||||
struct dvb_frontend_event {
|
||||
fe_status_t status;
|
||||
struct dvb_frontend_parameters parameters;
|
||||
fe_status_t status;
|
||||
struct dvb_frontend_parameters parameters;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -50,7 +50,7 @@ Arguments
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- if any, is to be stored.
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ Arguments
|
||||
- int request
|
||||
|
||||
- Equals :ref:`FE_SET_FRONTEND` for this
|
||||
command.
|
||||
command.
|
||||
|
||||
- .. row 3
|
||||
|
||||
|
@ -39,8 +39,8 @@ Arguments
|
||||
- int request
|
||||
|
||||
- Equals
|
||||
:ref:`FE_READ_SIGNAL_STRENGTH`
|
||||
for this command.
|
||||
:ref:`FE_READ_SIGNAL_STRENGTH`
|
||||
for this command.
|
||||
|
||||
- .. row 3
|
||||
|
||||
|
@ -41,8 +41,8 @@ Arguments
|
||||
- int request
|
||||
|
||||
- Equals
|
||||
:ref:`FE_READ_UNCORRECTED_BLOCKS`
|
||||
for this command.
|
||||
:ref:`FE_READ_UNCORRECTED_BLOCKS`
|
||||
for this command.
|
||||
|
||||
- .. row 3
|
||||
|
||||
|
@ -45,7 +45,7 @@ Arguments
|
||||
- int request
|
||||
|
||||
- Equals :ref:`FE_SET_FRONTEND` for this
|
||||
command.
|
||||
command.
|
||||
|
||||
- .. row 3
|
||||
|
||||
|
@ -23,8 +23,8 @@ from an internal (demux) or external (user write) source.
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
AUDIO_SOURCE_DEMUX,
|
||||
AUDIO_SOURCE_MEMORY
|
||||
AUDIO_SOURCE_DEMUX,
|
||||
AUDIO_SOURCE_MEMORY
|
||||
} audio_stream_source_t;
|
||||
|
||||
AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the
|
||||
@ -45,9 +45,9 @@ representing the state of audio playback.
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
AUDIO_STOPPED,
|
||||
AUDIO_PLAYING,
|
||||
AUDIO_PAUSED
|
||||
AUDIO_STOPPED,
|
||||
AUDIO_PLAYING,
|
||||
AUDIO_PAUSED
|
||||
} audio_play_state_t;
|
||||
|
||||
|
||||
@ -63,11 +63,11 @@ the following values.
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
AUDIO_STEREO,
|
||||
AUDIO_MONO_LEFT,
|
||||
AUDIO_MONO_RIGHT,
|
||||
AUDIO_MONO,
|
||||
AUDIO_STEREO_SWAPPED
|
||||
AUDIO_STEREO,
|
||||
AUDIO_MONO_LEFT,
|
||||
AUDIO_MONO_RIGHT,
|
||||
AUDIO_MONO,
|
||||
AUDIO_STEREO_SWAPPED
|
||||
} audio_channel_select_t;
|
||||
|
||||
|
||||
@ -83,13 +83,13 @@ about various states of the playback operation.
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct audio_status {
|
||||
boolean AV_sync_state;
|
||||
boolean mute_state;
|
||||
audio_play_state_t play_state;
|
||||
audio_stream_source_t stream_source;
|
||||
audio_channel_select_t channel_select;
|
||||
boolean bypass_mode;
|
||||
audio_mixer_t mixer_state;
|
||||
boolean AV_sync_state;
|
||||
boolean mute_state;
|
||||
audio_play_state_t play_state;
|
||||
audio_stream_source_t stream_source;
|
||||
audio_channel_select_t channel_select;
|
||||
boolean bypass_mode;
|
||||
audio_mixer_t mixer_state;
|
||||
} audio_status_t;
|
||||
|
||||
|
||||
@ -105,8 +105,8 @@ audio volume.
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct audio_mixer {
|
||||
unsigned int volume_left;
|
||||
unsigned int volume_right;
|
||||
unsigned int volume_left;
|
||||
unsigned int volume_right;
|
||||
} audio_mixer_t;
|
||||
|
||||
|
||||
@ -144,9 +144,9 @@ The ioctl AUDIO_SET_KARAOKE uses the following format:
|
||||
|
||||
typedef
|
||||
struct audio_karaoke {
|
||||
int vocal1;
|
||||
int vocal2;
|
||||
int melody;
|
||||
int vocal1;
|
||||
int vocal2;
|
||||
int melody;
|
||||
} audio_karaoke_t;
|
||||
|
||||
If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t
|
||||
|
@ -58,22 +58,22 @@ Arguments
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDONLY read-only access
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDWR read/write access
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- O_NONBLOCK open in non-blocking mode
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- (blocking mode is the default)
|
||||
|
||||
|
||||
@ -529,12 +529,12 @@ Arguments
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- TRUE Audio Mute
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- FALSE Audio Un-mute
|
||||
|
||||
|
||||
@ -592,12 +592,12 @@ Arguments
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- TRUE AV-sync ON
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- FALSE AV-sync OFF
|
||||
|
||||
|
||||
@ -655,16 +655,16 @@ Arguments
|
||||
- boolean mode
|
||||
|
||||
- Enables or disables the decoding of the current Audio stream in
|
||||
the DVB subsystem.
|
||||
the DVB subsystem.
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- TRUE Bypass is disabled
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- FALSE Bypass is enabled
|
||||
|
||||
|
||||
@ -836,11 +836,11 @@ Arguments
|
||||
- __u64 \*pts
|
||||
|
||||
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
|
||||
ISO/IEC 13818-1.
|
||||
ISO/IEC 13818-1.
|
||||
|
||||
The PTS should belong to the currently played frame if possible,
|
||||
but may also be a value close to it like the PTS of the last
|
||||
decoded frame or the last PTS extracted by the PES parser.
|
||||
The PTS should belong to the currently played frame if possible,
|
||||
but may also be a value close to it like the PTS of the last
|
||||
decoded frame or the last PTS extracted by the PES parser.
|
||||
|
||||
|
||||
Return Value
|
||||
|
@ -16,16 +16,16 @@ ca_slot_info_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct ca_slot_info {
|
||||
int num; /* slot number */
|
||||
int num; /* slot number */
|
||||
|
||||
int type; /* CA interface this slot supports */
|
||||
int type; /* CA interface this slot supports */
|
||||
#define CA_CI 1 /* CI high level interface */
|
||||
#define CA_CI_LINK 2 /* CI link layer level interface */
|
||||
#define CA_CI_PHYS 4 /* CI physical layer level interface */
|
||||
#define CA_DESCR 8 /* built-in descrambler */
|
||||
#define CA_SC 128 /* simple smart card interface */
|
||||
|
||||
unsigned int flags;
|
||||
unsigned int flags;
|
||||
#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
|
||||
#define CA_CI_MODULE_READY 2
|
||||
} ca_slot_info_t;
|
||||
@ -40,8 +40,8 @@ ca_descr_info_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct ca_descr_info {
|
||||
unsigned int num; /* number of available descramblers (keys) */
|
||||
unsigned int type; /* type of supported scrambling system */
|
||||
unsigned int num; /* number of available descramblers (keys) */
|
||||
unsigned int type; /* type of supported scrambling system */
|
||||
#define CA_ECD 1
|
||||
#define CA_NDS 2
|
||||
#define CA_DSS 4
|
||||
@ -57,10 +57,10 @@ ca_caps_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct ca_caps {
|
||||
unsigned int slot_num; /* total number of CA card and module slots */
|
||||
unsigned int slot_type; /* OR of all supported types */
|
||||
unsigned int descr_num; /* total number of descrambler slots (keys) */
|
||||
unsigned int descr_type;/* OR of all supported types */
|
||||
unsigned int slot_num; /* total number of CA card and module slots */
|
||||
unsigned int slot_type; /* OR of all supported types */
|
||||
unsigned int descr_num; /* total number of descrambler slots (keys) */
|
||||
unsigned int descr_type;/* OR of all supported types */
|
||||
} ca_cap_t;
|
||||
|
||||
|
||||
@ -74,10 +74,10 @@ ca_msg_t
|
||||
|
||||
/* a message to/from a CI-CAM */
|
||||
typedef struct ca_msg {
|
||||
unsigned int index;
|
||||
unsigned int type;
|
||||
unsigned int length;
|
||||
unsigned char msg[256];
|
||||
unsigned int index;
|
||||
unsigned int type;
|
||||
unsigned int length;
|
||||
unsigned char msg[256];
|
||||
} ca_msg_t;
|
||||
|
||||
|
||||
@ -90,9 +90,9 @@ ca_descr_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct ca_descr {
|
||||
unsigned int index;
|
||||
unsigned int parity;
|
||||
unsigned char cw[8];
|
||||
unsigned int index;
|
||||
unsigned int parity;
|
||||
unsigned char cw[8];
|
||||
} ca_descr_t;
|
||||
|
||||
|
||||
@ -105,6 +105,6 @@ ca-pid
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct ca_pid {
|
||||
unsigned int pid;
|
||||
int index; /* -1 == disable*/
|
||||
unsigned int pid;
|
||||
int index; /* -1 == disable*/
|
||||
} ca_pid_t;
|
||||
|
@ -57,22 +57,22 @@ Arguments
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDONLY read-only access
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDWR read/write access
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- O_NONBLOCK open in non-blocking mode
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- (blocking mode is the default)
|
||||
|
||||
|
||||
|
@ -61,17 +61,17 @@ Arguments
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDWR read/write access
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- O_NONBLOCK open in non-blocking mode
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- (blocking mode is the default)
|
||||
|
||||
|
||||
@ -236,33 +236,33 @@ Return Value
|
||||
- ``ECRC``
|
||||
|
||||
- Last section had a CRC error - no data returned. The buffer is
|
||||
flushed.
|
||||
flushed.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``EOVERFLOW``
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- The filtered data was not read from the buffer in due time,
|
||||
resulting in non-read data being lost. The buffer is flushed.
|
||||
resulting in non-read data being lost. The buffer is flushed.
|
||||
|
||||
- .. row 6
|
||||
|
||||
- ``ETIMEDOUT``
|
||||
|
||||
- The section was not loaded within the stated timeout period. See
|
||||
ioctl DMX_SET_FILTER for how to set a timeout.
|
||||
ioctl DMX_SET_FILTER for how to set a timeout.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- ``EFAULT``
|
||||
|
||||
- The driver failed to write to the callers buffer due to an invalid
|
||||
\*buf pointer.
|
||||
\*buf pointer.
|
||||
|
||||
|
||||
|
||||
@ -330,18 +330,18 @@ Return Value
|
||||
- ``EWOULDBLOCK``
|
||||
|
||||
- No data was written. This might happen if O_NONBLOCK was
|
||||
specified and there is no more buffer space available (if
|
||||
O_NONBLOCK is not specified the function will block until buffer
|
||||
space is available).
|
||||
specified and there is no more buffer space available (if
|
||||
O_NONBLOCK is not specified the function will block until buffer
|
||||
space is available).
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``EBUSY``
|
||||
|
||||
- This error code indicates that there are conflicting requests. The
|
||||
corresponding demux device is setup to receive data from the
|
||||
front- end. Make sure that these filters are stopped and that the
|
||||
filters with input set to DMX_IN_DVR are started.
|
||||
corresponding demux device is setup to receive data from the
|
||||
front- end. Make sure that these filters are stopped and that the
|
||||
filters with input set to DMX_IN_DVR are started.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -409,16 +409,16 @@ appropriately. The generic error codes are described at the
|
||||
- ``EINVAL``
|
||||
|
||||
- Invalid argument, i.e. no filtering parameters provided via the
|
||||
DMX_SET_FILTER or DMX_SET_PES_FILTER functions.
|
||||
DMX_SET_FILTER or DMX_SET_PES_FILTER functions.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``EBUSY``
|
||||
|
||||
- This error code indicates that there are conflicting requests.
|
||||
There are active filters filtering data from another input source.
|
||||
Make sure that these filters are stopped before starting this
|
||||
filter.
|
||||
There are active filters filtering data from another input source.
|
||||
Make sure that these filters are stopped before starting this
|
||||
filter.
|
||||
|
||||
|
||||
|
||||
@ -597,9 +597,9 @@ appropriately. The generic error codes are described at the
|
||||
- ``EBUSY``
|
||||
|
||||
- This error code indicates that there are conflicting requests.
|
||||
There are active filters filtering data from another input source.
|
||||
Make sure that these filters are stopped before starting this
|
||||
filter.
|
||||
There are active filters filtering data from another input source.
|
||||
Make sure that these filters are stopped before starting this
|
||||
filter.
|
||||
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ Output for the demux
|
||||
|
||||
- .. _`DMX-OUT-DECODER`:
|
||||
|
||||
DMX_OUT_DECODER
|
||||
DMX_OUT_DECODER
|
||||
|
||||
- Streaming directly to decoder.
|
||||
|
||||
@ -38,31 +38,31 @@ Output for the demux
|
||||
|
||||
- .. _`DMX-OUT-TAP`:
|
||||
|
||||
DMX_OUT_TAP
|
||||
DMX_OUT_TAP
|
||||
|
||||
- Output going to a memory buffer (to be retrieved via the read
|
||||
command). Delivers the stream output to the demux device on which
|
||||
the ioctl is called.
|
||||
command). Delivers the stream output to the demux device on which
|
||||
the ioctl is called.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- .. _`DMX-OUT-TS-TAP`:
|
||||
|
||||
DMX_OUT_TS_TAP
|
||||
DMX_OUT_TS_TAP
|
||||
|
||||
- Output multiplexed into a new TS (to be retrieved by reading from
|
||||
the logical DVR device). Routes output to the logical DVR device
|
||||
``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
|
||||
all filters for which ``DMX_OUT_TS_TAP`` was specified.
|
||||
the logical DVR device). Routes output to the logical DVR device
|
||||
``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
|
||||
all filters for which ``DMX_OUT_TS_TAP`` was specified.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- .. _`DMX-OUT-TSDEMUX-TAP`:
|
||||
|
||||
DMX_OUT_TSDEMUX_TAP
|
||||
DMX_OUT_TSDEMUX_TAP
|
||||
|
||||
- Like :ref:`DMX_OUT_TS_TAP <DMX-OUT-TS-TAP>` but retrieved
|
||||
from the DMX device.
|
||||
from the DMX device.
|
||||
|
||||
|
||||
|
||||
@ -76,8 +76,8 @@ dmx_input_t
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DMX_IN_FRONTEND, /* Input from a front-end device. */
|
||||
DMX_IN_DVR /* Input from the logical DVR device. */
|
||||
DMX_IN_FRONTEND, /* Input from a front-end device. */
|
||||
DMX_IN_DVR /* Input from the logical DVR device. */
|
||||
} dmx_input_t;
|
||||
|
||||
|
||||
@ -91,31 +91,31 @@ dmx_pes_type_t
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DMX_PES_AUDIO0,
|
||||
DMX_PES_VIDEO0,
|
||||
DMX_PES_TELETEXT0,
|
||||
DMX_PES_SUBTITLE0,
|
||||
DMX_PES_PCR0,
|
||||
DMX_PES_AUDIO0,
|
||||
DMX_PES_VIDEO0,
|
||||
DMX_PES_TELETEXT0,
|
||||
DMX_PES_SUBTITLE0,
|
||||
DMX_PES_PCR0,
|
||||
|
||||
DMX_PES_AUDIO1,
|
||||
DMX_PES_VIDEO1,
|
||||
DMX_PES_TELETEXT1,
|
||||
DMX_PES_SUBTITLE1,
|
||||
DMX_PES_PCR1,
|
||||
DMX_PES_AUDIO1,
|
||||
DMX_PES_VIDEO1,
|
||||
DMX_PES_TELETEXT1,
|
||||
DMX_PES_SUBTITLE1,
|
||||
DMX_PES_PCR1,
|
||||
|
||||
DMX_PES_AUDIO2,
|
||||
DMX_PES_VIDEO2,
|
||||
DMX_PES_TELETEXT2,
|
||||
DMX_PES_SUBTITLE2,
|
||||
DMX_PES_PCR2,
|
||||
DMX_PES_AUDIO2,
|
||||
DMX_PES_VIDEO2,
|
||||
DMX_PES_TELETEXT2,
|
||||
DMX_PES_SUBTITLE2,
|
||||
DMX_PES_PCR2,
|
||||
|
||||
DMX_PES_AUDIO3,
|
||||
DMX_PES_VIDEO3,
|
||||
DMX_PES_TELETEXT3,
|
||||
DMX_PES_SUBTITLE3,
|
||||
DMX_PES_PCR3,
|
||||
DMX_PES_AUDIO3,
|
||||
DMX_PES_VIDEO3,
|
||||
DMX_PES_TELETEXT3,
|
||||
DMX_PES_SUBTITLE3,
|
||||
DMX_PES_PCR3,
|
||||
|
||||
DMX_PES_OTHER
|
||||
DMX_PES_OTHER
|
||||
} dmx_pes_type_t;
|
||||
|
||||
|
||||
@ -129,9 +129,9 @@ struct dmx_filter
|
||||
|
||||
typedef struct dmx_filter
|
||||
{
|
||||
__u8 filter[DMX_FILTER_SIZE];
|
||||
__u8 mask[DMX_FILTER_SIZE];
|
||||
__u8 mode[DMX_FILTER_SIZE];
|
||||
__u8 filter[DMX_FILTER_SIZE];
|
||||
__u8 mask[DMX_FILTER_SIZE];
|
||||
__u8 mode[DMX_FILTER_SIZE];
|
||||
} dmx_filter_t;
|
||||
|
||||
|
||||
@ -145,10 +145,10 @@ struct dmx_sct_filter_params
|
||||
|
||||
struct dmx_sct_filter_params
|
||||
{
|
||||
__u16 pid;
|
||||
dmx_filter_t filter;
|
||||
__u32 timeout;
|
||||
__u32 flags;
|
||||
__u16 pid;
|
||||
dmx_filter_t filter;
|
||||
__u32 timeout;
|
||||
__u32 flags;
|
||||
#define DMX_CHECK_CRC 1
|
||||
#define DMX_ONESHOT 2
|
||||
#define DMX_IMMEDIATE_START 4
|
||||
@ -166,11 +166,11 @@ struct dmx_pes_filter_params
|
||||
|
||||
struct dmx_pes_filter_params
|
||||
{
|
||||
__u16 pid;
|
||||
dmx_input_t input;
|
||||
dmx_output_t output;
|
||||
dmx_pes_type_t pes_type;
|
||||
__u32 flags;
|
||||
__u16 pid;
|
||||
dmx_input_t input;
|
||||
dmx_output_t output;
|
||||
dmx_pes_type_t pes_type;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
|
||||
@ -184,12 +184,12 @@ struct dmx_event
|
||||
|
||||
struct dmx_event
|
||||
{
|
||||
dmx_event_t event;
|
||||
time_t timeStamp;
|
||||
union
|
||||
{
|
||||
dmx_scrambling_status_t scrambling;
|
||||
} u;
|
||||
dmx_event_t event;
|
||||
time_t timeStamp;
|
||||
union
|
||||
{
|
||||
dmx_scrambling_status_t scrambling;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
@ -202,9 +202,9 @@ struct dmx_stc
|
||||
.. code-block:: c
|
||||
|
||||
struct dmx_stc {
|
||||
unsigned int num; /* input : which STC? 0..N */
|
||||
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
|
||||
__u64 stc; /* output: stc in 'base'*90 kHz units */
|
||||
unsigned int num; /* input : which STC? 0..N */
|
||||
unsigned int base; /* output: divisor for stc to get 90 kHz clock */
|
||||
__u64 stc; /* output: stc in 'base'*90 kHz units */
|
||||
};
|
||||
|
||||
|
||||
@ -217,8 +217,8 @@ struct dmx_caps
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct dmx_caps {
|
||||
__u32 caps;
|
||||
int num_decoders;
|
||||
__u32 caps;
|
||||
int num_decoders;
|
||||
} dmx_caps_t;
|
||||
|
||||
|
||||
@ -231,12 +231,12 @@ enum dmx_source_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
DMX_SOURCE_FRONT0 = 0,
|
||||
DMX_SOURCE_FRONT1,
|
||||
DMX_SOURCE_FRONT2,
|
||||
DMX_SOURCE_FRONT3,
|
||||
DMX_SOURCE_DVR0 = 16,
|
||||
DMX_SOURCE_DVR1,
|
||||
DMX_SOURCE_DVR2,
|
||||
DMX_SOURCE_DVR3
|
||||
DMX_SOURCE_FRONT0 = 0,
|
||||
DMX_SOURCE_FRONT1,
|
||||
DMX_SOURCE_FRONT2,
|
||||
DMX_SOURCE_FRONT3,
|
||||
DMX_SOURCE_DVR0 = 16,
|
||||
DMX_SOURCE_DVR1,
|
||||
DMX_SOURCE_DVR2,
|
||||
DMX_SOURCE_DVR3
|
||||
} dmx_source_t;
|
||||
|
@ -12,6 +12,6 @@ struct dtv_fe_stats
|
||||
#define MAX_DTV_STATS 4
|
||||
|
||||
struct dtv_fe_stats {
|
||||
__u8 len;
|
||||
struct dtv_stats stat[MAX_DTV_STATS];
|
||||
__u8 len;
|
||||
struct dtv_stats stat[MAX_DTV_STATS];
|
||||
} __packed;
|
||||
|
@ -10,6 +10,6 @@ struct dtv_properties
|
||||
.. code-block:: c
|
||||
|
||||
struct dtv_properties {
|
||||
__u32 num;
|
||||
struct dtv_property *props;
|
||||
__u32 num;
|
||||
struct dtv_property *props;
|
||||
};
|
||||
|
@ -12,19 +12,19 @@ struct dtv_property
|
||||
/* Reserved fields should be set to 0 */
|
||||
|
||||
struct dtv_property {
|
||||
__u32 cmd;
|
||||
__u32 reserved[3];
|
||||
union {
|
||||
__u32 data;
|
||||
struct dtv_fe_stats st;
|
||||
struct {
|
||||
__u8 data[32];
|
||||
__u32 len;
|
||||
__u32 reserved1[3];
|
||||
void *reserved2;
|
||||
} buffer;
|
||||
} u;
|
||||
int result;
|
||||
__u32 cmd;
|
||||
__u32 reserved[3];
|
||||
union {
|
||||
__u32 data;
|
||||
struct dtv_fe_stats st;
|
||||
struct {
|
||||
__u8 data[32];
|
||||
__u32 len;
|
||||
__u32 reserved1[3];
|
||||
void *reserved2;
|
||||
} buffer;
|
||||
} u;
|
||||
int result;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
|
||||
|
@ -10,9 +10,9 @@ struct dtv_stats
|
||||
.. code-block:: c
|
||||
|
||||
struct dtv_stats {
|
||||
__u8 scale; /* enum fecap_scale_params type */
|
||||
union {
|
||||
__u64 uvalue; /* for counters and relative scales */
|
||||
__s64 svalue; /* for 1/1000 dB measures */
|
||||
};
|
||||
__u8 scale; /* enum fecap_scale_params type */
|
||||
union {
|
||||
__u64 uvalue; /* for counters and relative scales */
|
||||
__s64 svalue; /* for 1/1000 dB measures */
|
||||
};
|
||||
} __packed;
|
||||
|
@ -10,6 +10,6 @@ frontend events
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_frontend_event {
|
||||
fe_status_t status;
|
||||
struct dvb_frontend_parameters parameters;
|
||||
fe_status_t status;
|
||||
struct dvb_frontend_parameters parameters;
|
||||
};
|
||||
|
@ -30,15 +30,15 @@ FrontendParameters structure:
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_frontend_parameters {
|
||||
uint32_t frequency; /* (absolute) frequency in Hz for QAM/OFDM */
|
||||
/* intermediate frequency in kHz for QPSK */
|
||||
fe_spectral_inversion_t inversion;
|
||||
union {
|
||||
struct dvb_qpsk_parameters qpsk;
|
||||
struct dvb_qam_parameters qam;
|
||||
struct dvb_ofdm_parameters ofdm;
|
||||
struct dvb_vsb_parameters vsb;
|
||||
} u;
|
||||
uint32_t frequency; /* (absolute) frequency in Hz for QAM/OFDM */
|
||||
/* intermediate frequency in kHz for QPSK */
|
||||
fe_spectral_inversion_t inversion;
|
||||
union {
|
||||
struct dvb_qpsk_parameters qpsk;
|
||||
struct dvb_qam_parameters qam;
|
||||
struct dvb_ofdm_parameters ofdm;
|
||||
struct dvb_vsb_parameters vsb;
|
||||
} u;
|
||||
};
|
||||
|
||||
In the case of QPSK frontends the ``frequency`` field specifies the
|
||||
@ -61,8 +61,8 @@ structure:
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_qpsk_parameters {
|
||||
uint32_t symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
uint32_t symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
};
|
||||
|
||||
|
||||
@ -77,9 +77,9 @@ for cable QAM frontend you use the ``dvb_qam_parameters`` structure:
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_qam_parameters {
|
||||
uint32_t symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
uint32_t symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
};
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ ATSC frontends are supported by the ``dvb_vsb_parameters`` structure:
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_vsb_parameters {
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
fe_modulation_t modulation; /* modulation type (see above) */
|
||||
};
|
||||
|
||||
|
||||
@ -109,11 +109,11 @@ DVB-T frontends are supported by the ``dvb_ofdm_parameters`` structure:
|
||||
.. code-block:: c
|
||||
|
||||
struct dvb_ofdm_parameters {
|
||||
fe_bandwidth_t bandwidth;
|
||||
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
|
||||
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
|
||||
fe_modulation_t constellation; /* modulation type (see above) */
|
||||
fe_transmit_mode_t transmission_mode;
|
||||
fe_guard_interval_t guard_interval;
|
||||
fe_hierarchy_t hierarchy_information;
|
||||
fe_bandwidth_t bandwidth;
|
||||
fe_code_rate_t code_rate_HP; /* high priority stream code rate */
|
||||
fe_code_rate_t code_rate_LP; /* low priority stream code rate */
|
||||
fe_modulation_t constellation; /* modulation type (see above) */
|
||||
fe_transmit_mode_t transmission_mode;
|
||||
fe_guard_interval_t guard_interval;
|
||||
fe_hierarchy_t hierarchy_information;
|
||||
};
|
||||
|
@ -59,33 +59,33 @@ The code that would do the above is:
|
||||
#include <linux/dvb/frontend.h>
|
||||
|
||||
static struct dtv_property props[] = {
|
||||
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A },
|
||||
{ .cmd = DTV_FREQUENCY, .u.data = 651000000 },
|
||||
{ .cmd = DTV_MODULATION, .u.data = QAM_256 },
|
||||
{ .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO },
|
||||
{ .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 },
|
||||
{ .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 },
|
||||
{ .cmd = DTV_TUNE }
|
||||
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A },
|
||||
{ .cmd = DTV_FREQUENCY, .u.data = 651000000 },
|
||||
{ .cmd = DTV_MODULATION, .u.data = QAM_256 },
|
||||
{ .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO },
|
||||
{ .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 },
|
||||
{ .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 },
|
||||
{ .cmd = DTV_TUNE }
|
||||
};
|
||||
|
||||
static struct dtv_properties dtv_prop = {
|
||||
.num = 6, .props = props
|
||||
.num = 6, .props = props
|
||||
};
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR);
|
||||
int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR);
|
||||
|
||||
if (!fd) {
|
||||
perror ("open");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(fd, FE_SET_PROPERTY, &dtv_prop) == -1) {
|
||||
perror("ioctl");
|
||||
return -1;
|
||||
}
|
||||
printf("Frontend set\\n");
|
||||
return 0;
|
||||
if (!fd) {
|
||||
perror ("open");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(fd, FE_SET_PROPERTY, &dtv_prop) == -1) {
|
||||
perror("ioctl");
|
||||
return -1;
|
||||
}
|
||||
printf("Frontend set\\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
NOTE: While it is possible to directly call the Kernel code like the
|
||||
|
@ -48,23 +48,23 @@ tuners, but can easily be adjusted for QAM.
|
||||
/* routine for checking if we have a signal and other status information*/
|
||||
int FEReadStatus(int fd, fe_status_t *stat)
|
||||
{
|
||||
int ans;
|
||||
int ans;
|
||||
|
||||
if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
|
||||
perror("FE READ STATUS: ");
|
||||
return -1;
|
||||
}
|
||||
if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
|
||||
perror("FE READ STATUS: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*stat & FE_HAS_POWER)
|
||||
printf("FE HAS POWER\\n");
|
||||
if (*stat & FE_HAS_POWER)
|
||||
printf("FE HAS POWER\\n");
|
||||
|
||||
if (*stat & FE_HAS_SIGNAL)
|
||||
printf("FE HAS SIGNAL\\n");
|
||||
if (*stat & FE_HAS_SIGNAL)
|
||||
printf("FE HAS SIGNAL\\n");
|
||||
|
||||
if (*stat & FE_SPECTRUM_INV)
|
||||
printf("SPEKTRUM INV\\n");
|
||||
if (*stat & FE_SPECTRUM_INV)
|
||||
printf("SPEKTRUM INV\\n");
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -80,153 +80,153 @@ tuners, but can easily be adjusted for QAM.
|
||||
/* lnb_slof: switch frequency of LNB */
|
||||
|
||||
int set_qpsk_channel(int freq, int vpid, int apid, int tpid,
|
||||
int diseqc, int pol, int srate, int fec, int lnb_lof1,
|
||||
int lnb_lof2, int lnb_slof)
|
||||
int diseqc, int pol, int srate, int fec, int lnb_lof1,
|
||||
int lnb_lof2, int lnb_slof)
|
||||
{
|
||||
struct secCommand scmd;
|
||||
struct secCmdSequence scmds;
|
||||
struct dmx_pes_filter_params pesFilterParams;
|
||||
FrontendParameters frp;
|
||||
struct pollfd pfd[1];
|
||||
FrontendEvent event;
|
||||
int demux1, demux2, demux3, front;
|
||||
struct secCommand scmd;
|
||||
struct secCmdSequence scmds;
|
||||
struct dmx_pes_filter_params pesFilterParams;
|
||||
FrontendParameters frp;
|
||||
struct pollfd pfd[1];
|
||||
FrontendEvent event;
|
||||
int demux1, demux2, demux3, front;
|
||||
|
||||
frequency = (uint32_t) freq;
|
||||
symbolrate = (uint32_t) srate;
|
||||
frequency = (uint32_t) freq;
|
||||
symbolrate = (uint32_t) srate;
|
||||
|
||||
if((front = open(FRONT,O_RDWR)) < 0){
|
||||
perror("FRONTEND DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
if((front = open(FRONT,O_RDWR)) < 0){
|
||||
perror("FRONTEND DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if((sec = open(SEC,O_RDWR)) < 0){
|
||||
perror("SEC DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
if((sec = open(SEC,O_RDWR)) < 0){
|
||||
perror("SEC DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (demux1 < 0){
|
||||
if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (demux1 < 0){
|
||||
if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (demux2 < 0){
|
||||
if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (demux2 < 0){
|
||||
if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (demux3 < 0){
|
||||
if ((demux3=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (demux3 < 0){
|
||||
if ((demux3=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (freq < lnb_slof) {
|
||||
frp.Frequency = (freq - lnb_lof1);
|
||||
scmds.continuousTone = SEC_TONE_OFF;
|
||||
} else {
|
||||
frp.Frequency = (freq - lnb_lof2);
|
||||
scmds.continuousTone = SEC_TONE_ON;
|
||||
}
|
||||
frp.Inversion = INVERSION_AUTO;
|
||||
if (pol) scmds.voltage = SEC_VOLTAGE_18;
|
||||
else scmds.voltage = SEC_VOLTAGE_13;
|
||||
if (freq < lnb_slof) {
|
||||
frp.Frequency = (freq - lnb_lof1);
|
||||
scmds.continuousTone = SEC_TONE_OFF;
|
||||
} else {
|
||||
frp.Frequency = (freq - lnb_lof2);
|
||||
scmds.continuousTone = SEC_TONE_ON;
|
||||
}
|
||||
frp.Inversion = INVERSION_AUTO;
|
||||
if (pol) scmds.voltage = SEC_VOLTAGE_18;
|
||||
else scmds.voltage = SEC_VOLTAGE_13;
|
||||
|
||||
scmd.type=0;
|
||||
scmd.u.diseqc.addr=0x10;
|
||||
scmd.u.diseqc.cmd=0x38;
|
||||
scmd.u.diseqc.numParams=1;
|
||||
scmd.u.diseqc.params[0] = 0xF0 | ((diseqc * 4) & 0x0F) |
|
||||
(scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
|
||||
(scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
|
||||
scmd.type=0;
|
||||
scmd.u.diseqc.addr=0x10;
|
||||
scmd.u.diseqc.cmd=0x38;
|
||||
scmd.u.diseqc.numParams=1;
|
||||
scmd.u.diseqc.params[0] = 0xF0 | ((diseqc * 4) & 0x0F) |
|
||||
(scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
|
||||
(scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
|
||||
|
||||
scmds.miniCommand=SEC_MINI_NONE;
|
||||
scmds.numCommands=1;
|
||||
scmds.commands=&scmd;
|
||||
if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
|
||||
perror("SEC SEND: ");
|
||||
return -1;
|
||||
}
|
||||
scmds.miniCommand=SEC_MINI_NONE;
|
||||
scmds.numCommands=1;
|
||||
scmds.commands=&scmd;
|
||||
if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
|
||||
perror("SEC SEND: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
|
||||
perror("SEC SEND: ");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
|
||||
perror("SEC SEND: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
frp.u.qpsk.SymbolRate = srate;
|
||||
frp.u.qpsk.FEC_inner = fec;
|
||||
frp.u.qpsk.SymbolRate = srate;
|
||||
frp.u.qpsk.FEC_inner = fec;
|
||||
|
||||
if (ioctl(front, FE_SET_FRONTEND, &frp) < 0){
|
||||
perror("QPSK TUNE: ");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(front, FE_SET_FRONTEND, &frp) < 0){
|
||||
perror("QPSK TUNE: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pfd[0].fd = front;
|
||||
pfd[0].events = POLLIN;
|
||||
pfd[0].fd = front;
|
||||
pfd[0].events = POLLIN;
|
||||
|
||||
if (poll(pfd,1,3000)){
|
||||
if (pfd[0].revents & POLLIN){
|
||||
printf("Getting QPSK event\\n");
|
||||
if ( ioctl(front, FE_GET_EVENT, &event)
|
||||
if (poll(pfd,1,3000)){
|
||||
if (pfd[0].revents & POLLIN){
|
||||
printf("Getting QPSK event\\n");
|
||||
if ( ioctl(front, FE_GET_EVENT, &event)
|
||||
|
||||
== -EOVERFLOW){
|
||||
perror("qpsk get event");
|
||||
return -1;
|
||||
}
|
||||
printf("Received ");
|
||||
switch(event.type){
|
||||
case FE_UNEXPECTED_EV:
|
||||
printf("unexpected event\\n");
|
||||
return -1;
|
||||
case FE_FAILURE_EV:
|
||||
printf("failure event\\n");
|
||||
return -1;
|
||||
== -EOVERFLOW){
|
||||
perror("qpsk get event");
|
||||
return -1;
|
||||
}
|
||||
printf("Received ");
|
||||
switch(event.type){
|
||||
case FE_UNEXPECTED_EV:
|
||||
printf("unexpected event\\n");
|
||||
return -1;
|
||||
case FE_FAILURE_EV:
|
||||
printf("failure event\\n");
|
||||
return -1;
|
||||
|
||||
case FE_COMPLETION_EV:
|
||||
printf("completion event\\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
case FE_COMPLETION_EV:
|
||||
printf("completion event\\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pesFilterParams.pid = vpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_VIDEO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_vpid");
|
||||
return -1;
|
||||
}
|
||||
pesFilterParams.pid = vpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_VIDEO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_vpid");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pesFilterParams.pid = apid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_AUDIO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_apid");
|
||||
return -1;
|
||||
}
|
||||
pesFilterParams.pid = apid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_AUDIO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_apid");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pesFilterParams.pid = tpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_TELETEXT;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux3, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_tpid");
|
||||
return -1;
|
||||
}
|
||||
pesFilterParams.pid = tpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_DECODER;
|
||||
pesFilterParams.pes_type = DMX_PES_TELETEXT;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux3, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("set_tpid");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return has_signal(fds);
|
||||
return has_signal(fds);
|
||||
}
|
||||
|
||||
The program assumes that you are using a universal LNB and a standard
|
||||
@ -274,43 +274,43 @@ recording.
|
||||
|
||||
int switch_to_record(int demux1, int demux2, uint16_t vpid, uint16_t apid)
|
||||
{
|
||||
struct dmx_pes_filter_params pesFilterParams;
|
||||
struct dmx_pes_filter_params pesFilterParams;
|
||||
|
||||
if (demux1 < 0){
|
||||
if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (demux1 < 0){
|
||||
if ((demux1=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (demux2 < 0){
|
||||
if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (demux2 < 0){
|
||||
if ((demux2=open(DMX, O_RDWR|O_NONBLOCK))
|
||||
< 0){
|
||||
perror("DEMUX DEVICE: ");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
pesFilterParams.pid = vpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_TS_TAP;
|
||||
pesFilterParams.pes_type = DMX_PES_VIDEO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("DEMUX DEVICE");
|
||||
return -1;
|
||||
}
|
||||
pesFilterParams.pid = apid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_TS_TAP;
|
||||
pesFilterParams.pes_type = DMX_PES_AUDIO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("DEMUX DEVICE");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
pesFilterParams.pid = vpid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_TS_TAP;
|
||||
pesFilterParams.pes_type = DMX_PES_VIDEO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux1, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("DEMUX DEVICE");
|
||||
return -1;
|
||||
}
|
||||
pesFilterParams.pid = apid;
|
||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||
pesFilterParams.output = DMX_OUT_TS_TAP;
|
||||
pesFilterParams.pes_type = DMX_PES_AUDIO;
|
||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||
if (ioctl(demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0){
|
||||
perror("DEMUX DEVICE");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* start recording MAX_LENGTH , assuming the transponder is tuned */
|
||||
@ -319,62 +319,62 @@ recording.
|
||||
/* vpid, apid: PIDs of video and audio channels */
|
||||
int record_dvr(int demux1, int demux2, uint16_t vpid, uint16_t apid)
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
int written;
|
||||
uint8_t buf[BUFFY];
|
||||
uint64_t length;
|
||||
struct pollfd pfd[1];
|
||||
int dvr, dvr_out;
|
||||
int i;
|
||||
int len;
|
||||
int written;
|
||||
uint8_t buf[BUFFY];
|
||||
uint64_t length;
|
||||
struct pollfd pfd[1];
|
||||
int dvr, dvr_out;
|
||||
|
||||
/* open dvr device */
|
||||
if ((dvr = open(DVR, O_RDONLY|O_NONBLOCK)) < 0){
|
||||
perror("DVR DEVICE");
|
||||
return -1;
|
||||
}
|
||||
/* open dvr device */
|
||||
if ((dvr = open(DVR, O_RDONLY|O_NONBLOCK)) < 0){
|
||||
perror("DVR DEVICE");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* switch video and audio demuxes to dvr */
|
||||
printf ("Switching dvr on\\n");
|
||||
i = switch_to_record(demux1, demux2, vpid, apid);
|
||||
printf("finished: ");
|
||||
/* switch video and audio demuxes to dvr */
|
||||
printf ("Switching dvr on\\n");
|
||||
i = switch_to_record(demux1, demux2, vpid, apid);
|
||||
printf("finished: ");
|
||||
|
||||
printf("Recording %2.0f MB of test file in TS format\\n",
|
||||
MAX_LENGTH/(1024.0*1024.0));
|
||||
length = 0;
|
||||
printf("Recording %2.0f MB of test file in TS format\\n",
|
||||
MAX_LENGTH/(1024.0*1024.0));
|
||||
length = 0;
|
||||
|
||||
/* open output file */
|
||||
if ((dvr_out = open(DVR_FILE,O_WRONLY|O_CREAT
|
||||
|O_TRUNC, S_IRUSR|S_IWUSR
|
||||
|S_IRGRP|S_IWGRP|S_IROTH|
|
||||
S_IWOTH)) < 0){
|
||||
perror("Can't open file for dvr test");
|
||||
return -1;
|
||||
}
|
||||
/* open output file */
|
||||
if ((dvr_out = open(DVR_FILE,O_WRONLY|O_CREAT
|
||||
|O_TRUNC, S_IRUSR|S_IWUSR
|
||||
|S_IRGRP|S_IWGRP|S_IROTH|
|
||||
S_IWOTH)) < 0){
|
||||
perror("Can't open file for dvr test");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pfd[0].fd = dvr;
|
||||
pfd[0].events = POLLIN;
|
||||
pfd[0].fd = dvr;
|
||||
pfd[0].events = POLLIN;
|
||||
|
||||
/* poll for dvr data and write to file */
|
||||
while (length < MAX_LENGTH ) {
|
||||
if (poll(pfd,1,1)){
|
||||
if (pfd[0].revents & POLLIN){
|
||||
len = read(dvr, buf, BUFFY);
|
||||
if (len < 0){
|
||||
perror("recording");
|
||||
return -1;
|
||||
}
|
||||
if (len > 0){
|
||||
written = 0;
|
||||
while (written < len)
|
||||
written +=
|
||||
write (dvr_out,
|
||||
buf, len);
|
||||
length += len;
|
||||
printf("written %2.0f MB\\r",
|
||||
length/1024./1024.);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
/* poll for dvr data and write to file */
|
||||
while (length < MAX_LENGTH ) {
|
||||
if (poll(pfd,1,1)){
|
||||
if (pfd[0].revents & POLLIN){
|
||||
len = read(dvr, buf, BUFFY);
|
||||
if (len < 0){
|
||||
perror("recording");
|
||||
return -1;
|
||||
}
|
||||
if (len > 0){
|
||||
written = 0;
|
||||
while (written < len)
|
||||
written +=
|
||||
write (dvr_out,
|
||||
buf, len);
|
||||
length += len;
|
||||
printf("written %2.0f MB\\r",
|
||||
length/1024./1024.);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-AUTO`:
|
||||
|
||||
``BANDWIDTH_AUTO``
|
||||
``BANDWIDTH_AUTO``
|
||||
|
||||
- Autodetect bandwidth (if supported)
|
||||
|
||||
@ -32,7 +32,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-1-712-MHZ`:
|
||||
|
||||
``BANDWIDTH_1_712_MHZ``
|
||||
``BANDWIDTH_1_712_MHZ``
|
||||
|
||||
- 1.712 MHz
|
||||
|
||||
@ -40,7 +40,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-5-MHZ`:
|
||||
|
||||
``BANDWIDTH_5_MHZ``
|
||||
``BANDWIDTH_5_MHZ``
|
||||
|
||||
- 5 MHz
|
||||
|
||||
@ -48,7 +48,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-6-MHZ`:
|
||||
|
||||
``BANDWIDTH_6_MHZ``
|
||||
``BANDWIDTH_6_MHZ``
|
||||
|
||||
- 6 MHz
|
||||
|
||||
@ -56,7 +56,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-7-MHZ`:
|
||||
|
||||
``BANDWIDTH_7_MHZ``
|
||||
``BANDWIDTH_7_MHZ``
|
||||
|
||||
- 7 MHz
|
||||
|
||||
@ -64,7 +64,7 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-8-MHZ`:
|
||||
|
||||
``BANDWIDTH_8_MHZ``
|
||||
``BANDWIDTH_8_MHZ``
|
||||
|
||||
- 8 MHz
|
||||
|
||||
@ -72,6 +72,6 @@ Frontend bandwidth
|
||||
|
||||
- .. _`BANDWIDTH-10-MHZ`:
|
||||
|
||||
``BANDWIDTH_10_MHZ``
|
||||
``BANDWIDTH_10_MHZ``
|
||||
|
||||
- 10 MHz
|
||||
|
@ -65,7 +65,7 @@ appropriately. The generic error codes are described at the
|
||||
- msg_len
|
||||
|
||||
- Length of the DiSEqC message. Valid values are 0 to 4, where 0
|
||||
means no msg
|
||||
means no msg
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -74,4 +74,4 @@ appropriately. The generic error codes are described at the
|
||||
- timeout
|
||||
|
||||
- Return from ioctl after timeout ms with errorcode when no message
|
||||
was received
|
||||
was received
|
||||
|
@ -69,7 +69,7 @@ enum fe_sec_mini_cmd
|
||||
|
||||
- .. _`SEC-MINI-A`:
|
||||
|
||||
``SEC_MINI_A``
|
||||
``SEC_MINI_A``
|
||||
|
||||
- Sends a mini-DiSEqC 22kHz '0' Tone Burst to select satellite-A
|
||||
|
||||
@ -77,6 +77,6 @@ enum fe_sec_mini_cmd
|
||||
|
||||
- .. _`SEC-MINI-B`:
|
||||
|
||||
``SEC_MINI_B``
|
||||
``SEC_MINI_B``
|
||||
|
||||
- Sends a mini-DiSEqC 22kHz '1' Data Burst to select satellite-B
|
||||
|
@ -71,8 +71,8 @@ appropriately. The generic error codes are described at the
|
||||
- type
|
||||
|
||||
- **DEPRECATED**. DVBv3 type. Should not be used on modern programs,
|
||||
as a frontend may have more than one type. So, the DVBv5 API
|
||||
should be used instead to enumerate and select the frontend type.
|
||||
as a frontend may have more than one type. So, the DVBv5 API
|
||||
should be used instead to enumerate and select the frontend type.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -177,16 +177,16 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-IS-STUPID`:
|
||||
|
||||
``FE_IS_STUPID``
|
||||
``FE_IS_STUPID``
|
||||
|
||||
- There's something wrong at the frontend, and it can't report its
|
||||
capabilities
|
||||
capabilities
|
||||
|
||||
- .. row 3
|
||||
|
||||
- .. _`FE-CAN-INVERSION-AUTO`:
|
||||
|
||||
``FE_CAN_INVERSION_AUTO``
|
||||
``FE_CAN_INVERSION_AUTO``
|
||||
|
||||
- The frontend is capable of auto-detecting inversion
|
||||
|
||||
@ -194,7 +194,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-1-2`:
|
||||
|
||||
``FE_CAN_FEC_1_2``
|
||||
``FE_CAN_FEC_1_2``
|
||||
|
||||
- The frontend supports FEC 1/2
|
||||
|
||||
@ -202,7 +202,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-2-3`:
|
||||
|
||||
``FE_CAN_FEC_2_3``
|
||||
``FE_CAN_FEC_2_3``
|
||||
|
||||
- The frontend supports FEC 2/3
|
||||
|
||||
@ -210,7 +210,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-3-4`:
|
||||
|
||||
``FE_CAN_FEC_3_4``
|
||||
``FE_CAN_FEC_3_4``
|
||||
|
||||
- The frontend supports FEC 3/4
|
||||
|
||||
@ -218,7 +218,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-4-5`:
|
||||
|
||||
``FE_CAN_FEC_4_5``
|
||||
``FE_CAN_FEC_4_5``
|
||||
|
||||
- The frontend supports FEC 4/5
|
||||
|
||||
@ -226,7 +226,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-5-6`:
|
||||
|
||||
``FE_CAN_FEC_5_6``
|
||||
``FE_CAN_FEC_5_6``
|
||||
|
||||
- The frontend supports FEC 5/6
|
||||
|
||||
@ -234,7 +234,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-6-7`:
|
||||
|
||||
``FE_CAN_FEC_6_7``
|
||||
``FE_CAN_FEC_6_7``
|
||||
|
||||
- The frontend supports FEC 6/7
|
||||
|
||||
@ -242,7 +242,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-7-8`:
|
||||
|
||||
``FE_CAN_FEC_7_8``
|
||||
``FE_CAN_FEC_7_8``
|
||||
|
||||
- The frontend supports FEC 7/8
|
||||
|
||||
@ -250,7 +250,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-8-9`:
|
||||
|
||||
``FE_CAN_FEC_8_9``
|
||||
``FE_CAN_FEC_8_9``
|
||||
|
||||
- The frontend supports FEC 8/9
|
||||
|
||||
@ -258,7 +258,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-FEC-AUTO`:
|
||||
|
||||
``FE_CAN_FEC_AUTO``
|
||||
``FE_CAN_FEC_AUTO``
|
||||
|
||||
- The frontend can autodetect FEC.
|
||||
|
||||
@ -266,7 +266,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QPSK`:
|
||||
|
||||
``FE_CAN_QPSK``
|
||||
``FE_CAN_QPSK``
|
||||
|
||||
- The frontend supports QPSK modulation
|
||||
|
||||
@ -274,7 +274,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-16`:
|
||||
|
||||
``FE_CAN_QAM_16``
|
||||
``FE_CAN_QAM_16``
|
||||
|
||||
- The frontend supports 16-QAM modulation
|
||||
|
||||
@ -282,7 +282,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-32`:
|
||||
|
||||
``FE_CAN_QAM_32``
|
||||
``FE_CAN_QAM_32``
|
||||
|
||||
- The frontend supports 32-QAM modulation
|
||||
|
||||
@ -290,7 +290,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-64`:
|
||||
|
||||
``FE_CAN_QAM_64``
|
||||
``FE_CAN_QAM_64``
|
||||
|
||||
- The frontend supports 64-QAM modulation
|
||||
|
||||
@ -298,7 +298,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-128`:
|
||||
|
||||
``FE_CAN_QAM_128``
|
||||
``FE_CAN_QAM_128``
|
||||
|
||||
- The frontend supports 128-QAM modulation
|
||||
|
||||
@ -306,7 +306,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-256`:
|
||||
|
||||
``FE_CAN_QAM_256``
|
||||
``FE_CAN_QAM_256``
|
||||
|
||||
- The frontend supports 256-QAM modulation
|
||||
|
||||
@ -314,7 +314,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-QAM-AUTO`:
|
||||
|
||||
``FE_CAN_QAM_AUTO``
|
||||
``FE_CAN_QAM_AUTO``
|
||||
|
||||
- The frontend can autodetect modulation
|
||||
|
||||
@ -322,7 +322,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-TRANSMISSION-MODE-AUTO`:
|
||||
|
||||
``FE_CAN_TRANSMISSION_MODE_AUTO``
|
||||
``FE_CAN_TRANSMISSION_MODE_AUTO``
|
||||
|
||||
- The frontend can autodetect the transmission mode
|
||||
|
||||
@ -330,7 +330,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-BANDWIDTH-AUTO`:
|
||||
|
||||
``FE_CAN_BANDWIDTH_AUTO``
|
||||
``FE_CAN_BANDWIDTH_AUTO``
|
||||
|
||||
- The frontend can autodetect the bandwidth
|
||||
|
||||
@ -338,7 +338,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-GUARD-INTERVAL-AUTO`:
|
||||
|
||||
``FE_CAN_GUARD_INTERVAL_AUTO``
|
||||
``FE_CAN_GUARD_INTERVAL_AUTO``
|
||||
|
||||
- The frontend can autodetect the guard interval
|
||||
|
||||
@ -346,7 +346,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-HIERARCHY-AUTO`:
|
||||
|
||||
``FE_CAN_HIERARCHY_AUTO``
|
||||
``FE_CAN_HIERARCHY_AUTO``
|
||||
|
||||
- The frontend can autodetect hierarch
|
||||
|
||||
@ -354,7 +354,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-8VSB`:
|
||||
|
||||
``FE_CAN_8VSB``
|
||||
``FE_CAN_8VSB``
|
||||
|
||||
- The frontend supports 8-VSB modulation
|
||||
|
||||
@ -362,7 +362,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-16VSB`:
|
||||
|
||||
``FE_CAN_16VSB``
|
||||
``FE_CAN_16VSB``
|
||||
|
||||
- The frontend supports 16-VSB modulation
|
||||
|
||||
@ -370,7 +370,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-HAS-EXTENDED-CAPS`:
|
||||
|
||||
``FE_HAS_EXTENDED_CAPS``
|
||||
``FE_HAS_EXTENDED_CAPS``
|
||||
|
||||
- Currently, unused
|
||||
|
||||
@ -378,7 +378,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-MULTISTREAM`:
|
||||
|
||||
``FE_CAN_MULTISTREAM``
|
||||
``FE_CAN_MULTISTREAM``
|
||||
|
||||
- The frontend supports multistream filtering
|
||||
|
||||
@ -386,7 +386,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-TURBO-FEC`:
|
||||
|
||||
``FE_CAN_TURBO_FEC``
|
||||
``FE_CAN_TURBO_FEC``
|
||||
|
||||
- The frontend supports turbo FEC modulation
|
||||
|
||||
@ -394,7 +394,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-2G-MODULATION`:
|
||||
|
||||
``FE_CAN_2G_MODULATION``
|
||||
``FE_CAN_2G_MODULATION``
|
||||
|
||||
- The frontend supports "2nd generation modulation" (DVB-S2/T2)>
|
||||
|
||||
@ -402,7 +402,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-NEEDS-BENDING`:
|
||||
|
||||
``FE_NEEDS_BENDING``
|
||||
``FE_NEEDS_BENDING``
|
||||
|
||||
- Not supported anymore, don't use it
|
||||
|
||||
@ -410,7 +410,7 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-RECOVER`:
|
||||
|
||||
``FE_CAN_RECOVER``
|
||||
``FE_CAN_RECOVER``
|
||||
|
||||
- The frontend can recover from a cable unplug automatically
|
||||
|
||||
@ -418,6 +418,6 @@ supported only on some specific frontend types.
|
||||
|
||||
- .. _`FE-CAN-MUTE-TS`:
|
||||
|
||||
``FE_CAN_MUTE_TS``
|
||||
``FE_CAN_MUTE_TS``
|
||||
|
||||
- The frontend can stop spurious TS data output
|
||||
|
@ -77,7 +77,7 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-HAS-SIGNAL`:
|
||||
|
||||
``FE_HAS_SIGNAL``
|
||||
``FE_HAS_SIGNAL``
|
||||
|
||||
- The frontend has found something above the noise level
|
||||
|
||||
@ -85,7 +85,7 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-HAS-CARRIER`:
|
||||
|
||||
``FE_HAS_CARRIER``
|
||||
``FE_HAS_CARRIER``
|
||||
|
||||
- The frontend has found a DVB signal
|
||||
|
||||
@ -93,16 +93,16 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-HAS-VITERBI`:
|
||||
|
||||
``FE_HAS_VITERBI``
|
||||
``FE_HAS_VITERBI``
|
||||
|
||||
- The frontend FEC inner coding (Viterbi, LDPC or other inner code)
|
||||
is stable
|
||||
is stable
|
||||
|
||||
- .. row 5
|
||||
|
||||
- .. _`FE-HAS-SYNC`:
|
||||
|
||||
``FE_HAS_SYNC``
|
||||
``FE_HAS_SYNC``
|
||||
|
||||
- Synchronization bytes was found
|
||||
|
||||
@ -110,7 +110,7 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-HAS-LOCK`:
|
||||
|
||||
``FE_HAS_LOCK``
|
||||
``FE_HAS_LOCK``
|
||||
|
||||
- The DVB were locked and everything is working
|
||||
|
||||
@ -118,7 +118,7 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-TIMEDOUT`:
|
||||
|
||||
``FE_TIMEDOUT``
|
||||
``FE_TIMEDOUT``
|
||||
|
||||
- no lock within the last about 2 seconds
|
||||
|
||||
@ -126,7 +126,7 @@ state changes of the frontend hardware. It is produced using the enum
|
||||
|
||||
- .. _`FE-REINIT`:
|
||||
|
||||
``FE_REINIT``
|
||||
``FE_REINIT``
|
||||
|
||||
- The frontend was reinitialized, application is recommended to
|
||||
reset DiSEqC, tone and parameters
|
||||
reset DiSEqC, tone and parameters
|
||||
|
@ -75,7 +75,7 @@ enum fe_sec_tone_mode
|
||||
|
||||
- .. _`SEC-TONE-ON`:
|
||||
|
||||
``SEC_TONE_ON``
|
||||
``SEC_TONE_ON``
|
||||
|
||||
- Sends a 22kHz tone burst to the antenna
|
||||
|
||||
@ -83,7 +83,7 @@ enum fe_sec_tone_mode
|
||||
|
||||
- .. _`SEC-TONE-OFF`:
|
||||
|
||||
``SEC_TONE_OFF``
|
||||
``SEC_TONE_OFF``
|
||||
|
||||
- Don't send a 22kHz tone to the antenna (except if the
|
||||
FE_DISEQC_* ioctls are called)
|
||||
FE_DISEQC_* ioctls are called)
|
||||
|
@ -26,13 +26,13 @@ fe_type_t type, defined as:
|
||||
- Description
|
||||
|
||||
- :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` equivalent
|
||||
type
|
||||
type
|
||||
|
||||
- .. row 2
|
||||
|
||||
- .. _`FE-QPSK`:
|
||||
|
||||
``FE_QPSK``
|
||||
``FE_QPSK``
|
||||
|
||||
- For DVB-S standard
|
||||
|
||||
@ -42,7 +42,7 @@ fe_type_t type, defined as:
|
||||
|
||||
- .. _`FE-QAM`:
|
||||
|
||||
``FE_QAM``
|
||||
``FE_QAM``
|
||||
|
||||
- For DVB-C annex A standard
|
||||
|
||||
@ -52,7 +52,7 @@ fe_type_t type, defined as:
|
||||
|
||||
- .. _`FE-OFDM`:
|
||||
|
||||
``FE_OFDM``
|
||||
``FE_OFDM``
|
||||
|
||||
- For DVB-T standard
|
||||
|
||||
@ -62,10 +62,10 @@ fe_type_t type, defined as:
|
||||
|
||||
- .. _`FE-ATSC`:
|
||||
|
||||
``FE_ATSC``
|
||||
``FE_ATSC``
|
||||
|
||||
- For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used
|
||||
in US.
|
||||
in US.
|
||||
|
||||
- ``SYS_ATSC`` (terrestrial) or ``SYS_DVBC_ANNEX_B`` (cable)
|
||||
|
||||
|
@ -93,7 +93,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QPSK`:
|
||||
|
||||
``QPSK``
|
||||
``QPSK``
|
||||
|
||||
- QPSK modulation
|
||||
|
||||
@ -101,7 +101,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-16`:
|
||||
|
||||
``QAM_16``
|
||||
``QAM_16``
|
||||
|
||||
- 16-QAM modulation
|
||||
|
||||
@ -109,7 +109,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-32`:
|
||||
|
||||
``QAM_32``
|
||||
``QAM_32``
|
||||
|
||||
- 32-QAM modulation
|
||||
|
||||
@ -117,7 +117,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-64`:
|
||||
|
||||
``QAM_64``
|
||||
``QAM_64``
|
||||
|
||||
- 64-QAM modulation
|
||||
|
||||
@ -125,7 +125,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-128`:
|
||||
|
||||
``QAM_128``
|
||||
``QAM_128``
|
||||
|
||||
- 128-QAM modulation
|
||||
|
||||
@ -133,7 +133,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-256`:
|
||||
|
||||
``QAM_256``
|
||||
``QAM_256``
|
||||
|
||||
- 256-QAM modulation
|
||||
|
||||
@ -141,7 +141,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-AUTO`:
|
||||
|
||||
``QAM_AUTO``
|
||||
``QAM_AUTO``
|
||||
|
||||
- Autodetect QAM modulation
|
||||
|
||||
@ -149,7 +149,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`VSB-8`:
|
||||
|
||||
``VSB_8``
|
||||
``VSB_8``
|
||||
|
||||
- 8-VSB modulation
|
||||
|
||||
@ -157,7 +157,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`VSB-16`:
|
||||
|
||||
``VSB_16``
|
||||
``VSB_16``
|
||||
|
||||
- 16-VSB modulation
|
||||
|
||||
@ -165,7 +165,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`PSK-8`:
|
||||
|
||||
``PSK_8``
|
||||
``PSK_8``
|
||||
|
||||
- 8-PSK modulation
|
||||
|
||||
@ -173,7 +173,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`APSK-16`:
|
||||
|
||||
``APSK_16``
|
||||
``APSK_16``
|
||||
|
||||
- 16-APSK modulation
|
||||
|
||||
@ -181,7 +181,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`APSK-32`:
|
||||
|
||||
``APSK_32``
|
||||
``APSK_32``
|
||||
|
||||
- 32-APSK modulation
|
||||
|
||||
@ -189,7 +189,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`DQPSK`:
|
||||
|
||||
``DQPSK``
|
||||
``DQPSK``
|
||||
|
||||
- DQPSK modulation
|
||||
|
||||
@ -197,7 +197,7 @@ modulations are supported by a given standard.
|
||||
|
||||
- .. _`QAM-4-NR`:
|
||||
|
||||
``QAM_4_NR``
|
||||
``QAM_4_NR``
|
||||
|
||||
- 4-QAM-NR modulation
|
||||
|
||||
@ -269,7 +269,7 @@ inversion off. If it fails, it will try to enable inversion.
|
||||
|
||||
- .. _`INVERSION-OFF`:
|
||||
|
||||
``INVERSION_OFF``
|
||||
``INVERSION_OFF``
|
||||
|
||||
- Don't do spectral band inversion.
|
||||
|
||||
@ -277,7 +277,7 @@ inversion off. If it fails, it will try to enable inversion.
|
||||
|
||||
- .. _`INVERSION-ON`:
|
||||
|
||||
``INVERSION_ON``
|
||||
``INVERSION_ON``
|
||||
|
||||
- Do spectral band inversion.
|
||||
|
||||
@ -285,7 +285,7 @@ inversion off. If it fails, it will try to enable inversion.
|
||||
|
||||
- .. _`INVERSION-AUTO`:
|
||||
|
||||
``INVERSION_AUTO``
|
||||
``INVERSION_AUTO``
|
||||
|
||||
- Autodetect spectral band inversion.
|
||||
|
||||
@ -339,7 +339,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-NONE`:
|
||||
|
||||
``FEC_NONE``
|
||||
``FEC_NONE``
|
||||
|
||||
- No Forward Error Correction Code
|
||||
|
||||
@ -347,7 +347,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-AUTO`:
|
||||
|
||||
``FEC_AUTO``
|
||||
``FEC_AUTO``
|
||||
|
||||
- Autodetect Error Correction Code
|
||||
|
||||
@ -355,7 +355,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-1-2`:
|
||||
|
||||
``FEC_1_2``
|
||||
``FEC_1_2``
|
||||
|
||||
- Forward Error Correction Code 1/2
|
||||
|
||||
@ -363,7 +363,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-2-3`:
|
||||
|
||||
``FEC_2_3``
|
||||
``FEC_2_3``
|
||||
|
||||
- Forward Error Correction Code 2/3
|
||||
|
||||
@ -371,7 +371,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-3-4`:
|
||||
|
||||
``FEC_3_4``
|
||||
``FEC_3_4``
|
||||
|
||||
- Forward Error Correction Code 3/4
|
||||
|
||||
@ -379,7 +379,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-4-5`:
|
||||
|
||||
``FEC_4_5``
|
||||
``FEC_4_5``
|
||||
|
||||
- Forward Error Correction Code 4/5
|
||||
|
||||
@ -387,7 +387,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-5-6`:
|
||||
|
||||
``FEC_5_6``
|
||||
``FEC_5_6``
|
||||
|
||||
- Forward Error Correction Code 5/6
|
||||
|
||||
@ -395,7 +395,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-6-7`:
|
||||
|
||||
``FEC_6_7``
|
||||
``FEC_6_7``
|
||||
|
||||
- Forward Error Correction Code 6/7
|
||||
|
||||
@ -403,7 +403,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-7-8`:
|
||||
|
||||
``FEC_7_8``
|
||||
``FEC_7_8``
|
||||
|
||||
- Forward Error Correction Code 7/8
|
||||
|
||||
@ -411,7 +411,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-8-9`:
|
||||
|
||||
``FEC_8_9``
|
||||
``FEC_8_9``
|
||||
|
||||
- Forward Error Correction Code 8/9
|
||||
|
||||
@ -419,7 +419,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-9-10`:
|
||||
|
||||
``FEC_9_10``
|
||||
``FEC_9_10``
|
||||
|
||||
- Forward Error Correction Code 9/10
|
||||
|
||||
@ -427,7 +427,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-2-5`:
|
||||
|
||||
``FEC_2_5``
|
||||
``FEC_2_5``
|
||||
|
||||
- Forward Error Correction Code 2/5
|
||||
|
||||
@ -435,7 +435,7 @@ enum fe_code_rate: type of the Forward Error Correction.
|
||||
|
||||
- .. _`FEC-3-5`:
|
||||
|
||||
``FEC_3_5``
|
||||
``FEC_3_5``
|
||||
|
||||
- Forward Error Correction Code 3/5
|
||||
|
||||
@ -469,7 +469,7 @@ described in the DiSEqC spec.
|
||||
|
||||
- .. _`SEC-VOLTAGE-13`:
|
||||
|
||||
``SEC_VOLTAGE_13``
|
||||
``SEC_VOLTAGE_13``
|
||||
|
||||
- Set DC voltage level to 13V
|
||||
|
||||
@ -477,7 +477,7 @@ described in the DiSEqC spec.
|
||||
|
||||
- .. _`SEC-VOLTAGE-18`:
|
||||
|
||||
``SEC_VOLTAGE_18``
|
||||
``SEC_VOLTAGE_18``
|
||||
|
||||
- Set DC voltage level to 18V
|
||||
|
||||
@ -485,7 +485,7 @@ described in the DiSEqC spec.
|
||||
|
||||
- .. _`SEC-VOLTAGE-OFF`:
|
||||
|
||||
``SEC_VOLTAGE_OFF``
|
||||
``SEC_VOLTAGE_OFF``
|
||||
|
||||
- Don't send any voltage to the antenna
|
||||
|
||||
@ -530,7 +530,7 @@ fe_pilot type
|
||||
|
||||
- .. _`PILOT-ON`:
|
||||
|
||||
``PILOT_ON``
|
||||
``PILOT_ON``
|
||||
|
||||
- Pilot tones enabled
|
||||
|
||||
@ -538,7 +538,7 @@ fe_pilot type
|
||||
|
||||
- .. _`PILOT-OFF`:
|
||||
|
||||
``PILOT_OFF``
|
||||
``PILOT_OFF``
|
||||
|
||||
- Pilot tones disabled
|
||||
|
||||
@ -546,7 +546,7 @@ fe_pilot type
|
||||
|
||||
- .. _`PILOT-AUTO`:
|
||||
|
||||
``PILOT_AUTO``
|
||||
``PILOT_AUTO``
|
||||
|
||||
- Autodetect pilot tones
|
||||
|
||||
@ -583,7 +583,7 @@ fe_rolloff type
|
||||
|
||||
- .. _`ROLLOFF-35`:
|
||||
|
||||
``ROLLOFF_35``
|
||||
``ROLLOFF_35``
|
||||
|
||||
- Roloff factor: α=35%
|
||||
|
||||
@ -591,7 +591,7 @@ fe_rolloff type
|
||||
|
||||
- .. _`ROLLOFF-20`:
|
||||
|
||||
``ROLLOFF_20``
|
||||
``ROLLOFF_20``
|
||||
|
||||
- Roloff factor: α=20%
|
||||
|
||||
@ -599,7 +599,7 @@ fe_rolloff type
|
||||
|
||||
- .. _`ROLLOFF-25`:
|
||||
|
||||
``ROLLOFF_25``
|
||||
``ROLLOFF_25``
|
||||
|
||||
- Roloff factor: α=25%
|
||||
|
||||
@ -607,7 +607,7 @@ fe_rolloff type
|
||||
|
||||
- .. _`ROLLOFF-AUTO`:
|
||||
|
||||
``ROLLOFF_AUTO``
|
||||
``ROLLOFF_AUTO``
|
||||
|
||||
- Auto-detect the roloff factor.
|
||||
|
||||
@ -670,7 +670,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-UNDEFINED`:
|
||||
|
||||
``SYS_UNDEFINED``
|
||||
``SYS_UNDEFINED``
|
||||
|
||||
- Undefined standard. Generally, indicates an error
|
||||
|
||||
@ -678,7 +678,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBC-ANNEX-A`:
|
||||
|
||||
``SYS_DVBC_ANNEX_A``
|
||||
``SYS_DVBC_ANNEX_A``
|
||||
|
||||
- Cable TV: DVB-C following ITU-T J.83 Annex A spec
|
||||
|
||||
@ -686,7 +686,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBC-ANNEX-B`:
|
||||
|
||||
``SYS_DVBC_ANNEX_B``
|
||||
``SYS_DVBC_ANNEX_B``
|
||||
|
||||
- Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM)
|
||||
|
||||
@ -694,7 +694,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBC-ANNEX-C`:
|
||||
|
||||
``SYS_DVBC_ANNEX_C``
|
||||
``SYS_DVBC_ANNEX_C``
|
||||
|
||||
- Cable TV: DVB-C following ITU-T J.83 Annex C spec
|
||||
|
||||
@ -702,7 +702,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-ISDBC`:
|
||||
|
||||
``SYS_ISDBC``
|
||||
``SYS_ISDBC``
|
||||
|
||||
- Cable TV: ISDB-C (no drivers yet)
|
||||
|
||||
@ -710,7 +710,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBT`:
|
||||
|
||||
``SYS_DVBT``
|
||||
``SYS_DVBT``
|
||||
|
||||
- Terrestral TV: DVB-T
|
||||
|
||||
@ -718,7 +718,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBT2`:
|
||||
|
||||
``SYS_DVBT2``
|
||||
``SYS_DVBT2``
|
||||
|
||||
- Terrestral TV: DVB-T2
|
||||
|
||||
@ -726,7 +726,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-ISDBT`:
|
||||
|
||||
``SYS_ISDBT``
|
||||
``SYS_ISDBT``
|
||||
|
||||
- Terrestral TV: ISDB-T
|
||||
|
||||
@ -734,7 +734,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-ATSC`:
|
||||
|
||||
``SYS_ATSC``
|
||||
``SYS_ATSC``
|
||||
|
||||
- Terrestral TV: ATSC
|
||||
|
||||
@ -742,7 +742,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-ATSCMH`:
|
||||
|
||||
``SYS_ATSCMH``
|
||||
``SYS_ATSCMH``
|
||||
|
||||
- Terrestral TV (mobile): ATSC-M/H
|
||||
|
||||
@ -750,7 +750,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DTMB`:
|
||||
|
||||
``SYS_DTMB``
|
||||
``SYS_DTMB``
|
||||
|
||||
- Terrestrial TV: DTMB
|
||||
|
||||
@ -758,7 +758,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBS`:
|
||||
|
||||
``SYS_DVBS``
|
||||
``SYS_DVBS``
|
||||
|
||||
- Satellite TV: DVB-S
|
||||
|
||||
@ -766,7 +766,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBS2`:
|
||||
|
||||
``SYS_DVBS2``
|
||||
``SYS_DVBS2``
|
||||
|
||||
- Satellite TV: DVB-S2
|
||||
|
||||
@ -774,7 +774,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-TURBO`:
|
||||
|
||||
``SYS_TURBO``
|
||||
``SYS_TURBO``
|
||||
|
||||
- Satellite TV: DVB-S Turbo
|
||||
|
||||
@ -782,7 +782,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-ISDBS`:
|
||||
|
||||
``SYS_ISDBS``
|
||||
``SYS_ISDBS``
|
||||
|
||||
- Satellite TV: ISDB-S
|
||||
|
||||
@ -790,7 +790,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DAB`:
|
||||
|
||||
``SYS_DAB``
|
||||
``SYS_DAB``
|
||||
|
||||
- Digital audio: DAB (not fully supported)
|
||||
|
||||
@ -798,7 +798,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DSS`:
|
||||
|
||||
``SYS_DSS``
|
||||
``SYS_DSS``
|
||||
|
||||
- Satellite TV:"DSS (not fully supported)
|
||||
|
||||
@ -806,7 +806,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-CMMB`:
|
||||
|
||||
``SYS_CMMB``
|
||||
``SYS_CMMB``
|
||||
|
||||
- Terrestral TV (mobile):CMMB (not fully supported)
|
||||
|
||||
@ -814,7 +814,7 @@ Possible values:
|
||||
|
||||
- .. _`SYS-DVBH`:
|
||||
|
||||
``SYS_DVBH``
|
||||
``SYS_DVBH``
|
||||
|
||||
- Terrestral TV (mobile): DVB-H (standard deprecated)
|
||||
|
||||
@ -1240,20 +1240,20 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSFRAME-PRI-ONLY`:
|
||||
|
||||
``ATSCMH_RSFRAME_PRI_ONLY``
|
||||
``ATSCMH_RSFRAME_PRI_ONLY``
|
||||
|
||||
- Single Frame: There is only a primary RS Frame for all Group
|
||||
Regions.
|
||||
Regions.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- .. _`ATSCMH-RSFRAME-PRI-SEC`:
|
||||
|
||||
``ATSCMH_RSFRAME_PRI_SEC``
|
||||
``ATSCMH_RSFRAME_PRI_SEC``
|
||||
|
||||
- Dual Frame: There are two separate RS Frames: Primary RS Frame for
|
||||
Group Region A and B and Secondary RS Frame for Group Region C and
|
||||
D.
|
||||
Group Region A and B and Secondary RS Frame for Group Region C and
|
||||
D.
|
||||
|
||||
|
||||
|
||||
@ -1284,7 +1284,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSFRAME-ENS-PRI`:
|
||||
|
||||
``ATSCMH_RSFRAME_ENS_PRI``
|
||||
``ATSCMH_RSFRAME_ENS_PRI``
|
||||
|
||||
- Primary Ensemble.
|
||||
|
||||
@ -1292,7 +1292,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSFRAME-ENS-SEC`:
|
||||
|
||||
``AATSCMH_RSFRAME_PRI_SEC``
|
||||
``AATSCMH_RSFRAME_PRI_SEC``
|
||||
|
||||
- Secondary Ensemble.
|
||||
|
||||
@ -1300,7 +1300,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSFRAME-RES`:
|
||||
|
||||
``AATSCMH_RSFRAME_RES``
|
||||
``AATSCMH_RSFRAME_RES``
|
||||
|
||||
- Reserved. Shouldn't be used.
|
||||
|
||||
@ -1333,7 +1333,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSCODE-211-187`:
|
||||
|
||||
``ATSCMH_RSCODE_211_187``
|
||||
``ATSCMH_RSCODE_211_187``
|
||||
|
||||
- Reed Solomon code (211,187).
|
||||
|
||||
@ -1341,7 +1341,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSCODE-223-187`:
|
||||
|
||||
``ATSCMH_RSCODE_223_187``
|
||||
``ATSCMH_RSCODE_223_187``
|
||||
|
||||
- Reed Solomon code (223,187).
|
||||
|
||||
@ -1349,7 +1349,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSCODE-235-187`:
|
||||
|
||||
``ATSCMH_RSCODE_235_187``
|
||||
``ATSCMH_RSCODE_235_187``
|
||||
|
||||
- Reed Solomon code (235,187).
|
||||
|
||||
@ -1357,7 +1357,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-RSCODE-RES`:
|
||||
|
||||
``ATSCMH_RSCODE_RES``
|
||||
``ATSCMH_RSCODE_RES``
|
||||
|
||||
- Reserved. Shouldn't be used.
|
||||
|
||||
@ -1401,25 +1401,25 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-SCCC-BLK-SEP`:
|
||||
|
||||
``ATSCMH_SCCC_BLK_SEP``
|
||||
``ATSCMH_SCCC_BLK_SEP``
|
||||
|
||||
- Separate SCCC: the SCCC outer code mode shall be set independently
|
||||
for each Group Region (A, B, C, D)
|
||||
for each Group Region (A, B, C, D)
|
||||
|
||||
- .. row 3
|
||||
|
||||
- .. _`ATSCMH-SCCC-BLK-COMB`:
|
||||
|
||||
``ATSCMH_SCCC_BLK_COMB``
|
||||
``ATSCMH_SCCC_BLK_COMB``
|
||||
|
||||
- Combined SCCC: all four Regions shall have the same SCCC outer
|
||||
code mode.
|
||||
code mode.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- .. _`ATSCMH-SCCC-BLK-RES`:
|
||||
|
||||
``ATSCMH_SCCC_BLK_RES``
|
||||
``ATSCMH_SCCC_BLK_RES``
|
||||
|
||||
- Reserved. Shouldn't be used.
|
||||
|
||||
@ -1452,7 +1452,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-SCCC-CODE-HLF`:
|
||||
|
||||
``ATSCMH_SCCC_CODE_HLF``
|
||||
``ATSCMH_SCCC_CODE_HLF``
|
||||
|
||||
- The outer code rate of a SCCC Block is 1/2 rate.
|
||||
|
||||
@ -1460,7 +1460,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-SCCC-CODE-QTR`:
|
||||
|
||||
``ATSCMH_SCCC_CODE_QTR``
|
||||
``ATSCMH_SCCC_CODE_QTR``
|
||||
|
||||
- The outer code rate of a SCCC Block is 1/4 rate.
|
||||
|
||||
@ -1468,7 +1468,7 @@ Possible values are:
|
||||
|
||||
- .. _`ATSCMH-SCCC-CODE-RES`:
|
||||
|
||||
``ATSCMH_SCCC_CODE_RES``
|
||||
``ATSCMH_SCCC_CODE_RES``
|
||||
|
||||
- to be documented.
|
||||
|
||||
@ -1564,7 +1564,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-AUTO`:
|
||||
|
||||
``GUARD_INTERVAL_AUTO``
|
||||
``GUARD_INTERVAL_AUTO``
|
||||
|
||||
- Autodetect the guard interval
|
||||
|
||||
@ -1572,7 +1572,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-1-128`:
|
||||
|
||||
``GUARD_INTERVAL_1_128``
|
||||
``GUARD_INTERVAL_1_128``
|
||||
|
||||
- Guard interval 1/128
|
||||
|
||||
@ -1580,7 +1580,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-1-32`:
|
||||
|
||||
``GUARD_INTERVAL_1_32``
|
||||
``GUARD_INTERVAL_1_32``
|
||||
|
||||
- Guard interval 1/32
|
||||
|
||||
@ -1588,7 +1588,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-1-16`:
|
||||
|
||||
``GUARD_INTERVAL_1_16``
|
||||
``GUARD_INTERVAL_1_16``
|
||||
|
||||
- Guard interval 1/16
|
||||
|
||||
@ -1596,7 +1596,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-1-8`:
|
||||
|
||||
``GUARD_INTERVAL_1_8``
|
||||
``GUARD_INTERVAL_1_8``
|
||||
|
||||
- Guard interval 1/8
|
||||
|
||||
@ -1604,7 +1604,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-1-4`:
|
||||
|
||||
``GUARD_INTERVAL_1_4``
|
||||
``GUARD_INTERVAL_1_4``
|
||||
|
||||
- Guard interval 1/4
|
||||
|
||||
@ -1612,7 +1612,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-19-128`:
|
||||
|
||||
``GUARD_INTERVAL_19_128``
|
||||
``GUARD_INTERVAL_19_128``
|
||||
|
||||
- Guard interval 19/128
|
||||
|
||||
@ -1620,7 +1620,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-19-256`:
|
||||
|
||||
``GUARD_INTERVAL_19_256``
|
||||
``GUARD_INTERVAL_19_256``
|
||||
|
||||
- Guard interval 19/256
|
||||
|
||||
@ -1628,7 +1628,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-PN420`:
|
||||
|
||||
``GUARD_INTERVAL_PN420``
|
||||
``GUARD_INTERVAL_PN420``
|
||||
|
||||
- PN length 420 (1/4)
|
||||
|
||||
@ -1636,7 +1636,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-PN595`:
|
||||
|
||||
``GUARD_INTERVAL_PN595``
|
||||
``GUARD_INTERVAL_PN595``
|
||||
|
||||
- PN length 595 (1/6)
|
||||
|
||||
@ -1644,7 +1644,7 @@ Modulation guard interval
|
||||
|
||||
- .. _`GUARD-INTERVAL-PN945`:
|
||||
|
||||
``GUARD_INTERVAL_PN945``
|
||||
``GUARD_INTERVAL_PN945``
|
||||
|
||||
- PN length 945 (1/9)
|
||||
|
||||
@ -1693,16 +1693,16 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-AUTO`:
|
||||
|
||||
``TRANSMISSION_MODE_AUTO``
|
||||
``TRANSMISSION_MODE_AUTO``
|
||||
|
||||
- Autodetect transmission mode. The hardware will try to find the
|
||||
correct FFT-size (if capable) to fill in the missing parameters.
|
||||
correct FFT-size (if capable) to fill in the missing parameters.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- .. _`TRANSMISSION-MODE-1K`:
|
||||
|
||||
``TRANSMISSION_MODE_1K``
|
||||
``TRANSMISSION_MODE_1K``
|
||||
|
||||
- Transmission mode 1K
|
||||
|
||||
@ -1710,7 +1710,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-2K`:
|
||||
|
||||
``TRANSMISSION_MODE_2K``
|
||||
``TRANSMISSION_MODE_2K``
|
||||
|
||||
- Transmission mode 2K
|
||||
|
||||
@ -1718,7 +1718,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-8K`:
|
||||
|
||||
``TRANSMISSION_MODE_8K``
|
||||
``TRANSMISSION_MODE_8K``
|
||||
|
||||
- Transmission mode 8K
|
||||
|
||||
@ -1726,7 +1726,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-4K`:
|
||||
|
||||
``TRANSMISSION_MODE_4K``
|
||||
``TRANSMISSION_MODE_4K``
|
||||
|
||||
- Transmission mode 4K
|
||||
|
||||
@ -1734,7 +1734,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-16K`:
|
||||
|
||||
``TRANSMISSION_MODE_16K``
|
||||
``TRANSMISSION_MODE_16K``
|
||||
|
||||
- Transmission mode 16K
|
||||
|
||||
@ -1742,7 +1742,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-32K`:
|
||||
|
||||
``TRANSMISSION_MODE_32K``
|
||||
``TRANSMISSION_MODE_32K``
|
||||
|
||||
- Transmission mode 32K
|
||||
|
||||
@ -1750,7 +1750,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-C1`:
|
||||
|
||||
``TRANSMISSION_MODE_C1``
|
||||
``TRANSMISSION_MODE_C1``
|
||||
|
||||
- Single Carrier (C=1) transmission mode (DTMB)
|
||||
|
||||
@ -1758,7 +1758,7 @@ enum fe_transmit_mode: Number of carriers per channel
|
||||
|
||||
- .. _`TRANSMISSION-MODE-C3780`:
|
||||
|
||||
``TRANSMISSION_MODE_C3780``
|
||||
``TRANSMISSION_MODE_C3780``
|
||||
|
||||
- Multi Carrier (C=3780) transmission mode (DTMB)
|
||||
|
||||
@ -1810,7 +1810,7 @@ Frontend hierarchy
|
||||
|
||||
- .. _`HIERARCHY-NONE`:
|
||||
|
||||
``HIERARCHY_NONE``
|
||||
``HIERARCHY_NONE``
|
||||
|
||||
- No hierarchy
|
||||
|
||||
@ -1818,7 +1818,7 @@ Frontend hierarchy
|
||||
|
||||
- .. _`HIERARCHY-AUTO`:
|
||||
|
||||
``HIERARCHY_AUTO``
|
||||
``HIERARCHY_AUTO``
|
||||
|
||||
- Autodetect hierarchy (if supported)
|
||||
|
||||
@ -1826,7 +1826,7 @@ Frontend hierarchy
|
||||
|
||||
- .. _`HIERARCHY-1`:
|
||||
|
||||
``HIERARCHY_1``
|
||||
``HIERARCHY_1``
|
||||
|
||||
- Hierarchy 1
|
||||
|
||||
@ -1834,7 +1834,7 @@ Frontend hierarchy
|
||||
|
||||
- .. _`HIERARCHY-2`:
|
||||
|
||||
``HIERARCHY_2``
|
||||
``HIERARCHY_2``
|
||||
|
||||
- Hierarchy 2
|
||||
|
||||
@ -1842,7 +1842,7 @@ Frontend hierarchy
|
||||
|
||||
- .. _`HIERARCHY-4`:
|
||||
|
||||
``HIERARCHY_4``
|
||||
``HIERARCHY_4``
|
||||
|
||||
- Hierarchy 4
|
||||
|
||||
@ -1917,7 +1917,7 @@ Time interleaving to be used. Currently, used only on DTMB.
|
||||
|
||||
- .. _`INTERLEAVING-NONE`:
|
||||
|
||||
``INTERLEAVING_NONE``
|
||||
``INTERLEAVING_NONE``
|
||||
|
||||
- No interleaving.
|
||||
|
||||
@ -1925,7 +1925,7 @@ Time interleaving to be used. Currently, used only on DTMB.
|
||||
|
||||
- .. _`INTERLEAVING-AUTO`:
|
||||
|
||||
``INTERLEAVING_AUTO``
|
||||
``INTERLEAVING_AUTO``
|
||||
|
||||
- Auto-detect interleaving.
|
||||
|
||||
@ -1933,7 +1933,7 @@ Time interleaving to be used. Currently, used only on DTMB.
|
||||
|
||||
- .. _`INTERLEAVING-240`:
|
||||
|
||||
``INTERLEAVING_240``
|
||||
``INTERLEAVING_240``
|
||||
|
||||
- Interleaving of 240 symbols.
|
||||
|
||||
@ -1941,7 +1941,7 @@ Time interleaving to be used. Currently, used only on DTMB.
|
||||
|
||||
- .. _`INTERLEAVING-720`:
|
||||
|
||||
``INTERLEAVING_720``
|
||||
``INTERLEAVING_720``
|
||||
|
||||
- Interleaving of 720 symbols.
|
||||
|
||||
|
@ -158,37 +158,37 @@ partial path like:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/audio.h>
|
||||
#include <linux/dvb/audio.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/ca.h>
|
||||
#include <linux/dvb/ca.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/dmx.h>
|
||||
#include <linux/dvb/dmx.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/frontend.h>
|
||||
#include <linux/dvb/frontend.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/net.h>
|
||||
#include <linux/dvb/net.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/osd.h>
|
||||
#include <linux/dvb/osd.h>
|
||||
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <linux/dvb/video.h>
|
||||
#include <linux/dvb/video.h>
|
||||
|
||||
To enable applications to support different API version, an additional
|
||||
include file ``linux/dvb/version.h`` exists, which defines the constant
|
||||
|
@ -116,8 +116,8 @@ struct dvb_net_if description
|
||||
- feedtype
|
||||
|
||||
- Encapsulation type of the feed. It can be:
|
||||
``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
|
||||
``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
|
||||
``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
|
||||
``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
|
||||
|
||||
|
||||
|
||||
|
@ -58,22 +58,22 @@ Arguments
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDONLY read-only access
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- O_RDWR read/write access
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- O_NONBLOCK open in non-blocking mode
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- (blocking mode is the default)
|
||||
|
||||
|
||||
@ -291,12 +291,12 @@ Arguments
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- TRUE: Blank screen when stop.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- FALSE: Show last decoded frame.
|
||||
|
||||
|
||||
@ -565,7 +565,7 @@ Arguments
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- FALSE: Show last decoded frame.
|
||||
|
||||
|
||||
@ -677,7 +677,7 @@ Arguments
|
||||
- __u64 \*pts
|
||||
|
||||
- Returns the number of frames displayed since the decoder was
|
||||
started.
|
||||
started.
|
||||
|
||||
|
||||
Return Value
|
||||
@ -735,11 +735,11 @@ Arguments
|
||||
- __u64 \*pts
|
||||
|
||||
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
|
||||
ISO/IEC 13818-1.
|
||||
ISO/IEC 13818-1.
|
||||
|
||||
The PTS should belong to the currently played frame if possible,
|
||||
but may also be a value close to it like the PTS of the last
|
||||
decoded frame or the last PTS extracted by the PES parser.
|
||||
The PTS should belong to the currently played frame if possible,
|
||||
but may also be a value close to it like the PTS of the last
|
||||
decoded frame or the last PTS extracted by the PES parser.
|
||||
|
||||
|
||||
Return Value
|
||||
@ -1754,7 +1754,7 @@ Arguments
|
||||
- video_spu_t \*spu
|
||||
|
||||
- SPU decoding (de)activation and subid setting according to section
|
||||
??.
|
||||
??.
|
||||
|
||||
|
||||
Return Value
|
||||
|
@ -18,9 +18,9 @@ The ``video_format_t`` data type defined by
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
VIDEO_FORMAT_4_3, /* Select 4:3 format */
|
||||
VIDEO_FORMAT_16_9, /* Select 16:9 format. */
|
||||
VIDEO_FORMAT_221_1 /* 2.21:1 */
|
||||
VIDEO_FORMAT_4_3, /* Select 4:3 format */
|
||||
VIDEO_FORMAT_16_9, /* Select 16:9 format. */
|
||||
VIDEO_FORMAT_221_1 /* 2.21:1 */
|
||||
} video_format_t;
|
||||
|
||||
is used in the VIDEO_SET_FORMAT function (??) to tell the driver which
|
||||
@ -44,9 +44,9 @@ VIDEO_SET_DISPLAY_FORMAT call (??) which accepts
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
VIDEO_PAN_SCAN, /* use pan and scan format */
|
||||
VIDEO_LETTER_BOX, /* use letterbox format */
|
||||
VIDEO_CENTER_CUT_OUT /* use center cut out format */
|
||||
VIDEO_PAN_SCAN, /* use pan and scan format */
|
||||
VIDEO_LETTER_BOX, /* use letterbox format */
|
||||
VIDEO_CENTER_CUT_OUT /* use center cut out format */
|
||||
} video_displayformat_t;
|
||||
|
||||
as argument.
|
||||
@ -65,10 +65,10 @@ from an internal (demuxer) or external (user write) source.
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
|
||||
VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
|
||||
comes from the user through the write
|
||||
system call */
|
||||
VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
|
||||
VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
|
||||
comes from the user through the write
|
||||
system call */
|
||||
} video_stream_source_t;
|
||||
|
||||
VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the
|
||||
@ -89,9 +89,9 @@ representing the state of video playback.
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
VIDEO_STOPPED, /* Video is stopped */
|
||||
VIDEO_PLAYING, /* Video is currently playing */
|
||||
VIDEO_FREEZED /* Video is freezed */
|
||||
VIDEO_STOPPED, /* Video is stopped */
|
||||
VIDEO_PLAYING, /* Video is currently playing */
|
||||
VIDEO_FREEZED /* Video is freezed */
|
||||
} video_play_state_t;
|
||||
|
||||
|
||||
@ -107,27 +107,27 @@ it can be extended safely in the future.
|
||||
.. code-block:: c
|
||||
|
||||
struct video_command {
|
||||
__u32 cmd;
|
||||
__u32 flags;
|
||||
union {
|
||||
struct {
|
||||
__u64 pts;
|
||||
} stop;
|
||||
__u32 cmd;
|
||||
__u32 flags;
|
||||
union {
|
||||
struct {
|
||||
__u64 pts;
|
||||
} stop;
|
||||
|
||||
struct {
|
||||
/* 0 or 1000 specifies normal speed,
|
||||
1 specifies forward single stepping,
|
||||
-1 specifies backward single stepping,
|
||||
>>1: playback at speed/1000 of the normal speed,
|
||||
<-1: reverse playback at (-speed/1000) of the normal speed. */
|
||||
__s32 speed;
|
||||
__u32 format;
|
||||
} play;
|
||||
struct {
|
||||
/* 0 or 1000 specifies normal speed,
|
||||
1 specifies forward single stepping,
|
||||
-1 specifies backward single stepping,
|
||||
>>1: playback at speed/1000 of the normal speed,
|
||||
<-1: reverse playback at (-speed/1000) of the normal speed. */
|
||||
__s32 speed;
|
||||
__u32 format;
|
||||
} play;
|
||||
|
||||
struct {
|
||||
__u32 data[16];
|
||||
} raw;
|
||||
};
|
||||
struct {
|
||||
__u32 data[16];
|
||||
} raw;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -140,9 +140,9 @@ video_size_t
|
||||
.. code-block:: c
|
||||
|
||||
typedef struct {
|
||||
int w;
|
||||
int h;
|
||||
video_format_t aspect_ratio;
|
||||
int w;
|
||||
int h;
|
||||
video_format_t aspect_ratio;
|
||||
} video_size_t;
|
||||
|
||||
|
||||
@ -158,17 +158,17 @@ VIDEO_GET_EVENT call.
|
||||
.. code-block:: c
|
||||
|
||||
struct video_event {
|
||||
__s32 type;
|
||||
__s32 type;
|
||||
#define VIDEO_EVENT_SIZE_CHANGED 1
|
||||
#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
|
||||
#define VIDEO_EVENT_DECODER_STOPPED 3
|
||||
#define VIDEO_EVENT_VSYNC 4
|
||||
__kernel_time_t timestamp;
|
||||
union {
|
||||
video_size_t size;
|
||||
unsigned int frame_rate; /* in frames per 1000sec */
|
||||
unsigned char vsync_field; /* unknown/odd/even/progressive */
|
||||
} u;
|
||||
__kernel_time_t timestamp;
|
||||
union {
|
||||
video_size_t size;
|
||||
unsigned int frame_rate; /* in frames per 1000sec */
|
||||
unsigned char vsync_field; /* unknown/odd/even/progressive */
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
@ -184,11 +184,11 @@ about various states of the playback operation.
|
||||
.. code-block:: c
|
||||
|
||||
struct video_status {
|
||||
int video_blank; /* blank video on freeze? */
|
||||
video_play_state_t play_state; /* current state of playback */
|
||||
video_stream_source_t stream_source; /* current source (demux/memory) */
|
||||
video_format_t video_format; /* current aspect ratio of stream */
|
||||
video_displayformat_t display_format;/* selected cropping mode */
|
||||
int video_blank; /* blank video on freeze? */
|
||||
video_play_state_t play_state; /* current state of playback */
|
||||
video_stream_source_t stream_source; /* current source (demux/memory) */
|
||||
video_format_t video_format; /* current aspect ratio of stream */
|
||||
video_displayformat_t display_format;/* selected cropping mode */
|
||||
};
|
||||
|
||||
If video_blank is set video will be blanked out if the channel is
|
||||
@ -216,8 +216,8 @@ within the following structure.
|
||||
|
||||
/* pointer to and size of a single iframe in memory */
|
||||
struct video_still_picture {
|
||||
char *iFrame; /* pointer to a single iframe in memory */
|
||||
int32_t size;
|
||||
char *iFrame; /* pointer to a single iframe in memory */
|
||||
int32_t size;
|
||||
};
|
||||
|
||||
|
||||
@ -237,12 +237,12 @@ following bits set according to the hardwares capabilities.
|
||||
#define VIDEO_CAP_MPEG1 1
|
||||
#define VIDEO_CAP_MPEG2 2
|
||||
/* can you send a system and/or program stream to video device?
|
||||
(you still have to open the video and the audio device but only
|
||||
send the stream to the video device) */
|
||||
(you still have to open the video and the audio device but only
|
||||
send the stream to the video device) */
|
||||
#define VIDEO_CAP_SYS 4
|
||||
#define VIDEO_CAP_PROG 8
|
||||
/* can the driver also handle SPU, NAVI and CSS encoded data?
|
||||
(CSS API is not present yet) */
|
||||
(CSS API is not present yet) */
|
||||
#define VIDEO_CAP_SPU 16
|
||||
#define VIDEO_CAP_NAVI 32
|
||||
#define VIDEO_CAP_CSS 64
|
||||
@ -260,14 +260,14 @@ output. The following system types can be set:
|
||||
.. code-block:: c
|
||||
|
||||
typedef enum {
|
||||
VIDEO_SYSTEM_PAL,
|
||||
VIDEO_SYSTEM_NTSC,
|
||||
VIDEO_SYSTEM_PALN,
|
||||
VIDEO_SYSTEM_PALNc,
|
||||
VIDEO_SYSTEM_PALM,
|
||||
VIDEO_SYSTEM_NTSC60,
|
||||
VIDEO_SYSTEM_PAL60,
|
||||
VIDEO_SYSTEM_PALM60
|
||||
VIDEO_SYSTEM_PAL,
|
||||
VIDEO_SYSTEM_NTSC,
|
||||
VIDEO_SYSTEM_PALN,
|
||||
VIDEO_SYSTEM_PALNc,
|
||||
VIDEO_SYSTEM_PALM,
|
||||
VIDEO_SYSTEM_NTSC60,
|
||||
VIDEO_SYSTEM_PAL60,
|
||||
VIDEO_SYSTEM_PALM60
|
||||
} video_system_t;
|
||||
|
||||
|
||||
@ -284,21 +284,21 @@ information. The call expects the following format for that information:
|
||||
|
||||
typedef
|
||||
struct video_highlight {
|
||||
boolean active; /* 1=show highlight, 0=hide highlight */
|
||||
uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
|
||||
/* 3- 0 Background pixel contrast */
|
||||
uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
|
||||
/* 3- 0 Emphasis pixel-1 contrast */
|
||||
uint8_t color1; /* 7- 4 Pattern pixel color */
|
||||
/* 3- 0 Background pixel color */
|
||||
uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
|
||||
/* 3- 0 Emphasis pixel-1 color */
|
||||
uint32_t ypos; /* 23-22 auto action mode */
|
||||
/* 21-12 start y */
|
||||
/* 9- 0 end y */
|
||||
uint32_t xpos; /* 23-22 button color number */
|
||||
/* 21-12 start x */
|
||||
/* 9- 0 end x */
|
||||
boolean active; /* 1=show highlight, 0=hide highlight */
|
||||
uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
|
||||
/* 3- 0 Background pixel contrast */
|
||||
uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
|
||||
/* 3- 0 Emphasis pixel-1 contrast */
|
||||
uint8_t color1; /* 7- 4 Pattern pixel color */
|
||||
/* 3- 0 Background pixel color */
|
||||
uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
|
||||
/* 3- 0 Emphasis pixel-1 color */
|
||||
uint32_t ypos; /* 23-22 auto action mode */
|
||||
/* 21-12 start y */
|
||||
/* 9- 0 end y */
|
||||
uint32_t xpos; /* 23-22 button color number */
|
||||
/* 21-12 start x */
|
||||
/* 9- 0 end x */
|
||||
} video_highlight_t;
|
||||
|
||||
|
||||
@ -315,8 +315,8 @@ to the following format:
|
||||
|
||||
typedef
|
||||
struct video_spu {
|
||||
boolean active;
|
||||
int stream_id;
|
||||
boolean active;
|
||||
int stream_id;
|
||||
} video_spu_t;
|
||||
|
||||
|
||||
@ -333,8 +333,8 @@ VIDEO_SPU_PALETTE:
|
||||
|
||||
typedef
|
||||
struct video_spu_palette {
|
||||
int length;
|
||||
uint8_t *palette;
|
||||
int length;
|
||||
uint8_t *palette;
|
||||
} video_spu_palette_t;
|
||||
|
||||
|
||||
@ -351,8 +351,8 @@ passed to the ioctl VIDEO_GET_NAVI:
|
||||
|
||||
typedef
|
||||
struct video_navi_pack {
|
||||
int length; /* 0 ... 1024 */
|
||||
uint8_t data[1024];
|
||||
int length; /* 0 ... 1024 */
|
||||
uint8_t data[1024];
|
||||
} video_navi_pack_t;
|
||||
|
||||
|
||||
|
@ -19,10 +19,10 @@ Generic Error Codes
|
||||
- ``EAGAIN`` (aka ``EWOULDBLOCK``)
|
||||
|
||||
- The ioctl can't be handled because the device is in state where it
|
||||
can't perform it. This could happen for example in case where
|
||||
device is sleeping and ioctl is performed to query statistics. It
|
||||
is also returned when the ioctl would need to wait for an event,
|
||||
but the device was opened in non-blocking mode.
|
||||
can't perform it. This could happen for example in case where
|
||||
device is sleeping and ioctl is performed to query statistics. It
|
||||
is also returned when the ioctl would need to wait for an event,
|
||||
but the device was opened in non-blocking mode.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -35,26 +35,26 @@ Generic Error Codes
|
||||
- ``EBUSY``
|
||||
|
||||
- The ioctl can't be handled because the device is busy. This is
|
||||
typically return while device is streaming, and an ioctl tried to
|
||||
change something that would affect the stream, or would require
|
||||
the usage of a hardware resource that was already allocated. The
|
||||
ioctl must not be retried without performing another action to fix
|
||||
the problem first (typically: stop the stream before retrying).
|
||||
typically return while device is streaming, and an ioctl tried to
|
||||
change something that would affect the stream, or would require
|
||||
the usage of a hardware resource that was already allocated. The
|
||||
ioctl must not be retried without performing another action to fix
|
||||
the problem first (typically: stop the stream before retrying).
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``EFAULT``
|
||||
|
||||
- There was a failure while copying data from/to userspace, probably
|
||||
caused by an invalid pointer reference.
|
||||
caused by an invalid pointer reference.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- ``EINVAL``
|
||||
|
||||
- One or more of the ioctl parameters are invalid or out of the
|
||||
allowed range. This is a widely used error code. See the
|
||||
individual ioctl requests for specific causes.
|
||||
allowed range. This is a widely used error code. See the
|
||||
individual ioctl requests for specific causes.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -73,23 +73,23 @@ Generic Error Codes
|
||||
- ``ENOTTY``
|
||||
|
||||
- The ioctl is not supported by the driver, actually meaning that
|
||||
the required functionality is not available, or the file
|
||||
descriptor is not for a media device.
|
||||
the required functionality is not available, or the file
|
||||
descriptor is not for a media device.
|
||||
|
||||
- .. row 9
|
||||
|
||||
- ``ENOSPC``
|
||||
|
||||
- On USB devices, the stream ioctl's can return this error, meaning
|
||||
that this request would overcommit the usb bandwidth reserved for
|
||||
periodic transfers (up to 80% of the USB bandwidth).
|
||||
that this request would overcommit the usb bandwidth reserved for
|
||||
periodic transfers (up to 80% of the USB bandwidth).
|
||||
|
||||
- .. row 10
|
||||
|
||||
- ``EPERM``
|
||||
|
||||
- Permission denied. Can be returned if the device needs write
|
||||
permission, or some special capabilities is needed (e. g. root)
|
||||
permission, or some special capabilities is needed (e. g. root)
|
||||
|
||||
|
||||
Note 1: ioctls may return other error codes. Since errors may have side
|
||||
|
@ -53,12 +53,12 @@ ioctl never fails.
|
||||
- ``driver``\ [16]
|
||||
|
||||
- Name of the driver implementing the media API as a NUL-terminated
|
||||
ASCII string. The driver version is stored in the
|
||||
``driver_version`` field.
|
||||
ASCII string. The driver version is stored in the
|
||||
``driver_version`` field.
|
||||
|
||||
Driver specific applications can use this information to verify
|
||||
the driver identity. It is also useful to work around known bugs,
|
||||
or to identify drivers in error reports.
|
||||
Driver specific applications can use this information to verify
|
||||
the driver identity. It is also useful to work around known bugs,
|
||||
or to identify drivers in error reports.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -67,8 +67,8 @@ ioctl never fails.
|
||||
- ``model``\ [32]
|
||||
|
||||
- Device model name as a NUL-terminated UTF-8 string. The device
|
||||
version is stored in the ``device_version`` field and is not be
|
||||
appended to the model name.
|
||||
version is stored in the ``device_version`` field and is not be
|
||||
appended to the model name.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -85,8 +85,8 @@ ioctl never fails.
|
||||
- ``bus_info``\ [32]
|
||||
|
||||
- Location of the device in the system as a NUL-terminated ASCII
|
||||
string. This includes the bus type name (PCI, USB, ...) and a
|
||||
bus-specific identifier.
|
||||
string. This includes the bus type name (PCI, USB, ...) and a
|
||||
bus-specific identifier.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -111,8 +111,8 @@ ioctl never fails.
|
||||
- ``driver_version``
|
||||
|
||||
- Media device driver version, formatted with the
|
||||
``KERNEL_VERSION()`` macro. Together with the ``driver`` field
|
||||
this identifies a particular driver.
|
||||
``KERNEL_VERSION()`` macro. Together with the ``driver`` field
|
||||
this identifies a particular driver.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -121,7 +121,7 @@ ioctl never fails.
|
||||
- ``reserved``\ [31]
|
||||
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
this array to zero.
|
||||
this array to zero.
|
||||
|
||||
|
||||
The ``serial`` and ``bus_info`` fields can be used to distinguish
|
||||
|
@ -60,11 +60,11 @@ id's until they get an error.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity id, set by the application. When the id is or'ed with
|
||||
``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
|
||||
the first entity with a larger id.
|
||||
``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
|
||||
the first entity with a larger id.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -72,8 +72,8 @@ id's until they get an error.
|
||||
|
||||
- ``name``\ [32]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity name as an UTF-8 NULL-terminated string.
|
||||
|
||||
- .. row 3
|
||||
@ -82,8 +82,8 @@ id's until they get an error.
|
||||
|
||||
- ``type``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity type, see :ref:`media-entity-type` for details.
|
||||
|
||||
- .. row 4
|
||||
@ -92,8 +92,8 @@ id's until they get an error.
|
||||
|
||||
- ``revision``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity revision. Always zero (obsolete)
|
||||
|
||||
- .. row 5
|
||||
@ -102,8 +102,8 @@ id's until they get an error.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity flags, see :ref:`media-entity-flag` for details.
|
||||
|
||||
- .. row 6
|
||||
@ -112,8 +112,8 @@ id's until they get an error.
|
||||
|
||||
- ``group_id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity group ID. Always zero (obsolete)
|
||||
|
||||
- .. row 7
|
||||
@ -122,8 +122,8 @@ id's until they get an error.
|
||||
|
||||
- ``pads``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Number of pads
|
||||
|
||||
- .. row 8
|
||||
@ -132,10 +132,10 @@ id's until they get an error.
|
||||
|
||||
- ``links``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Total number of outbound links. Inbound links are not counted in
|
||||
this field.
|
||||
this field.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -143,18 +143,18 @@ id's until they get an error.
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
- struct
|
||||
|
||||
- ``dev``
|
||||
|
||||
-
|
||||
-
|
||||
- Valid for (sub-)devices that create a single device node.
|
||||
|
||||
- .. row 11
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``major``
|
||||
@ -163,8 +163,8 @@ id's until they get an error.
|
||||
|
||||
- .. row 12
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``minor``
|
||||
@ -173,13 +173,13 @@ id's until they get an error.
|
||||
|
||||
- .. row 13
|
||||
|
||||
-
|
||||
-
|
||||
- __u8
|
||||
|
||||
- ``raw``\ [184]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ returned during the enumeration process.
|
||||
- \*\ ``pads``
|
||||
|
||||
- Pointer to a pads array allocated by the application. Ignored if
|
||||
NULL.
|
||||
NULL.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -87,7 +87,7 @@ returned during the enumeration process.
|
||||
- \*\ ``links``
|
||||
|
||||
- Pointer to a links array allocated by the application. Ignored if
|
||||
NULL.
|
||||
NULL.
|
||||
|
||||
|
||||
|
||||
|
@ -60,11 +60,11 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``topology_version``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Version of the media graph topology. When the graph is created,
|
||||
this field starts with zero. Every time a graph element is added
|
||||
or removed, this field is incremented.
|
||||
this field starts with zero. Every time a graph element is added
|
||||
or removed, this field is incremented.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -72,8 +72,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``num_entities``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Number of entities in the graph
|
||||
|
||||
- .. row 3
|
||||
@ -82,12 +82,12 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``ptr_entities``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- A pointer to a memory area where the entities array will be
|
||||
stored, converted to a 64-bits integer. It can be zero. if zero,
|
||||
the ioctl won't store the entities. It will just update
|
||||
``num_entities``
|
||||
stored, converted to a 64-bits integer. It can be zero. if zero,
|
||||
the ioctl won't store the entities. It will just update
|
||||
``num_entities``
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -95,8 +95,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``num_interfaces``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Number of interfaces in the graph
|
||||
|
||||
- .. row 5
|
||||
@ -105,12 +105,12 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``ptr_interfaces``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- A pointer to a memory area where the interfaces array will be
|
||||
stored, converted to a 64-bits integer. It can be zero. if zero,
|
||||
the ioctl won't store the interfaces. It will just update
|
||||
``num_interfaces``
|
||||
stored, converted to a 64-bits integer. It can be zero. if zero,
|
||||
the ioctl won't store the interfaces. It will just update
|
||||
``num_interfaces``
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -118,8 +118,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``num_pads``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Total number of pads in the graph
|
||||
|
||||
- .. row 7
|
||||
@ -128,11 +128,11 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``ptr_pads``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- A pointer to a memory area where the pads array will be stored,
|
||||
converted to a 64-bits integer. It can be zero. if zero, the ioctl
|
||||
won't store the pads. It will just update ``num_pads``
|
||||
converted to a 64-bits integer. It can be zero. if zero, the ioctl
|
||||
won't store the pads. It will just update ``num_pads``
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -140,8 +140,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``num_links``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Total number of data and interface links in the graph
|
||||
|
||||
- .. row 9
|
||||
@ -150,11 +150,11 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``ptr_links``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- A pointer to a memory area where the links array will be stored,
|
||||
converted to a 64-bits integer. It can be zero. if zero, the ioctl
|
||||
won't store the links. It will just update ``num_links``
|
||||
converted to a 64-bits integer. It can be zero. if zero, the ioctl
|
||||
won't store the links. It will just update ``num_links``
|
||||
|
||||
|
||||
|
||||
@ -171,8 +171,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Unique ID for the entity.
|
||||
|
||||
- .. row 2
|
||||
@ -181,8 +181,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``name``\ [64]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity name as an UTF-8 NULL-terminated string.
|
||||
|
||||
- .. row 3
|
||||
@ -191,8 +191,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``function``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Entity main function, see :ref:`media-entity-type` for details.
|
||||
|
||||
- .. row 4
|
||||
@ -202,7 +202,7 @@ desired arrays with the media graph elements.
|
||||
- ``reserved``\ [12]
|
||||
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
this array to zero.
|
||||
this array to zero.
|
||||
|
||||
|
||||
|
||||
@ -219,8 +219,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Unique ID for the interface.
|
||||
|
||||
- .. row 2
|
||||
@ -229,8 +229,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``intf_type``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Interface type, see :ref:`media-intf-type` for details.
|
||||
|
||||
- .. row 3
|
||||
@ -239,8 +239,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Interface flags. Currently unused.
|
||||
|
||||
- .. row 4
|
||||
@ -249,10 +249,10 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``reserved``\ [9]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
this array to zero.
|
||||
this array to zero.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -260,10 +260,10 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``devnode``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Used only for device node interfaces. See
|
||||
:ref:`media-v2-intf-devnode` for details..
|
||||
:ref:`media-v2-intf-devnode` for details..
|
||||
|
||||
|
||||
|
||||
@ -280,8 +280,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``major``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Device node major number.
|
||||
|
||||
- .. row 2
|
||||
@ -290,8 +290,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``minor``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Device node minor number.
|
||||
|
||||
|
||||
@ -309,8 +309,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Unique ID for the pad.
|
||||
|
||||
- .. row 2
|
||||
@ -319,8 +319,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``entity_id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Unique ID for the entity where this pad belongs.
|
||||
|
||||
- .. row 3
|
||||
@ -329,8 +329,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Pad flags, see :ref:`media-pad-flag` for more details.
|
||||
|
||||
- .. row 4
|
||||
@ -339,10 +339,10 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``reserved``\ [9]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
this array to zero.
|
||||
this array to zero.
|
||||
|
||||
|
||||
|
||||
@ -359,8 +359,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Unique ID for the pad.
|
||||
|
||||
- .. row 2
|
||||
@ -369,11 +369,11 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``source_id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- On pad to pad links: unique ID for the source pad.
|
||||
|
||||
On interface to entity links: unique ID for the interface.
|
||||
On interface to entity links: unique ID for the interface.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -381,11 +381,11 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``sink_id``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- On pad to pad links: unique ID for the sink pad.
|
||||
|
||||
On interface to entity links: unique ID for the entity.
|
||||
On interface to entity links: unique ID for the entity.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -393,8 +393,8 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Link flags, see :ref:`media-link-flag` for more details.
|
||||
|
||||
- .. row 5
|
||||
@ -403,10 +403,10 @@ desired arrays with the media graph elements.
|
||||
|
||||
- ``reserved``\ [5]
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
this array to zero.
|
||||
this array to zero.
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_ENT_F_UNKNOWN`` and ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
|
||||
|
||||
- Unknown entity. That generally indicates that a driver didn't
|
||||
initialize properly the entity, with is a Kernel bug
|
||||
initialize properly the entity, with is a Kernel bug
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -55,7 +55,7 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_ENT_F_TS_DEMUX``
|
||||
|
||||
- MPEG Transport stream demux entity. Could be implemented on
|
||||
hardware or in Kernelspace by the Linux DVB subsystem.
|
||||
hardware or in Kernelspace by the Linux DVB subsystem.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -68,7 +68,7 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_ENT_F_DTV_NET_DECAP``
|
||||
|
||||
- Digital TV network ULE/MLE desencapsulation entity. Could be
|
||||
implemented on hardware or in Kernelspace
|
||||
implemented on hardware or in Kernelspace
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -111,42 +111,42 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_ENT_F_ATV_DECODER``
|
||||
|
||||
- Analog video decoder, the basic function of the video decoder is
|
||||
to accept analogue video from a wide variety of sources such as
|
||||
broadcast, DVD players, cameras and video cassette recorders, in
|
||||
either NTSC, PAL, SECAM or HD format, separating the stream into
|
||||
its component parts, luminance and chrominance, and output it in
|
||||
some digital video standard, with appropriate timing signals.
|
||||
to accept analogue video from a wide variety of sources such as
|
||||
broadcast, DVD players, cameras and video cassette recorders, in
|
||||
either NTSC, PAL, SECAM or HD format, separating the stream into
|
||||
its component parts, luminance and chrominance, and output it in
|
||||
some digital video standard, with appropriate timing signals.
|
||||
|
||||
- .. row 17
|
||||
|
||||
- ``MEDIA_ENT_F_TUNER``
|
||||
|
||||
- Digital TV, analog TV, radio and/or software radio tuner, with
|
||||
consists on a PLL tuning stage that converts radio frequency (RF)
|
||||
signal into an Intermediate Frequency (IF). Modern tuners have
|
||||
internally IF-PLL decoders for audio and video, but older models
|
||||
have those stages implemented on separate entities.
|
||||
consists on a PLL tuning stage that converts radio frequency (RF)
|
||||
signal into an Intermediate Frequency (IF). Modern tuners have
|
||||
internally IF-PLL decoders for audio and video, but older models
|
||||
have those stages implemented on separate entities.
|
||||
|
||||
- .. row 18
|
||||
|
||||
- ``MEDIA_ENT_F_IF_VID_DECODER``
|
||||
|
||||
- IF-PLL video decoder. It receives the IF from a PLL and decodes
|
||||
the analog TV video signal. This is commonly found on some very
|
||||
old analog tuners, like Philips MK3 designs. They all contain a
|
||||
tda9887 (or some software compatible similar chip, like tda9885).
|
||||
Those devices use a different I2C address than the tuner PLL.
|
||||
the analog TV video signal. This is commonly found on some very
|
||||
old analog tuners, like Philips MK3 designs. They all contain a
|
||||
tda9887 (or some software compatible similar chip, like tda9885).
|
||||
Those devices use a different I2C address than the tuner PLL.
|
||||
|
||||
- .. row 19
|
||||
|
||||
- ``MEDIA_ENT_F_IF_AUD_DECODER``
|
||||
|
||||
- IF-PLL sound decoder. It receives the IF from a PLL and decodes
|
||||
the analog TV audio signal. This is commonly found on some very
|
||||
old analog hardware, like Micronas msp3400, Philips tda9840,
|
||||
tda985x, etc. Those devices use a different I2C address than the
|
||||
tuner PLL and should be controlled together with the IF-PLL video
|
||||
decoder.
|
||||
the analog TV audio signal. This is commonly found on some very
|
||||
old analog hardware, like Micronas msp3400, Philips tda9840,
|
||||
tda985x, etc. Those devices use a different I2C address than the
|
||||
tuner PLL and should be controlled together with the IF-PLL video
|
||||
decoder.
|
||||
|
||||
- .. row 20
|
||||
|
||||
@ -180,7 +180,7 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_ENT_FL_DEFAULT``
|
||||
|
||||
- Default entity for its type. Used to discover the default audio,
|
||||
VBI and video devices, the default camera sensor, ...
|
||||
VBI and video devices, the default camera sensor, ...
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -355,25 +355,25 @@ Types and flags used to represent the media graph elements
|
||||
- ``MEDIA_PAD_FL_SINK``
|
||||
|
||||
- Input pad, relative to the entity. Input pads sink data and are
|
||||
targets of links.
|
||||
targets of links.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``MEDIA_PAD_FL_SOURCE``
|
||||
|
||||
- Output pad, relative to the entity. Output pads source data and
|
||||
are origins of links.
|
||||
are origins of links.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``MEDIA_PAD_FL_MUST_CONNECT``
|
||||
|
||||
- If this flag is set and the pad is linked to any other pad, then
|
||||
at least one of those links must be enabled for the entity to be
|
||||
able to stream. There could be temporary reasons (e.g. device
|
||||
configuration dependent) for the pad to need enabled links even
|
||||
when this flag isn't set; the absence of the flag doesn't imply
|
||||
there is none.
|
||||
at least one of those links must be enabled for the entity to be
|
||||
able to stream. There could be temporary reasons (e.g. device
|
||||
configuration dependent) for the pad to need enabled links even
|
||||
when this flag isn't set; the absence of the flag doesn't imply
|
||||
there is none.
|
||||
|
||||
|
||||
One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
|
||||
@ -392,31 +392,31 @@ must be set for every pad.
|
||||
- ``MEDIA_LNK_FL_ENABLED``
|
||||
|
||||
- The link is enabled and can be used to transfer media data. When
|
||||
two or more links target a sink pad, only one of them can be
|
||||
enabled at a time.
|
||||
two or more links target a sink pad, only one of them can be
|
||||
enabled at a time.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``MEDIA_LNK_FL_IMMUTABLE``
|
||||
|
||||
- The link enabled state can't be modified at runtime. An immutable
|
||||
link is always enabled.
|
||||
link is always enabled.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``MEDIA_LNK_FL_DYNAMIC``
|
||||
|
||||
- The link enabled state can be modified during streaming. This flag
|
||||
is set by drivers and is read-only for applications.
|
||||
is set by drivers and is read-only for applications.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``MEDIA_LNK_FL_LINK_TYPE``
|
||||
|
||||
- This is a bitmask that defines the type of the link. Currently,
|
||||
two types of links are supported:
|
||||
two types of links are supported:
|
||||
|
||||
``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
|
||||
``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
|
||||
|
||||
``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
|
||||
interface and an entity
|
||||
``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
|
||||
interface and an entity
|
||||
|
@ -288,7 +288,7 @@ the remote via /dev/input/event devices.
|
||||
- ``KEY_ANGLE``
|
||||
|
||||
- Switch video camera angle (on videos with more than one angle
|
||||
stored)
|
||||
stored)
|
||||
|
||||
- ANGLE / SWAP
|
||||
|
||||
@ -739,19 +739,19 @@ at some cheaper IR's. Due to that, it is recommended to:
|
||||
- .. row 1
|
||||
|
||||
- On simpler IR's, without separate channel keys, you need to map UP
|
||||
as ``KEY_CHANNELUP``
|
||||
as ``KEY_CHANNELUP``
|
||||
|
||||
- .. row 2
|
||||
|
||||
- On simpler IR's, without separate channel keys, you need to map
|
||||
DOWN as ``KEY_CHANNELDOWN``
|
||||
DOWN as ``KEY_CHANNELDOWN``
|
||||
|
||||
- .. row 3
|
||||
|
||||
- On simpler IR's, without separate volume keys, you need to map
|
||||
LEFT as ``KEY_VOLUMEDOWN``
|
||||
LEFT as ``KEY_VOLUMEDOWN``
|
||||
|
||||
- .. row 4
|
||||
|
||||
- On simpler IR's, without separate volume keys, you need to map
|
||||
RIGHT as ``KEY_VOLUMEUP``
|
||||
RIGHT as ``KEY_VOLUMEUP``
|
||||
|
@ -32,145 +32,145 @@ file: media/v4l/keytable.c
|
||||
|
||||
void prtcode (int *codes)
|
||||
{
|
||||
struct parse_key *p;
|
||||
struct parse_key *p;
|
||||
|
||||
for (p=keynames;p->name!=NULL;p++) {
|
||||
if (p->value == (unsigned)codes[1]) {
|
||||
printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (p=keynames;p->name!=NULL;p++) {
|
||||
if (p->value == (unsigned)codes[1]) {
|
||||
printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isprint (codes[1]))
|
||||
printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
|
||||
else
|
||||
printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
|
||||
if (isprint (codes[1]))
|
||||
printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
|
||||
else
|
||||
printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
|
||||
}
|
||||
|
||||
int parse_code(char *string)
|
||||
{
|
||||
struct parse_key *p;
|
||||
struct parse_key *p;
|
||||
|
||||
for (p=keynames;p->name!=NULL;p++) {
|
||||
if (!strcasecmp(p->name, string)) {
|
||||
return p->value;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
for (p=keynames;p->name!=NULL;p++) {
|
||||
if (!strcasecmp(p->name, string)) {
|
||||
return p->value;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
unsigned int i, j;
|
||||
int codes[2];
|
||||
int fd;
|
||||
unsigned int i, j;
|
||||
int codes[2];
|
||||
|
||||
if (argc<2 || argc>4) {
|
||||
printf ("usage: %s <device> to get table; or\\n"
|
||||
" %s <device> <scancode> <keycode>\\n"
|
||||
" %s <device> <keycode_file>n",*argv,*argv,*argv);
|
||||
return -1;
|
||||
}
|
||||
if (argc<2 || argc>4) {
|
||||
printf ("usage: %s <device> to get table; or\\n"
|
||||
" %s <device> <scancode> <keycode>\\n"
|
||||
" %s <device> <keycode_file>n",*argv,*argv,*argv);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((fd = open(argv[1], O_RDONLY)) < 0) {
|
||||
perror("Couldn't open input device");
|
||||
return(-1);
|
||||
}
|
||||
if ((fd = open(argv[1], O_RDONLY)) < 0) {
|
||||
perror("Couldn't open input device");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (argc==4) {
|
||||
int value;
|
||||
if (argc==4) {
|
||||
int value;
|
||||
|
||||
value=parse_code(argv[3]);
|
||||
value=parse_code(argv[3]);
|
||||
|
||||
if (value==-1) {
|
||||
value = strtol(argv[3], NULL, 0);
|
||||
if (errno)
|
||||
perror("value");
|
||||
}
|
||||
if (value==-1) {
|
||||
value = strtol(argv[3], NULL, 0);
|
||||
if (errno)
|
||||
perror("value");
|
||||
}
|
||||
|
||||
codes [0] = (unsigned) strtol(argv[2], NULL, 0);
|
||||
codes [1] = (unsigned) value;
|
||||
codes [0] = (unsigned) strtol(argv[2], NULL, 0);
|
||||
codes [1] = (unsigned) value;
|
||||
|
||||
if(ioctl(fd, EVIOCSKEYCODE, codes))
|
||||
perror ("EVIOCSKEYCODE");
|
||||
if(ioctl(fd, EVIOCSKEYCODE, codes))
|
||||
perror ("EVIOCSKEYCODE");
|
||||
|
||||
if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
|
||||
prtcode(codes);
|
||||
return 0;
|
||||
}
|
||||
if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
|
||||
prtcode(codes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc==3) {
|
||||
FILE *fin;
|
||||
int value;
|
||||
char *scancode, *keycode, s[2048];
|
||||
if (argc==3) {
|
||||
FILE *fin;
|
||||
int value;
|
||||
char *scancode, *keycode, s[2048];
|
||||
|
||||
fin=fopen(argv[2],"r");
|
||||
if (fin==NULL) {
|
||||
perror ("opening keycode file");
|
||||
return -1;
|
||||
}
|
||||
fin=fopen(argv[2],"r");
|
||||
if (fin==NULL) {
|
||||
perror ("opening keycode file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Clears old table */
|
||||
for (j = 0; j < 256; j++) {
|
||||
for (i = 0; i < 256; i++) {
|
||||
codes[0] = (j << 8) | i;
|
||||
codes[1] = KEY_RESERVED;
|
||||
ioctl(fd, EVIOCSKEYCODE, codes);
|
||||
}
|
||||
}
|
||||
/* Clears old table */
|
||||
for (j = 0; j < 256; j++) {
|
||||
for (i = 0; i < 256; i++) {
|
||||
codes[0] = (j << 8) | i;
|
||||
codes[1] = KEY_RESERVED;
|
||||
ioctl(fd, EVIOCSKEYCODE, codes);
|
||||
}
|
||||
}
|
||||
|
||||
while (fgets(s,sizeof(s),fin)) {
|
||||
scancode=strtok(s,"\\n\\t =:");
|
||||
if (!scancode) {
|
||||
perror ("parsing input file scancode");
|
||||
return -1;
|
||||
}
|
||||
if (!strcasecmp(scancode, "scancode")) {
|
||||
scancode = strtok(NULL,"\\n\\t =:");
|
||||
if (!scancode) {
|
||||
perror ("parsing input file scancode");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
while (fgets(s,sizeof(s),fin)) {
|
||||
scancode=strtok(s,"\\n\\t =:");
|
||||
if (!scancode) {
|
||||
perror ("parsing input file scancode");
|
||||
return -1;
|
||||
}
|
||||
if (!strcasecmp(scancode, "scancode")) {
|
||||
scancode = strtok(NULL,"\\n\\t =:");
|
||||
if (!scancode) {
|
||||
perror ("parsing input file scancode");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
keycode=strtok(NULL,"\\n\\t =:(");
|
||||
if (!keycode) {
|
||||
perror ("parsing input file keycode");
|
||||
return -1;
|
||||
}
|
||||
keycode=strtok(NULL,"\\n\\t =:(");
|
||||
if (!keycode) {
|
||||
perror ("parsing input file keycode");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// printf ("parsing %s=%s:", scancode, keycode);
|
||||
value=parse_code(keycode);
|
||||
// printf ("\\tvalue=%d\\n",value);
|
||||
// printf ("parsing %s=%s:", scancode, keycode);
|
||||
value=parse_code(keycode);
|
||||
// printf ("\\tvalue=%d\\n",value);
|
||||
|
||||
if (value==-1) {
|
||||
value = strtol(keycode, NULL, 0);
|
||||
if (errno)
|
||||
perror("value");
|
||||
}
|
||||
if (value==-1) {
|
||||
value = strtol(keycode, NULL, 0);
|
||||
if (errno)
|
||||
perror("value");
|
||||
}
|
||||
|
||||
codes [0] = (unsigned) strtol(scancode, NULL, 0);
|
||||
codes [1] = (unsigned) value;
|
||||
codes [0] = (unsigned) strtol(scancode, NULL, 0);
|
||||
codes [1] = (unsigned) value;
|
||||
|
||||
// printf("\\t%04x=%04x\\n",codes[0], codes[1]);
|
||||
if(ioctl(fd, EVIOCSKEYCODE, codes)) {
|
||||
fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
|
||||
perror ("EVIOCSKEYCODE");
|
||||
}
|
||||
// printf("\\t%04x=%04x\\n",codes[0], codes[1]);
|
||||
if(ioctl(fd, EVIOCSKEYCODE, codes)) {
|
||||
fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
|
||||
perror ("EVIOCSKEYCODE");
|
||||
}
|
||||
|
||||
if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
|
||||
prtcode(codes);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
|
||||
prtcode(codes);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get scancode table */
|
||||
for (j = 0; j < 256; j++) {
|
||||
for (i = 0; i < 256; i++) {
|
||||
codes[0] = (j << 8) | i;
|
||||
if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
|
||||
prtcode(codes);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
/* Get scancode table */
|
||||
for (j = 0; j < 256; j++) {
|
||||
for (i = 0; i < 256; i++) {
|
||||
codes[0] = (j << 8) | i;
|
||||
if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
|
||||
prtcode(codes);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
|
||||
memset(&audio, 0, sizeof(audio));
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_AUDIO, &audio)) {
|
||||
perror("VIDIOC_G_AUDIO");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_AUDIO");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("Current input: %s\\n", audio.name);
|
||||
@ -79,8 +79,8 @@ the :ref:`VIDIOC_QUERYCAP` ioctl.
|
||||
audio.index = 0;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_S_AUDIO, &audio)) {
|
||||
perror("VIDIOC_S_AUDIO");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_S_AUDIO");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
.. [1]
|
||||
|
@ -48,14 +48,14 @@ buffer.
|
||||
|
||||
- ``index``
|
||||
|
||||
-
|
||||
-
|
||||
- Number of the buffer, set by the application except when calling
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
|
||||
driver. This field can range from zero to the number of buffers
|
||||
allocated with the :ref:`VIDIOC_REQBUFS` ioctl
|
||||
(struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>`
|
||||
``count``), plus any buffers allocated with
|
||||
:ref:`VIDIOC_CREATE_BUFS` minus one.
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
|
||||
driver. This field can range from zero to the number of buffers
|
||||
allocated with the :ref:`VIDIOC_REQBUFS` ioctl
|
||||
(struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>`
|
||||
``count``), plus any buffers allocated with
|
||||
:ref:`VIDIOC_CREATE_BUFS` minus one.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -63,11 +63,11 @@ buffer.
|
||||
|
||||
- ``type``
|
||||
|
||||
-
|
||||
-
|
||||
- Type of the buffer, same as struct
|
||||
:ref:`v4l2_format <v4l2-format>` ``type`` or struct
|
||||
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
|
||||
by the application. See :ref:`v4l2-buf-type`
|
||||
:ref:`v4l2_format <v4l2-format>` ``type`` or struct
|
||||
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set
|
||||
by the application. See :ref:`v4l2-buf-type`
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -75,16 +75,16 @@ buffer.
|
||||
|
||||
- ``bytesused``
|
||||
|
||||
-
|
||||
-
|
||||
- The number of bytes occupied by the data in the buffer. It depends
|
||||
on the negotiated data format and may change with each buffer for
|
||||
compressed variable size data like JPEG images. Drivers must set
|
||||
this field when ``type`` refers to a capture stream, applications
|
||||
when it refers to an output stream. If the application sets this
|
||||
to 0 for an output stream, then ``bytesused`` will be set to the
|
||||
size of the buffer (see the ``length`` field of this struct) by
|
||||
the driver. For multiplanar formats this field is ignored and the
|
||||
``planes`` pointer is used instead.
|
||||
on the negotiated data format and may change with each buffer for
|
||||
compressed variable size data like JPEG images. Drivers must set
|
||||
this field when ``type`` refers to a capture stream, applications
|
||||
when it refers to an output stream. If the application sets this
|
||||
to 0 for an output stream, then ``bytesused`` will be set to the
|
||||
size of the buffer (see the ``length`` field of this struct) by
|
||||
the driver. For multiplanar formats this field is ignored and the
|
||||
``planes`` pointer is used instead.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -92,7 +92,7 @@ buffer.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
- Flags set by the application or driver, see :ref:`buffer-flags`.
|
||||
|
||||
- .. row 5
|
||||
@ -101,11 +101,11 @@ buffer.
|
||||
|
||||
- ``field``
|
||||
|
||||
-
|
||||
-
|
||||
- Indicates the field order of the image in the buffer, see
|
||||
:ref:`v4l2-field`. This field is not used when the buffer
|
||||
contains VBI data. Drivers must set it when ``type`` refers to a
|
||||
capture stream, applications when it refers to an output stream.
|
||||
:ref:`v4l2-field`. This field is not used when the buffer
|
||||
contains VBI data. Drivers must set it when ``type`` refers to a
|
||||
capture stream, applications when it refers to an output stream.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -113,17 +113,17 @@ buffer.
|
||||
|
||||
- ``timestamp``
|
||||
|
||||
-
|
||||
-
|
||||
- For capture streams this is time when the first data byte was
|
||||
captured, as returned by the :c:func:`clock_gettime()` function
|
||||
for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in
|
||||
:ref:`buffer-flags`. For output streams the driver stores the
|
||||
time at which the last data byte was actually sent out in the
|
||||
``timestamp`` field. This permits applications to monitor the
|
||||
drift between the video and system clock. For output streams that
|
||||
use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill
|
||||
in the timestamp which will be copied by the driver to the capture
|
||||
stream.
|
||||
captured, as returned by the :c:func:`clock_gettime()` function
|
||||
for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in
|
||||
:ref:`buffer-flags`. For output streams the driver stores the
|
||||
time at which the last data byte was actually sent out in the
|
||||
``timestamp`` field. This permits applications to monitor the
|
||||
drift between the video and system clock. For output streams that
|
||||
use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill
|
||||
in the timestamp which will be copied by the driver to the capture
|
||||
stream.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -131,15 +131,15 @@ buffer.
|
||||
|
||||
- ``timecode``
|
||||
|
||||
-
|
||||
-
|
||||
- When ``type`` is ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` and the
|
||||
``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this
|
||||
structure contains a frame timecode. In
|
||||
:ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
|
||||
bottom field contain the same timecode. Timecodes are intended to
|
||||
help video editing and are typically recorded on video tapes, but
|
||||
also embedded in compressed formats like MPEG. This field is
|
||||
independent of the ``timestamp`` and ``sequence`` fields.
|
||||
``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this
|
||||
structure contains a frame timecode. In
|
||||
:ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
|
||||
bottom field contain the same timecode. Timecodes are intended to
|
||||
help video editing and are typically recorded on video tapes, but
|
||||
also embedded in compressed formats like MPEG. This field is
|
||||
independent of the ``timestamp`` and ``sequence`` fields.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -147,27 +147,27 @@ buffer.
|
||||
|
||||
- ``sequence``
|
||||
|
||||
-
|
||||
-
|
||||
- Set by the driver, counting the frames (not fields!) in sequence.
|
||||
This field is set for both input and output devices.
|
||||
This field is set for both input and output devices.
|
||||
|
||||
- .. row 9
|
||||
|
||||
- :cspan:`3`
|
||||
|
||||
In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
|
||||
bottom field have the same sequence number. The count starts at
|
||||
zero and includes dropped or repeated frames. A dropped frame was
|
||||
received by an input device but could not be stored due to lack of
|
||||
free buffer space. A repeated frame was displayed again by an
|
||||
output device because the application did not pass new data in
|
||||
time.
|
||||
In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
|
||||
bottom field have the same sequence number. The count starts at
|
||||
zero and includes dropped or repeated frames. A dropped frame was
|
||||
received by an input device but could not be stored due to lack of
|
||||
free buffer space. A repeated frame was displayed again by an
|
||||
output device because the application did not pass new data in
|
||||
time.
|
||||
|
||||
Note this may count the frames received e.g. over USB, without
|
||||
taking into account the frames dropped by the remote hardware due
|
||||
to limited compression throughput or bus bandwidth. These devices
|
||||
identify by not enumerating any video standards, see
|
||||
:ref:`standard`.
|
||||
Note this may count the frames received e.g. over USB, without
|
||||
taking into account the frames dropped by the remote hardware due
|
||||
to limited compression throughput or bus bandwidth. These devices
|
||||
identify by not enumerating any video standards, see
|
||||
:ref:`standard`.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -175,9 +175,9 @@ buffer.
|
||||
|
||||
- ``memory``
|
||||
|
||||
-
|
||||
-
|
||||
- This field must be set by applications and/or drivers in
|
||||
accordance with the selected I/O method. See :ref:`v4l2-memory`
|
||||
accordance with the selected I/O method. See :ref:`v4l2-memory`
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -187,52 +187,52 @@ buffer.
|
||||
|
||||
- .. row 12
|
||||
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``offset``
|
||||
|
||||
- For the single-planar API and when ``memory`` is
|
||||
``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
|
||||
start of the device memory. The value is returned by the driver
|
||||
and apart of serving as parameter to the
|
||||
:ref:`mmap() <func-mmap>` function not useful for applications.
|
||||
See :ref:`mmap` for details
|
||||
``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
|
||||
start of the device memory. The value is returned by the driver
|
||||
and apart of serving as parameter to the
|
||||
:ref:`mmap() <func-mmap>` function not useful for applications.
|
||||
See :ref:`mmap` for details
|
||||
|
||||
- .. row 13
|
||||
|
||||
-
|
||||
-
|
||||
- unsigned long
|
||||
|
||||
- ``userptr``
|
||||
|
||||
- For the single-planar API and when ``memory`` is
|
||||
``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to
|
||||
unsigned long type) in virtual memory, set by the application. See
|
||||
:ref:`userp` for details.
|
||||
``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to
|
||||
unsigned long type) in virtual memory, set by the application. See
|
||||
:ref:`userp` for details.
|
||||
|
||||
- .. row 14
|
||||
|
||||
-
|
||||
-
|
||||
- struct v4l2_plane
|
||||
|
||||
- ``*planes``
|
||||
|
||||
- When using the multi-planar API, contains a userspace pointer to
|
||||
an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of
|
||||
the array should be put in the ``length`` field of this
|
||||
:ref:`struct v4l2_buffer <v4l2-buffer>` structure.
|
||||
an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of
|
||||
the array should be put in the ``length`` field of this
|
||||
:ref:`struct v4l2_buffer <v4l2-buffer>` structure.
|
||||
|
||||
- .. row 15
|
||||
|
||||
-
|
||||
-
|
||||
- int
|
||||
|
||||
- ``fd``
|
||||
|
||||
- For the single-plane API and when ``memory`` is
|
||||
``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with
|
||||
a DMABUF buffer.
|
||||
``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with
|
||||
a DMABUF buffer.
|
||||
|
||||
- .. row 16
|
||||
|
||||
@ -240,14 +240,14 @@ buffer.
|
||||
|
||||
- ``length``
|
||||
|
||||
-
|
||||
-
|
||||
- Size of the buffer (not the payload) in bytes for the
|
||||
single-planar API. This is set by the driver based on the calls to
|
||||
:ref:`VIDIOC_REQBUFS` and/or
|
||||
:ref:`VIDIOC_CREATE_BUFS`. For the
|
||||
multi-planar API the application sets this to the number of
|
||||
elements in the ``planes`` array. The driver will fill in the
|
||||
actual number of valid elements in that array.
|
||||
single-planar API. This is set by the driver based on the calls to
|
||||
:ref:`VIDIOC_REQBUFS` and/or
|
||||
:ref:`VIDIOC_CREATE_BUFS`. For the
|
||||
multi-planar API the application sets this to the number of
|
||||
elements in the ``planes`` array. The driver will fill in the
|
||||
actual number of valid elements in that array.
|
||||
|
||||
- .. row 17
|
||||
|
||||
@ -255,9 +255,9 @@ buffer.
|
||||
|
||||
- ``reserved2``
|
||||
|
||||
-
|
||||
-
|
||||
- A place holder for future extensions. Drivers and applications
|
||||
must set this to 0.
|
||||
must set this to 0.
|
||||
|
||||
- .. row 18
|
||||
|
||||
@ -265,9 +265,9 @@ buffer.
|
||||
|
||||
- ``reserved``
|
||||
|
||||
-
|
||||
-
|
||||
- A place holder for future extensions. Drivers and applications
|
||||
must set this to 0.
|
||||
must set this to 0.
|
||||
|
||||
|
||||
|
||||
@ -285,14 +285,14 @@ buffer.
|
||||
|
||||
- ``bytesused``
|
||||
|
||||
-
|
||||
-
|
||||
- The number of bytes occupied by data in the plane (its payload).
|
||||
Drivers must set this field when ``type`` refers to a capture
|
||||
stream, applications when it refers to an output stream. If the
|
||||
application sets this to 0 for an output stream, then
|
||||
``bytesused`` will be set to the size of the plane (see the
|
||||
``length`` field of this struct) by the driver. Note that the
|
||||
actual image data starts at ``data_offset`` which may not be 0.
|
||||
Drivers must set this field when ``type`` refers to a capture
|
||||
stream, applications when it refers to an output stream. If the
|
||||
application sets this to 0 for an output stream, then
|
||||
``bytesused`` will be set to the size of the plane (see the
|
||||
``length`` field of this struct) by the driver. Note that the
|
||||
actual image data starts at ``data_offset`` which may not be 0.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -300,11 +300,11 @@ buffer.
|
||||
|
||||
- ``length``
|
||||
|
||||
-
|
||||
-
|
||||
- Size in bytes of the plane (not its payload). This is set by the
|
||||
driver based on the calls to
|
||||
:ref:`VIDIOC_REQBUFS` and/or
|
||||
:ref:`VIDIOC_CREATE_BUFS`.
|
||||
driver based on the calls to
|
||||
:ref:`VIDIOC_REQBUFS` and/or
|
||||
:ref:`VIDIOC_CREATE_BUFS`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -312,45 +312,45 @@ buffer.
|
||||
|
||||
- ``m``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``mem_offset``
|
||||
|
||||
- When the memory type in the containing struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_MMAP``, this
|
||||
is the value that should be passed to :ref:`mmap() <func-mmap>`,
|
||||
similar to the ``offset`` field in struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>`.
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_MMAP``, this
|
||||
is the value that should be passed to :ref:`mmap() <func-mmap>`,
|
||||
similar to the ``offset`` field in struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>`.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- unsigned long
|
||||
|
||||
- ``userptr``
|
||||
|
||||
- When the memory type in the containing struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``,
|
||||
this is a userspace pointer to the memory allocated for this plane
|
||||
by an application.
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``,
|
||||
this is a userspace pointer to the memory allocated for this plane
|
||||
by an application.
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- int
|
||||
|
||||
- ``fd``
|
||||
|
||||
- When the memory type in the containing struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``,
|
||||
this is a file descriptor associated with a DMABUF buffer, similar
|
||||
to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`.
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``,
|
||||
this is a file descriptor associated with a DMABUF buffer, similar
|
||||
to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -358,13 +358,13 @@ buffer.
|
||||
|
||||
- ``data_offset``
|
||||
|
||||
-
|
||||
-
|
||||
- Offset in bytes to video data in the plane. Drivers must set this
|
||||
field when ``type`` refers to a capture stream, applications when
|
||||
it refers to an output stream. Note that data_offset is included
|
||||
in ``bytesused``. So the size of the image in the plane is
|
||||
``bytesused``-``data_offset`` at offset ``data_offset`` from the
|
||||
start of the plane.
|
||||
field when ``type`` refers to a capture stream, applications when
|
||||
it refers to an output stream. Note that data_offset is included
|
||||
in ``bytesused``. So the size of the image in the plane is
|
||||
``bytesused``-``data_offset`` at offset ``data_offset`` from the
|
||||
start of the plane.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -372,9 +372,9 @@ buffer.
|
||||
|
||||
- ``reserved[11]``
|
||||
|
||||
-
|
||||
-
|
||||
- Reserved for future use. Should be zeroed by drivers and
|
||||
applications.
|
||||
applications.
|
||||
|
||||
|
||||
|
||||
@ -393,7 +393,7 @@ buffer.
|
||||
- 1
|
||||
|
||||
- Buffer of a single-planar video capture stream, see
|
||||
:ref:`capture`.
|
||||
:ref:`capture`.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -402,7 +402,7 @@ buffer.
|
||||
- 9
|
||||
|
||||
- Buffer of a multi-planar video capture stream, see
|
||||
:ref:`capture`.
|
||||
:ref:`capture`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -411,7 +411,7 @@ buffer.
|
||||
- 2
|
||||
|
||||
- Buffer of a single-planar video output stream, see
|
||||
:ref:`output`.
|
||||
:ref:`output`.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -476,7 +476,7 @@ buffer.
|
||||
- 11
|
||||
|
||||
- Buffer for Software Defined Radio (SDR) capture stream, see
|
||||
:ref:`sdr`.
|
||||
:ref:`sdr`.
|
||||
|
||||
- .. row 12
|
||||
|
||||
@ -485,7 +485,7 @@ buffer.
|
||||
- 12
|
||||
|
||||
- Buffer for Software Defined Radio (SDR) output stream, see
|
||||
:ref:`sdr`.
|
||||
:ref:`sdr`.
|
||||
|
||||
|
||||
|
||||
@ -504,12 +504,12 @@ buffer.
|
||||
- 0x00000001
|
||||
|
||||
- The buffer resides in device memory and has been mapped into the
|
||||
application's address space, see :ref:`mmap` for details.
|
||||
Drivers set or clear this flag when the
|
||||
:ref:`VIDIOC_QUERYBUF`,
|
||||
:ref:`VIDIOC_QBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the
|
||||
driver.
|
||||
application's address space, see :ref:`mmap` for details.
|
||||
Drivers set or clear this flag when the
|
||||
:ref:`VIDIOC_QUERYBUF`,
|
||||
:ref:`VIDIOC_QBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the
|
||||
driver.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -518,13 +518,13 @@ buffer.
|
||||
- 0x00000002
|
||||
|
||||
- Internally drivers maintain two buffer queues, an incoming and
|
||||
outgoing queue. When this flag is set, the buffer is currently on
|
||||
the incoming queue. It automatically moves to the outgoing queue
|
||||
after the buffer has been filled (capture devices) or displayed
|
||||
(output devices). Drivers set or clear this flag when the
|
||||
``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling
|
||||
the ``VIDIOC_QBUF``\ ioctl it is always set and after
|
||||
``VIDIOC_DQBUF`` always cleared.
|
||||
outgoing queue. When this flag is set, the buffer is currently on
|
||||
the incoming queue. It automatically moves to the outgoing queue
|
||||
after the buffer has been filled (capture devices) or displayed
|
||||
(output devices). Drivers set or clear this flag when the
|
||||
``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling
|
||||
the ``VIDIOC_QBUF``\ ioctl it is always set and after
|
||||
``VIDIOC_DQBUF`` always cleared.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -533,14 +533,14 @@ buffer.
|
||||
- 0x00000004
|
||||
|
||||
- When this flag is set, the buffer is currently on the outgoing
|
||||
queue, ready to be dequeued from the driver. Drivers set or clear
|
||||
this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After
|
||||
calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always
|
||||
cleared. Of course a buffer cannot be on both queues at the same
|
||||
time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag
|
||||
are mutually exclusive. They can be both cleared however, then the
|
||||
buffer is in "dequeued" state, in the application domain so to
|
||||
say.
|
||||
queue, ready to be dequeued from the driver. Drivers set or clear
|
||||
this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After
|
||||
calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always
|
||||
cleared. Of course a buffer cannot be on both queues at the same
|
||||
time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag
|
||||
are mutually exclusive. They can be both cleared however, then the
|
||||
buffer is in "dequeued" state, in the application domain so to
|
||||
say.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -549,10 +549,10 @@ buffer.
|
||||
- 0x00000040
|
||||
|
||||
- When this flag is set, the buffer has been dequeued successfully,
|
||||
although the data might have been corrupted. This is recoverable,
|
||||
streaming may continue as normal and the buffer may be reused
|
||||
normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is
|
||||
called.
|
||||
although the data might have been corrupted. This is recoverable,
|
||||
streaming may continue as normal and the buffer may be reused
|
||||
normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is
|
||||
called.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -561,11 +561,11 @@ buffer.
|
||||
- 0x00000008
|
||||
|
||||
- Drivers set or clear this flag when calling the ``VIDIOC_DQBUF``
|
||||
ioctl. It may be set by video capture devices when the buffer
|
||||
contains a compressed image which is a key frame (or field), i. e.
|
||||
can be decompressed on its own. Also known as an I-frame.
|
||||
Applications can set this bit when ``type`` refers to an output
|
||||
stream.
|
||||
ioctl. It may be set by video capture devices when the buffer
|
||||
contains a compressed image which is a key frame (or field), i. e.
|
||||
can be decompressed on its own. Also known as an I-frame.
|
||||
Applications can set this bit when ``type`` refers to an output
|
||||
stream.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -574,9 +574,9 @@ buffer.
|
||||
- 0x00000010
|
||||
|
||||
- Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags predicted frames
|
||||
or fields which contain only differences to a previous key frame.
|
||||
Applications can set this bit when ``type`` refers to an output
|
||||
stream.
|
||||
or fields which contain only differences to a previous key frame.
|
||||
Applications can set this bit when ``type`` refers to an output
|
||||
stream.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -585,10 +585,10 @@ buffer.
|
||||
- 0x00000020
|
||||
|
||||
- Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags a bi-directional
|
||||
predicted frame or field which contains only the differences
|
||||
between the current frame and both the preceding and following key
|
||||
frames to specify its content. Applications can set this bit when
|
||||
``type`` refers to an output stream.
|
||||
predicted frame or field which contains only the differences
|
||||
between the current frame and both the preceding and following key
|
||||
frames to specify its content. Applications can set this bit when
|
||||
``type`` refers to an output stream.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -597,9 +597,9 @@ buffer.
|
||||
- 0x00000100
|
||||
|
||||
- The ``timecode`` field is valid. Drivers set or clear this flag
|
||||
when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set
|
||||
this bit and the corresponding ``timecode`` structure when
|
||||
``type`` refers to an output stream.
|
||||
when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set
|
||||
this bit and the corresponding ``timecode`` structure when
|
||||
``type`` refers to an output stream.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -608,11 +608,11 @@ buffer.
|
||||
- 0x00000400
|
||||
|
||||
- The buffer has been prepared for I/O and can be queued by the
|
||||
application. Drivers set or clear this flag when the
|
||||
:ref:`VIDIOC_QUERYBUF`,
|
||||
:ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
|
||||
:ref:`VIDIOC_QBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
|
||||
application. Drivers set or clear this flag when the
|
||||
:ref:`VIDIOC_QUERYBUF`,
|
||||
:ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
|
||||
:ref:`VIDIOC_QBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -621,10 +621,10 @@ buffer.
|
||||
- 0x00000800
|
||||
|
||||
- Caches do not have to be invalidated for this buffer. Typically
|
||||
applications shall use this flag if the data captured in the
|
||||
buffer is not going to be touched by the CPU, instead the buffer
|
||||
will, probably, be passed on to a DMA-capable hardware unit for
|
||||
further processing or output.
|
||||
applications shall use this flag if the data captured in the
|
||||
buffer is not going to be touched by the CPU, instead the buffer
|
||||
will, probably, be passed on to a DMA-capable hardware unit for
|
||||
further processing or output.
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -633,9 +633,9 @@ buffer.
|
||||
- 0x00001000
|
||||
|
||||
- Caches do not have to be cleaned for this buffer. Typically
|
||||
applications shall use this flag for output buffers if the data in
|
||||
this buffer has not been created by the CPU but by some
|
||||
DMA-capable unit, in which case caches have not been used.
|
||||
applications shall use this flag for output buffers if the data in
|
||||
this buffer has not been created by the CPU but by some
|
||||
DMA-capable unit, in which case caches have not been used.
|
||||
|
||||
- .. row 12
|
||||
|
||||
@ -644,14 +644,14 @@ buffer.
|
||||
- 0x00100000
|
||||
|
||||
- Last buffer produced by the hardware. mem2mem codec drivers set
|
||||
this flag on the capture queue for the last buffer when the
|
||||
:ref:`VIDIOC_QUERYBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to
|
||||
hardware limitations, the last buffer may be empty. In this case
|
||||
the driver will set the ``bytesused`` field to 0, regardless of
|
||||
the format. Any Any subsequent call to the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code.
|
||||
this flag on the capture queue for the last buffer when the
|
||||
:ref:`VIDIOC_QUERYBUF` or
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to
|
||||
hardware limitations, the last buffer may be empty. In this case
|
||||
the driver will set the ``bytesused`` field to 0, regardless of
|
||||
the format. Any Any subsequent call to the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code.
|
||||
|
||||
- .. row 13
|
||||
|
||||
@ -660,8 +660,8 @@ buffer.
|
||||
- 0x0000e000
|
||||
|
||||
- Mask for timestamp types below. To test the timestamp type, mask
|
||||
out bits not belonging to timestamp type by performing a logical
|
||||
and operation with buffer flags and timestamp mask.
|
||||
out bits not belonging to timestamp type by performing a logical
|
||||
and operation with buffer flags and timestamp mask.
|
||||
|
||||
- .. row 14
|
||||
|
||||
@ -670,12 +670,12 @@ buffer.
|
||||
- 0x00000000
|
||||
|
||||
- Unknown timestamp type. This type is used by drivers before Linux
|
||||
3.9 and may be either monotonic (see below) or realtime (wall
|
||||
clock). Monotonic clock has been favoured in embedded systems
|
||||
whereas most of the drivers use the realtime clock. Either kinds
|
||||
of timestamps are available in user space via
|
||||
:c:func:`clock_gettime(2)` using clock IDs ``CLOCK_MONOTONIC``
|
||||
and ``CLOCK_REALTIME``, respectively.
|
||||
3.9 and may be either monotonic (see below) or realtime (wall
|
||||
clock). Monotonic clock has been favoured in embedded systems
|
||||
whereas most of the drivers use the realtime clock. Either kinds
|
||||
of timestamps are available in user space via
|
||||
:c:func:`clock_gettime(2)` using clock IDs ``CLOCK_MONOTONIC``
|
||||
and ``CLOCK_REALTIME``, respectively.
|
||||
|
||||
- .. row 15
|
||||
|
||||
@ -684,8 +684,8 @@ buffer.
|
||||
- 0x00002000
|
||||
|
||||
- The buffer timestamp has been taken from the ``CLOCK_MONOTONIC``
|
||||
clock. To access the same clock outside V4L2, use
|
||||
:c:func:`clock_gettime(2)`.
|
||||
clock. To access the same clock outside V4L2, use
|
||||
:c:func:`clock_gettime(2)`.
|
||||
|
||||
- .. row 16
|
||||
|
||||
@ -694,7 +694,7 @@ buffer.
|
||||
- 0x00004000
|
||||
|
||||
- The CAPTURE buffer timestamp has been taken from the corresponding
|
||||
OUTPUT buffer. This flag applies only to mem2mem devices.
|
||||
OUTPUT buffer. This flag applies only to mem2mem devices.
|
||||
|
||||
- .. row 17
|
||||
|
||||
@ -703,12 +703,12 @@ buffer.
|
||||
- 0x00070000
|
||||
|
||||
- Mask for timestamp sources below. The timestamp source defines the
|
||||
point of time the timestamp is taken in relation to the frame.
|
||||
Logical 'and' operation between the ``flags`` field and
|
||||
``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the
|
||||
timestamp source. Applications must set the timestamp source when
|
||||
``type`` refers to an output stream and
|
||||
``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set.
|
||||
point of time the timestamp is taken in relation to the frame.
|
||||
Logical 'and' operation between the ``flags`` field and
|
||||
``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the
|
||||
timestamp source. Applications must set the timestamp source when
|
||||
``type`` refers to an output stream and
|
||||
``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set.
|
||||
|
||||
- .. row 18
|
||||
|
||||
@ -717,11 +717,11 @@ buffer.
|
||||
- 0x00000000
|
||||
|
||||
- End Of Frame. The buffer timestamp has been taken when the last
|
||||
pixel of the frame has been received or the last pixel of the
|
||||
frame has been transmitted. In practice, software generated
|
||||
timestamps will typically be read from the clock a small amount of
|
||||
time after the last pixel has been received or transmitten,
|
||||
depending on the system and other activity in it.
|
||||
pixel of the frame has been received or the last pixel of the
|
||||
frame has been transmitted. In practice, software generated
|
||||
timestamps will typically be read from the clock a small amount of
|
||||
time after the last pixel has been received or transmitten,
|
||||
depending on the system and other activity in it.
|
||||
|
||||
- .. row 19
|
||||
|
||||
@ -730,8 +730,8 @@ buffer.
|
||||
- 0x00010000
|
||||
|
||||
- Start Of Exposure. The buffer timestamp has been taken when the
|
||||
exposure of the frame has begun. This is only valid for the
|
||||
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type.
|
||||
exposure of the frame has begun. This is only valid for the
|
||||
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type.
|
||||
|
||||
|
||||
|
||||
@ -817,7 +817,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
|
||||
- ``frames``
|
||||
|
||||
- Frame count, 0 ... 23/24/29/49/59, depending on the type of
|
||||
timecode.
|
||||
timecode.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -891,7 +891,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
|
||||
|
||||
- 4
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -899,7 +899,7 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
|
||||
|
||||
- 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
|
||||
@ -918,9 +918,9 @@ The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a
|
||||
- 0x0001
|
||||
|
||||
- Indicates "drop frame" semantics for counting frames in 29.97 fps
|
||||
material. When set, frame numbers 0 and 1 at the start of each
|
||||
minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the
|
||||
count.
|
||||
material. When set, frame numbers 0 and 1 at the start of each
|
||||
minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the
|
||||
count.
|
||||
|
||||
- .. row 2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -231,7 +231,7 @@ Control IDs
|
||||
- ``V4L2_COLORFX_EMBOSS``
|
||||
|
||||
- Emboss, the highlights and shadows replace light/dark boundaries
|
||||
and low contrast areas are set to a gray background.
|
||||
and low contrast areas are set to a gray background.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -274,7 +274,7 @@ Control IDs
|
||||
- ``V4L2_COLORFX_SOLARIZATION``
|
||||
|
||||
- Solarization, the image is partially reversed in tone, only color
|
||||
values above or below a certain threshold are inverted.
|
||||
values above or below a certain threshold are inverted.
|
||||
|
||||
- .. row 14
|
||||
|
||||
@ -293,7 +293,7 @@ Control IDs
|
||||
- ``V4L2_COLORFX_SET_CBCR``
|
||||
|
||||
- The Cb and Cr chroma components are replaced by fixed coefficients
|
||||
determined by ``V4L2_CID_COLORFX_CBCR`` control.
|
||||
determined by ``V4L2_CID_COLORFX_CBCR`` control.
|
||||
|
||||
|
||||
|
||||
@ -382,59 +382,59 @@ more menu type controls.
|
||||
|
||||
static void enumerate_menu(void)
|
||||
{
|
||||
printf(" Menu items:\\n");
|
||||
printf(" Menu items:\\n");
|
||||
|
||||
memset(&querymenu, 0, sizeof(querymenu));
|
||||
querymenu.id = queryctrl.id;
|
||||
memset(&querymenu, 0, sizeof(querymenu));
|
||||
querymenu.id = queryctrl.id;
|
||||
|
||||
for (querymenu.index = queryctrl.minimum;
|
||||
querymenu.index <= queryctrl.maximum;
|
||||
querymenu.index++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYMENU, &querymenu)) {
|
||||
printf(" %s\\n", querymenu.name);
|
||||
}
|
||||
}
|
||||
for (querymenu.index = queryctrl.minimum;
|
||||
querymenu.index <= queryctrl.maximum;
|
||||
querymenu.index++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYMENU, &querymenu)) {
|
||||
printf(" %s\\n", querymenu.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memset(&queryctrl, 0, sizeof(queryctrl));
|
||||
|
||||
for (queryctrl.id = V4L2_CID_BASE;
|
||||
queryctrl.id < V4L2_CID_LASTP1;
|
||||
queryctrl.id++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
queryctrl.id < V4L2_CID_LASTP1;
|
||||
queryctrl.id++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
} else {
|
||||
if (errno == EINVAL)
|
||||
continue;
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
} else {
|
||||
if (errno == EINVAL)
|
||||
continue;
|
||||
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
|
||||
queryctrl.id++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
queryctrl.id++) {
|
||||
if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
} else {
|
||||
if (errno == EINVAL)
|
||||
break;
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
} else {
|
||||
if (errno == EINVAL)
|
||||
break;
|
||||
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -445,21 +445,21 @@ more menu type controls.
|
||||
|
||||
queryctrl.id = V4L2_CTRL_CLASS_USER | V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
|
||||
break;
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
|
||||
break;
|
||||
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
|
||||
continue;
|
||||
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
printf("Control %s\\n", queryctrl.name);
|
||||
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
|
||||
enumerate_menu();
|
||||
|
||||
queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
}
|
||||
if (errno != EINVAL) {
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@ -473,42 +473,42 @@ more menu type controls.
|
||||
queryctrl.id = V4L2_CID_BRIGHTNESS;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
|
||||
if (errno != EINVAL) {
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
printf("V4L2_CID_BRIGHTNESS is not supportedn");
|
||||
}
|
||||
if (errno != EINVAL) {
|
||||
perror("VIDIOC_QUERYCTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
printf("V4L2_CID_BRIGHTNESS is not supportedn");
|
||||
}
|
||||
} else if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
|
||||
printf("V4L2_CID_BRIGHTNESS is not supportedn");
|
||||
printf("V4L2_CID_BRIGHTNESS is not supportedn");
|
||||
} else {
|
||||
memset(&control, 0, sizeof (control));
|
||||
control.id = V4L2_CID_BRIGHTNESS;
|
||||
control.value = queryctrl.default_value;
|
||||
memset(&control, 0, sizeof (control));
|
||||
control.id = V4L2_CID_BRIGHTNESS;
|
||||
control.value = queryctrl.default_value;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)) {
|
||||
perror("VIDIOC_S_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)) {
|
||||
perror("VIDIOC_S_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
memset(&control, 0, sizeof(control));
|
||||
control.id = V4L2_CID_CONTRAST;
|
||||
|
||||
if (0 == ioctl(fd, VIDIOC_G_CTRL, &control)) {
|
||||
control.value += 1;
|
||||
control.value += 1;
|
||||
|
||||
/* The driver may clamp the value or return ERANGE, ignored here */
|
||||
/* The driver may clamp the value or return ERANGE, ignored here */
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)
|
||||
&& errno != ERANGE) {
|
||||
perror("VIDIOC_S_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)
|
||||
&& errno != ERANGE) {
|
||||
perror("VIDIOC_S_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/* Ignore if V4L2_CID_CONTRAST is unsupported */
|
||||
} else if (errno != EINVAL) {
|
||||
perror("VIDIOC_G_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_CTRL");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
control.id = V4L2_CID_AUDIO_MUTE;
|
||||
|
@ -60,38 +60,38 @@ EBUSY error code until all applications closed the framebuffer device.
|
||||
int fb_fd;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_FBUF, &fbuf)) {
|
||||
perror("VIDIOC_G_FBUF");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_FBUF");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
for (i = 0; i < 30; i++) {
|
||||
char dev_name[16];
|
||||
struct fb_fix_screeninfo si;
|
||||
char dev_name[16];
|
||||
struct fb_fix_screeninfo si;
|
||||
|
||||
snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i);
|
||||
snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i);
|
||||
|
||||
fb_fd = open(dev_name, O_RDWR);
|
||||
if (-1 == fb_fd) {
|
||||
switch (errno) {
|
||||
case ENOENT: /* no such file */
|
||||
case ENXIO: /* no driver */
|
||||
continue;
|
||||
fb_fd = open(dev_name, O_RDWR);
|
||||
if (-1 == fb_fd) {
|
||||
switch (errno) {
|
||||
case ENOENT: /* no such file */
|
||||
case ENXIO: /* no driver */
|
||||
continue;
|
||||
|
||||
default:
|
||||
perror("open");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
default:
|
||||
perror("open");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) {
|
||||
if (si.smem_start == (unsigned long)fbuf.base)
|
||||
break;
|
||||
} else {
|
||||
/* Apparently not a framebuffer device. */
|
||||
}
|
||||
if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) {
|
||||
if (si.smem_start == (unsigned long)fbuf.base)
|
||||
break;
|
||||
} else {
|
||||
/* Apparently not a framebuffer device. */
|
||||
}
|
||||
|
||||
close(fb_fd);
|
||||
fb_fd = -1;
|
||||
close(fb_fd);
|
||||
fb_fd = -1;
|
||||
}
|
||||
|
||||
/* fb_fd is the file descriptor of the framebuffer device
|
||||
|
@ -123,10 +123,10 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``offset``
|
||||
|
||||
- Horizontal offset of the VBI image, relative to the leading edge
|
||||
of the line synchronization pulse and counted in samples: The
|
||||
first sample in the VBI image will be located ``offset`` /
|
||||
``sampling_rate`` seconds following the leading edge. See also
|
||||
:ref:`vbi-hsync`.
|
||||
of the line synchronization pulse and counted in samples: The
|
||||
first sample in the VBI image will be located ``offset`` /
|
||||
``sampling_rate`` seconds following the leading edge. See also
|
||||
:ref:`vbi-hsync`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -134,7 +134,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
|
||||
- ``samples_per_line``
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -143,13 +143,13 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``sample_format``
|
||||
|
||||
- Defines the sample format as in :ref:`pixfmt`, a
|
||||
four-character-code. [2]_ Usually this is ``V4L2_PIX_FMT_GREY``,
|
||||
i. e. each sample consists of 8 bits with lower values oriented
|
||||
towards the black level. Do not assume any other correlation of
|
||||
values with the signal level. For example, the MSB does not
|
||||
necessarily indicate if the signal is 'high' or 'low' because 128
|
||||
may not be the mean value of the signal. Drivers shall not convert
|
||||
the sample format by software.
|
||||
four-character-code. [2]_ Usually this is ``V4L2_PIX_FMT_GREY``,
|
||||
i. e. each sample consists of 8 bits with lower values oriented
|
||||
towards the black level. Do not assume any other correlation of
|
||||
values with the signal level. For example, the MSB does not
|
||||
necessarily indicate if the signal is 'high' or 'low' because 128
|
||||
may not be the mean value of the signal. Drivers shall not convert
|
||||
the sample format by software.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -158,16 +158,16 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``start``\ [2]
|
||||
|
||||
- This is the scanning system line number associated with the first
|
||||
line of the VBI image, of the first and the second field
|
||||
respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid
|
||||
values. The ``V4L2_VBI_ITU_525_F1_START``,
|
||||
``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and
|
||||
``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers
|
||||
for each field for each 525 or 625 line format as a convenience.
|
||||
Don't forget that ITU line numbering starts at 1, not 0. VBI input
|
||||
drivers can return start values 0 if the hardware cannot reliable
|
||||
identify scanning lines, VBI acquisition may not require this
|
||||
information.
|
||||
line of the VBI image, of the first and the second field
|
||||
respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid
|
||||
values. The ``V4L2_VBI_ITU_525_F1_START``,
|
||||
``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and
|
||||
``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers
|
||||
for each field for each 525 or 625 line format as a convenience.
|
||||
Don't forget that ITU line numbering starts at 1, not 0. VBI input
|
||||
drivers can return start values 0 if the hardware cannot reliable
|
||||
identify scanning lines, VBI acquisition may not require this
|
||||
information.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -176,34 +176,34 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``count``\ [2]
|
||||
|
||||
- The number of lines in the first and second field image,
|
||||
respectively.
|
||||
respectively.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- :cspan:`2`
|
||||
|
||||
Drivers should be as flexibility as possible. For example, it may
|
||||
be possible to extend or move the VBI capture window down to the
|
||||
picture area, implementing a 'full field mode' to capture data
|
||||
service transmissions embedded in the picture.
|
||||
Drivers should be as flexibility as possible. For example, it may
|
||||
be possible to extend or move the VBI capture window down to the
|
||||
picture area, implementing a 'full field mode' to capture data
|
||||
service transmissions embedded in the picture.
|
||||
|
||||
An application can set the first or second ``count`` value to zero
|
||||
if no data is required from the respective field; ``count``\ [1]
|
||||
if the scanning system is progressive, i. e. not interlaced. The
|
||||
corresponding start value shall be ignored by the application and
|
||||
driver. Anyway, drivers may not support single field capturing and
|
||||
return both count values non-zero.
|
||||
An application can set the first or second ``count`` value to zero
|
||||
if no data is required from the respective field; ``count``\ [1]
|
||||
if the scanning system is progressive, i. e. not interlaced. The
|
||||
corresponding start value shall be ignored by the application and
|
||||
driver. Anyway, drivers may not support single field capturing and
|
||||
return both count values non-zero.
|
||||
|
||||
Both ``count`` values set to zero, or line numbers outside the
|
||||
bounds depicted in :ref:`vbi-525` and :ref:`vbi-625`, or a
|
||||
field image covering lines of two fields, are invalid and shall
|
||||
not be returned by the driver.
|
||||
Both ``count`` values set to zero, or line numbers outside the
|
||||
bounds depicted in :ref:`vbi-525` and :ref:`vbi-625`, or a
|
||||
field image covering lines of two fields, are invalid and shall
|
||||
not be returned by the driver.
|
||||
|
||||
To initialize the ``start`` and ``count`` fields, applications
|
||||
must first determine the current video standard selection. The
|
||||
:ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field
|
||||
of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated
|
||||
for this purpose.
|
||||
To initialize the ``start`` and ``count`` fields, applications
|
||||
must first determine the current video standard selection. The
|
||||
:ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field
|
||||
of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated
|
||||
for this purpose.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -212,7 +212,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``flags``
|
||||
|
||||
- See :ref:`vbifmt-flags` below. Currently only drivers set flags,
|
||||
applications must set this field to zero.
|
||||
applications must set this field to zero.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -221,7 +221,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- ``reserved``\ [2]
|
||||
|
||||
- This array is reserved for future extensions. Drivers and
|
||||
applications must set it to zero.
|
||||
applications must set it to zero.
|
||||
|
||||
|
||||
|
||||
@ -240,12 +240,12 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- 0x0001
|
||||
|
||||
- This flag indicates hardware which does not properly distinguish
|
||||
between fields. Normally the VBI image stores the first field
|
||||
(lower scanning line numbers) first in memory. This may be a top
|
||||
or bottom field depending on the video standard. When this flag is
|
||||
set the first or second field may be stored first, however the
|
||||
fields are still in correct temporal order with the older field
|
||||
first in memory. [3]_
|
||||
between fields. Normally the VBI image stores the first field
|
||||
(lower scanning line numbers) first in memory. This may be a top
|
||||
or bottom field depending on the video standard. When this flag is
|
||||
set the first or second field may be stored first, however the
|
||||
fields are still in correct temporal order with the older field
|
||||
first in memory. [3]_
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -254,18 +254,18 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
|
||||
- 0x0002
|
||||
|
||||
- By default the two field images will be passed sequentially; all
|
||||
lines of the first field followed by all lines of the second field
|
||||
(compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and
|
||||
``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in
|
||||
memory depends on the video standard). When this flag is set, the
|
||||
two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The
|
||||
first line of the first field followed by the first line of the
|
||||
second field, then the two second lines, and so on. Such a layout
|
||||
may be necessary when the hardware has been programmed to capture
|
||||
or output interlaced video images and is unable to separate the
|
||||
fields for VBI capturing at the same time. For simplicity setting
|
||||
this flag implies that both ``count`` values are equal and
|
||||
non-zero.
|
||||
lines of the first field followed by all lines of the second field
|
||||
(compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and
|
||||
``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in
|
||||
memory depends on the video standard). When this flag is set, the
|
||||
two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The
|
||||
first line of the first field followed by the first line of the
|
||||
second field, then the two second lines, and so on. Such a layout
|
||||
may be necessary when the hardware has been programmed to capture
|
||||
or output interlaced video images and is unable to separate the
|
||||
fields for VBI capturing at the same time. For simplicity setting
|
||||
this flag implies that both ``count`` values are equal and
|
||||
non-zero.
|
||||
|
||||
|
||||
|
||||
|
@ -144,21 +144,21 @@ RDS datastructures
|
||||
- Bits 3-5
|
||||
|
||||
- Deprecated. Currently identical to bits 0-2. Do not use these
|
||||
bits.
|
||||
bits.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- Bit 6
|
||||
|
||||
- Corrected bit. Indicates that an error was corrected for this data
|
||||
block.
|
||||
block.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- Bit 7
|
||||
|
||||
- Error bit. Indicates that an uncorrectable error occurred during
|
||||
reception of this block.
|
||||
reception of this block.
|
||||
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_MSK
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- Mask for bits 0-2 to get the block ID.
|
||||
@ -183,7 +183,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_A
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
- Block A.
|
||||
@ -192,7 +192,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_B
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- Block B.
|
||||
@ -201,7 +201,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_C
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
- Block C.
|
||||
@ -210,7 +210,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_D
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- Block D.
|
||||
@ -219,7 +219,7 @@ RDS datastructures
|
||||
|
||||
- V4L2_RDS_BLOCK_C_ALT
|
||||
|
||||
-
|
||||
-
|
||||
- 4
|
||||
|
||||
- Block C'.
|
||||
|
@ -93,9 +93,9 @@ data transfer, set by the driver in order to inform application.
|
||||
- ``pixelformat``
|
||||
|
||||
- The data format or type of compression, set by the application.
|
||||
This is a little endian
|
||||
:ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR
|
||||
formats in :ref:`sdr-formats`.
|
||||
This is a little endian
|
||||
:ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR
|
||||
formats in :ref:`sdr-formats`.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -104,7 +104,7 @@ data transfer, set by the driver in order to inform application.
|
||||
- ``buffersize``
|
||||
|
||||
- Maximum size in bytes required for data. Value is set by the
|
||||
driver.
|
||||
driver.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -113,7 +113,7 @@ data transfer, set by the driver in order to inform application.
|
||||
- ``reserved[24]``
|
||||
|
||||
- This array is reserved for future extensions. Drivers and
|
||||
applications must set it to zero.
|
||||
applications must set it to zero.
|
||||
|
||||
|
||||
An SDR device may support :ref:`read/write <rw>` and/or streaming
|
||||
|
@ -116,22 +116,22 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- :cspan:`2`
|
||||
|
||||
If ``service_set`` is non-zero when passed with
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
|
||||
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
|
||||
array will be filled by the driver according to the services
|
||||
specified in this field. For example, if ``service_set`` is
|
||||
initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
|
||||
a driver for the cx25840 video decoder sets lines 7-22 of both
|
||||
fields [1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first
|
||||
field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to
|
||||
zero, then the values of ``service_lines`` will be used instead.
|
||||
If ``service_set`` is non-zero when passed with
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
|
||||
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
|
||||
array will be filled by the driver according to the services
|
||||
specified in this field. For example, if ``service_set`` is
|
||||
initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
|
||||
a driver for the cx25840 video decoder sets lines 7-22 of both
|
||||
fields [1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first
|
||||
field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to
|
||||
zero, then the values of ``service_lines`` will be used instead.
|
||||
|
||||
On return the driver sets this field to the union of all elements
|
||||
of the returned ``service_lines`` array. It may contain less
|
||||
services than requested, perhaps just one, if the hardware cannot
|
||||
handle more services simultaneously. It may be empty (zero) if
|
||||
none of the requested services are supported by the hardware.
|
||||
On return the driver sets this field to the union of all elements
|
||||
of the returned ``service_lines`` array. It may contain less
|
||||
services than requested, perhaps just one, if the hardware cannot
|
||||
handle more services simultaneously. It may be empty (zero) if
|
||||
none of the requested services are supported by the hardware.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -141,22 +141,22 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- :cspan:`2`
|
||||
|
||||
Applications initialize this array with sets of data services the
|
||||
driver shall look for or insert on the respective scan line.
|
||||
Subject to hardware capabilities drivers return the requested set,
|
||||
a subset, which may be just a single service, or an empty set.
|
||||
When the hardware cannot handle multiple services on the same line
|
||||
the driver shall choose one. No assumptions can be made on which
|
||||
service the driver chooses.
|
||||
Applications initialize this array with sets of data services the
|
||||
driver shall look for or insert on the respective scan line.
|
||||
Subject to hardware capabilities drivers return the requested set,
|
||||
a subset, which may be just a single service, or an empty set.
|
||||
When the hardware cannot handle multiple services on the same line
|
||||
the driver shall choose one. No assumptions can be made on which
|
||||
service the driver chooses.
|
||||
|
||||
Data services are defined in :ref:`vbi-services2`. Array indices
|
||||
map to ITU-R line numbers (see also :ref:`vbi-525` and
|
||||
:ref:`vbi-625`) as follows:
|
||||
Data services are defined in :ref:`vbi-services2`. Array indices
|
||||
map to ITU-R line numbers (see also :ref:`vbi-525` and
|
||||
:ref:`vbi-625`) as follows:
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Element
|
||||
|
||||
- 525 line systems
|
||||
@ -165,8 +165,8 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- ``service_lines``\ [0][1]
|
||||
|
||||
- 1
|
||||
@ -175,8 +175,8 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- ``service_lines``\ [0][23]
|
||||
|
||||
- 23
|
||||
@ -185,8 +185,8 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- ``service_lines``\ [1][1]
|
||||
|
||||
- 264
|
||||
@ -195,8 +195,8 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- ``service_lines``\ [1][23]
|
||||
|
||||
- 286
|
||||
@ -205,15 +205,15 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- :cspan:`2` Drivers must set ``service_lines`` [0][0] and
|
||||
``service_lines``\ [1][0] to zero. The
|
||||
``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``,
|
||||
``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START``
|
||||
defines give the start line numbers for each field for each 525 or
|
||||
625 line format as a convenience. Don't forget that ITU line
|
||||
numbering starts at 1, not 0.
|
||||
``service_lines``\ [1][0] to zero. The
|
||||
``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``,
|
||||
``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START``
|
||||
defines give the start line numbers for each field for each 525 or
|
||||
625 line format as a convenience. Don't forget that ITU line
|
||||
numbering starts at 1, not 0.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -222,14 +222,14 @@ which may return ``EBUSY`` can be the
|
||||
- ``io_size``
|
||||
|
||||
- :cspan:`2` Maximum number of bytes passed by one
|
||||
:ref:`read() <func-read>` or :ref:`write() <func-write>` call,
|
||||
and the buffer size in bytes for the
|
||||
:ref:`VIDIOC_QBUF` and
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
|
||||
to the size of struct
|
||||
:ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
|
||||
number of non-zero elements in the returned ``service_lines``
|
||||
array (that is the number of lines potentially carrying data).
|
||||
:ref:`read() <func-read>` or :ref:`write() <func-write>` call,
|
||||
and the buffer size in bytes for the
|
||||
:ref:`VIDIOC_QBUF` and
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
|
||||
to the size of struct
|
||||
:ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the
|
||||
number of non-zero elements in the returned ``service_lines``
|
||||
array (that is the number of lines potentially carrying data).
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -238,7 +238,7 @@ which may return ``EBUSY`` can be the
|
||||
- ``reserved``\ [2]
|
||||
|
||||
- :cspan:`2` This array is reserved for future extensions.
|
||||
Applications and drivers must set it to zero.
|
||||
Applications and drivers must set it to zero.
|
||||
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ which may return ``EBUSY`` can be the
|
||||
- PAL/SECAM line 7-22, 320-335 (second field 7-22)
|
||||
|
||||
- Last 42 of the 45 byte Teletext packet, that is without clock
|
||||
run-in and framing code, lsb first transmitted.
|
||||
run-in and framing code, lsb first transmitted.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -286,7 +286,7 @@ which may return ``EBUSY`` can be the
|
||||
- PAL line 16
|
||||
|
||||
- Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
|
||||
first transmitted.
|
||||
first transmitted.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -299,7 +299,7 @@ which may return ``EBUSY`` can be the
|
||||
- NTSC line 21, 284 (second field 21)
|
||||
|
||||
- Two bytes in transmission order, including parity bit, lsb first
|
||||
transmitted.
|
||||
transmitted.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -311,13 +311,13 @@ which may return ``EBUSY`` can be the
|
||||
|
||||
- PAL/SECAM line 23
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
Byte 0 1
|
||||
msb lsb msb lsb
|
||||
Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
|
||||
Byte 0 1
|
||||
msb lsb msb lsb
|
||||
Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -375,12 +375,12 @@ of one video frame. The ``id`` of unused
|
||||
- ``id``
|
||||
|
||||
- A flag from :ref:`vbi-services` identifying the type of data in
|
||||
this packet. Only a single bit must be set. When the ``id`` of a
|
||||
captured packet is zero, the packet is empty and the contents of
|
||||
other fields are undefined. Applications shall ignore empty
|
||||
packets. When the ``id`` of a packet for output is zero the
|
||||
contents of the ``data`` field are undefined and the driver must
|
||||
no longer insert data on the requested ``field`` and ``line``.
|
||||
this packet. Only a single bit must be set. When the ``id`` of a
|
||||
captured packet is zero, the packet is empty and the contents of
|
||||
other fields are undefined. Applications shall ignore empty
|
||||
packets. When the ``id`` of a packet for output is zero the
|
||||
contents of the ``data`` field are undefined and the driver must
|
||||
no longer insert data on the requested ``field`` and ``line``.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -389,8 +389,8 @@ of one video frame. The ``id`` of unused
|
||||
- ``field``
|
||||
|
||||
- The video field number this data has been captured from, or shall
|
||||
be inserted at. ``0`` for the first field, ``1`` for the second
|
||||
field.
|
||||
be inserted at. ``0`` for the first field, ``1`` for the second
|
||||
field.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -399,11 +399,11 @@ of one video frame. The ``id`` of unused
|
||||
- ``line``
|
||||
|
||||
- The field (as opposed to frame) line number this data has been
|
||||
captured from, or shall be inserted at. See :ref:`vbi-525` and
|
||||
:ref:`vbi-625` for valid values. Sliced VBI capture devices can
|
||||
set the line number of all packets to ``0`` if the hardware cannot
|
||||
reliably identify scan lines. The field number must always be
|
||||
valid.
|
||||
captured from, or shall be inserted at. See :ref:`vbi-525` and
|
||||
:ref:`vbi-625` for valid values. Sliced VBI capture devices can
|
||||
set the line number of all packets to ``0`` if the hardware cannot
|
||||
reliably identify scan lines. The field number must always be
|
||||
valid.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -412,7 +412,7 @@ of one video frame. The ``id`` of unused
|
||||
- ``reserved``
|
||||
|
||||
- This field is reserved for future extensions. Applications and
|
||||
drivers must set it to zero.
|
||||
drivers must set it to zero.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -421,9 +421,9 @@ of one video frame. The ``id`` of unused
|
||||
- ``data``\ [48]
|
||||
|
||||
- The packet payload. See :ref:`vbi-services` for the contents and
|
||||
number of bytes passed for each data type. The contents of padding
|
||||
bytes at the end of this array are undefined, drivers and
|
||||
applications shall ignore them.
|
||||
number of bytes passed for each data type. The contents of padding
|
||||
bytes at the end of this array are undefined, drivers and
|
||||
applications shall ignore them.
|
||||
|
||||
|
||||
Packets are always passed in ascending line number order, without
|
||||
@ -556,11 +556,11 @@ number).
|
||||
|
||||
- ``magic``\ [4]
|
||||
|
||||
-
|
||||
-
|
||||
- A "magic" constant from :ref:`v4l2-mpeg-vbi-fmt-ivtv-magic` that
|
||||
indicates this is a valid sliced VBI data payload and also
|
||||
indicates which member of the anonymous union, ``itv0`` or
|
||||
``ITV0``, to use for the payload data.
|
||||
indicates this is a valid sliced VBI data payload and also
|
||||
indicates which member of the anonymous union, ``itv0`` or
|
||||
``ITV0``, to use for the payload data.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -570,27 +570,27 @@ number).
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_mpeg_vbi_itv0 <v4l2-mpeg-vbi-itv0>`
|
||||
|
||||
- ``itv0``
|
||||
|
||||
- The primary form of the sliced VBI data payload that contains
|
||||
anywhere from 1 to 35 lines of sliced VBI data. Line masks are
|
||||
provided in this form of the payload indicating which VBI lines
|
||||
are provided.
|
||||
anywhere from 1 to 35 lines of sliced VBI data. Line masks are
|
||||
provided in this form of the payload indicating which VBI lines
|
||||
are provided.
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_mpeg_vbi_ITV0 <v4l2-mpeg-vbi-itv0-1>`
|
||||
|
||||
- ``ITV0``
|
||||
|
||||
- An alternate form of the sliced VBI data payload used when 36
|
||||
lines of sliced VBI data are present. No line masks are provided
|
||||
in this form of the payload; all valid line mask bits are
|
||||
implcitly set.
|
||||
lines of sliced VBI data are present. No line masks are provided
|
||||
in this form of the payload; all valid line mask bits are
|
||||
implcitly set.
|
||||
|
||||
|
||||
|
||||
@ -617,8 +617,8 @@ number).
|
||||
- "itv0"
|
||||
|
||||
- Indicates the ``itv0`` member of the union in struct
|
||||
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
|
||||
valid.
|
||||
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
|
||||
valid.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -627,8 +627,8 @@ number).
|
||||
- "ITV0"
|
||||
|
||||
- Indicates the ``ITV0`` member of the union in struct
|
||||
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
|
||||
valid and that 36 lines of sliced VBI data are present.
|
||||
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is
|
||||
valid and that 36 lines of sliced VBI data are present.
|
||||
|
||||
|
||||
|
||||
@ -647,42 +647,42 @@ number).
|
||||
- ``linemask``\ [2]
|
||||
|
||||
- Bitmasks indicating the VBI service lines present. These
|
||||
``linemask`` values are stored in little endian byte order in the
|
||||
MPEG stream. Some reference ``linemask`` bit positions with their
|
||||
corresponding VBI line number and video field are given below.
|
||||
b\ :sub:`0` indicates the least significant bit of a ``linemask``
|
||||
value:
|
||||
``linemask`` values are stored in little endian byte order in the
|
||||
MPEG stream. Some reference ``linemask`` bit positions with their
|
||||
corresponding VBI line number and video field are given below.
|
||||
b\ :sub:`0` indicates the least significant bit of a ``linemask``
|
||||
value:
|
||||
|
||||
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
linemask[0] b0: line 6 first field
|
||||
linemask[0] b17: line 23 first field
|
||||
linemask[0] b18: line 6 second field
|
||||
linemask[0] b31: line 19 second field
|
||||
linemask[1] b0: line 20 second field
|
||||
linemask[1] b3: line 23 second field
|
||||
linemask[1] b4-b31: unused and set to 0
|
||||
linemask[0] b0: line 6 first field
|
||||
linemask[0] b17: line 23 first field
|
||||
linemask[0] b18: line 6 second field
|
||||
linemask[0] b31: line 19 second field
|
||||
linemask[1] b0: line 20 second field
|
||||
linemask[1] b3: line 23 second field
|
||||
linemask[1] b4-b31: unused and set to 0
|
||||
|
||||
- .. row 2
|
||||
|
||||
- struct
|
||||
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
|
||||
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
|
||||
|
||||
- ``line``\ [35]
|
||||
|
||||
- This is a variable length array that holds from 1 to 35 lines of
|
||||
sliced VBI data. The sliced VBI data lines present correspond to
|
||||
the bits set in the ``linemask`` array, starting from b\ :sub:`0`
|
||||
of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0],
|
||||
and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of
|
||||
``linemask``\ [1]. ``line``\ [0] corresponds to the first bit
|
||||
found set in the ``linemask`` array, ``line``\ [1] corresponds to
|
||||
the second bit found set in the ``linemask`` array, etc. If no
|
||||
``linemask`` array bits are set, then ``line``\ [0] may contain
|
||||
one line of unspecified data that should be ignored by
|
||||
applications.
|
||||
sliced VBI data. The sliced VBI data lines present correspond to
|
||||
the bits set in the ``linemask`` array, starting from b\ :sub:`0`
|
||||
of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0],
|
||||
and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of
|
||||
``linemask``\ [1]. ``line``\ [0] corresponds to the first bit
|
||||
found set in the ``linemask`` array, ``line``\ [1] corresponds to
|
||||
the second bit found set in the ``linemask`` array, etc. If no
|
||||
``linemask`` array bits are set, then ``line``\ [0] may contain
|
||||
one line of unspecified data that should be ignored by
|
||||
applications.
|
||||
|
||||
|
||||
|
||||
@ -697,14 +697,14 @@ number).
|
||||
- .. row 1
|
||||
|
||||
- struct
|
||||
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
|
||||
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>`
|
||||
|
||||
- ``line``\ [36]
|
||||
|
||||
- A fixed length array of 36 lines of sliced VBI data. ``line``\ [0]
|
||||
through ``line``\ [17] correspond to lines 6 through 23 of the
|
||||
first field. ``line``\ [18] through ``line``\ [35] corresponds to
|
||||
lines 6 through 23 of the second field.
|
||||
through ``line``\ [17] correspond to lines 6 through 23 of the
|
||||
first field. ``line``\ [18] through ``line``\ [35] corresponds to
|
||||
lines 6 through 23 of the second field.
|
||||
|
||||
|
||||
|
||||
@ -723,8 +723,8 @@ number).
|
||||
- ``id``
|
||||
|
||||
- A line identifier value from
|
||||
:ref:`ITV0-Line-Identifier-Constants` that indicates the type of
|
||||
sliced VBI data stored on this line.
|
||||
:ref:`ITV0-Line-Identifier-Constants` that indicates the type of
|
||||
sliced VBI data stored on this line.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -759,7 +759,7 @@ number).
|
||||
- 1
|
||||
|
||||
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
|
||||
description of the line payload.
|
||||
description of the line payload.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -768,7 +768,7 @@ number).
|
||||
- 4
|
||||
|
||||
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
|
||||
description of the line payload.
|
||||
description of the line payload.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -777,7 +777,7 @@ number).
|
||||
- 5
|
||||
|
||||
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
|
||||
description of the line payload.
|
||||
description of the line payload.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -786,7 +786,7 @@ number).
|
||||
- 7
|
||||
|
||||
- Refer to :ref:`Sliced VBI services <vbi-services2>` for a
|
||||
description of the line payload.
|
||||
description of the line payload.
|
||||
|
||||
|
||||
|
||||
|
@ -211,7 +211,7 @@ list entity names and pad numbers).
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- Sensor/0 format
|
||||
|
||||
- Frontend/0 format
|
||||
|
@ -53,7 +53,7 @@ using driver module options. The major device number remains 81.
|
||||
- Video capture and overlay
|
||||
|
||||
- ``/dev/video`` and ``/dev/bttv0``\ [1]_, ``/dev/video0`` to
|
||||
``/dev/video63``
|
||||
``/dev/video63``
|
||||
|
||||
- 0-63
|
||||
|
||||
@ -107,7 +107,7 @@ introduction.
|
||||
- struct :c:type:`struct video_capability` ``type``
|
||||
|
||||
- struct :ref:`v4l2_capability <v4l2-capability>`
|
||||
``capabilities`` flags
|
||||
``capabilities`` flags
|
||||
|
||||
- Purpose
|
||||
|
||||
@ -148,31 +148,31 @@ introduction.
|
||||
- ``VID_TYPE_CHROMAKEY``
|
||||
|
||||
- ``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct
|
||||
:ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
:ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
|
||||
- Whether chromakey overlay is supported. For more information on
|
||||
overlay see :ref:`overlay`.
|
||||
overlay see :ref:`overlay`.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- ``VID_TYPE_CLIPPING``
|
||||
|
||||
- ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
|
||||
``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of
|
||||
struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of
|
||||
struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
|
||||
- Whether clipping the overlaid image is supported, see
|
||||
:ref:`overlay`.
|
||||
:ref:`overlay`.
|
||||
|
||||
- .. row 8
|
||||
|
||||
- ``VID_TYPE_FRAMERAM``
|
||||
|
||||
- ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability``
|
||||
of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`
|
||||
|
||||
- Whether overlay overwrites frame buffer memory, see
|
||||
:ref:`overlay`.
|
||||
:ref:`overlay`.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -181,11 +181,11 @@ introduction.
|
||||
- ``-``
|
||||
|
||||
- This flag indicates if the hardware can scale images. The V4L2 API
|
||||
implies the scale factor by setting the cropping dimensions and
|
||||
image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The
|
||||
driver returns the closest sizes possible. For more information on
|
||||
cropping and scaling see :ref:`crop`.
|
||||
implies the scale factor by setting the cropping dimensions and
|
||||
image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The
|
||||
driver returns the closest sizes possible. For more information on
|
||||
cropping and scaling see :ref:`crop`.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -194,9 +194,9 @@ introduction.
|
||||
- ``-``
|
||||
|
||||
- Applications can enumerate the supported image formats with the
|
||||
:ref:`VIDIOC_ENUM_FMT` ioctl to determine if
|
||||
the device supports grey scale capturing only. For more
|
||||
information on image formats see :ref:`pixfmt`.
|
||||
:ref:`VIDIOC_ENUM_FMT` ioctl to determine if
|
||||
the device supports grey scale capturing only. For more
|
||||
information on image formats see :ref:`pixfmt`.
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -205,10 +205,10 @@ introduction.
|
||||
- ``-``
|
||||
|
||||
- Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
|
||||
ioctl to determine if the device supports capturing a subsection
|
||||
of the full picture ("cropping" in V4L2). If not, the ioctl
|
||||
returns the ``EINVAL`` error code. For more information on cropping
|
||||
and scaling see :ref:`crop`.
|
||||
ioctl to determine if the device supports capturing a subsection
|
||||
of the full picture ("cropping" in V4L2). If not, the ioctl
|
||||
returns the ``EINVAL`` error code. For more information on cropping
|
||||
and scaling see :ref:`crop`.
|
||||
|
||||
- .. row 12
|
||||
|
||||
@ -217,8 +217,8 @@ introduction.
|
||||
- ``-``
|
||||
|
||||
- Applications can enumerate the supported image formats with the
|
||||
:ref:`VIDIOC_ENUM_FMT` ioctl to determine if
|
||||
the device supports MPEG streams.
|
||||
:ref:`VIDIOC_ENUM_FMT` ioctl to determine if
|
||||
the device supports MPEG streams.
|
||||
|
||||
- .. row 13
|
||||
|
||||
@ -759,59 +759,59 @@ differences.
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
- The image format must be selected before buffers are allocated,
|
||||
with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no
|
||||
format is selected the driver may use the last, possibly by
|
||||
another application requested format.
|
||||
with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no
|
||||
format is selected the driver may use the last, possibly by
|
||||
another application requested format.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- Applications cannot change the number of buffers. The it is built
|
||||
into the driver, unless it has a module option to change the
|
||||
number when the driver module is loaded.
|
||||
into the driver, unless it has a module option to change the
|
||||
number when the driver module is loaded.
|
||||
|
||||
- The :ref:`VIDIOC_REQBUFS` ioctl allocates the
|
||||
desired number of buffers, this is a required step in the
|
||||
initialization sequence.
|
||||
desired number of buffers, this is a required step in the
|
||||
initialization sequence.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- Drivers map all buffers as one contiguous range of memory. The
|
||||
``VIDIOCGMBUF`` ioctl is available to query the number of buffers,
|
||||
the offset of each buffer from the start of the virtual file, and
|
||||
the overall amount of memory used, which can be used as arguments
|
||||
for the :ref:`mmap() <func-mmap>` function.
|
||||
``VIDIOCGMBUF`` ioctl is available to query the number of buffers,
|
||||
the offset of each buffer from the start of the virtual file, and
|
||||
the overall amount of memory used, which can be used as arguments
|
||||
for the :ref:`mmap() <func-mmap>` function.
|
||||
|
||||
- Buffers are individually mapped. The offset and size of each
|
||||
buffer can be determined with the
|
||||
:ref:`VIDIOC_QUERYBUF` ioctl.
|
||||
buffer can be determined with the
|
||||
:ref:`VIDIOC_QUERYBUF` ioctl.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It
|
||||
also determines the image format for this buffer. The ioctl
|
||||
returns immediately, eventually with an ``EAGAIN`` error code if no
|
||||
video signal had been detected. When the driver supports more than
|
||||
one buffer applications can call the ioctl multiple times and thus
|
||||
have multiple outstanding capture requests.
|
||||
also determines the image format for this buffer. The ioctl
|
||||
returns immediately, eventually with an ``EAGAIN`` error code if no
|
||||
video signal had been detected. When the driver supports more than
|
||||
one buffer applications can call the ioctl multiple times and thus
|
||||
have multiple outstanding capture requests.
|
||||
|
||||
The ``VIDIOCSYNC`` ioctl suspends execution until a particular
|
||||
buffer has been filled.
|
||||
The ``VIDIOCSYNC`` ioctl suspends execution until a particular
|
||||
buffer has been filled.
|
||||
|
||||
- Drivers maintain an incoming and outgoing queue.
|
||||
:ref:`VIDIOC_QBUF` enqueues any empty buffer into
|
||||
the incoming queue. Filled buffers are dequeued from the outgoing
|
||||
queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
|
||||
until filled buffers become available this function,
|
||||
:ref:`select() <func-select>` or :ref:`poll() <func-poll>` can
|
||||
be used. The :ref:`VIDIOC_STREAMON` ioctl
|
||||
must be called once after enqueuing one or more buffers to start
|
||||
capturing. Its counterpart
|
||||
:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and
|
||||
dequeues all buffers from both queues. Applications can query the
|
||||
signal status, if known, with the
|
||||
:ref:`VIDIOC_ENUMINPUT` ioctl.
|
||||
:ref:`VIDIOC_QBUF` enqueues any empty buffer into
|
||||
the incoming queue. Filled buffers are dequeued from the outgoing
|
||||
queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
|
||||
until filled buffers become available this function,
|
||||
:ref:`select() <func-select>` or :ref:`poll() <func-poll>` can
|
||||
be used. The :ref:`VIDIOC_STREAMON` ioctl
|
||||
must be called once after enqueuing one or more buffers to start
|
||||
capturing. Its counterpart
|
||||
:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and
|
||||
dequeues all buffers from both queues. Applications can query the
|
||||
signal status, if known, with the
|
||||
:ref:`VIDIOC_ENUMINPUT` ioctl.
|
||||
|
||||
|
||||
For a more in-depth discussion of memory mapping and examples, see
|
||||
@ -845,7 +845,7 @@ with the following parameters:
|
||||
- sampling_rate
|
||||
|
||||
- 28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL
|
||||
and SECAM (625-line standards)
|
||||
and SECAM (625-line standards)
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -864,7 +864,7 @@ with the following parameters:
|
||||
- sample_format
|
||||
|
||||
- V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness
|
||||
integer) contain a frame counter.
|
||||
integer) contain a frame counter.
|
||||
|
||||
- .. row 6
|
||||
|
||||
|
@ -47,12 +47,12 @@ driver must be switched into DMABUF I/O mode by calling the
|
||||
reqbuf.count = 1;
|
||||
|
||||
if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) == -1) {
|
||||
if (errno == EINVAL)
|
||||
printf("Video capturing or DMABUF streaming is not supported\\n");
|
||||
else
|
||||
perror("VIDIOC_REQBUFS");
|
||||
if (errno == EINVAL)
|
||||
printf("Video capturing or DMABUF streaming is not supported\\n");
|
||||
else
|
||||
perror("VIDIOC_REQBUFS");
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
The buffer (plane) file descriptor is passed on the fly with the
|
||||
@ -66,20 +66,20 @@ a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
|
||||
|
||||
int buffer_queue(int v4lfd, int index, int dmafd)
|
||||
{
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_buffer buf;
|
||||
|
||||
memset(&buf, 0, sizeof buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_DMABUF;
|
||||
buf.index = index;
|
||||
buf.m.fd = dmafd;
|
||||
memset(&buf, 0, sizeof buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_DMABUF;
|
||||
buf.index = index;
|
||||
buf.m.fd = dmafd;
|
||||
|
||||
if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
|
||||
perror("VIDIOC_QBUF");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
|
||||
perror("VIDIOC_QBUF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -87,28 +87,28 @@ a different DMABUF descriptor at each ``VIDIOC_QBUF`` call.
|
||||
|
||||
int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes)
|
||||
{
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_plane planes[VIDEO_MAX_PLANES];
|
||||
int i;
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_plane planes[VIDEO_MAX_PLANES];
|
||||
int i;
|
||||
|
||||
memset(&buf, 0, sizeof buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
buf.memory = V4L2_MEMORY_DMABUF;
|
||||
buf.index = index;
|
||||
buf.m.planes = planes;
|
||||
buf.length = n_planes;
|
||||
memset(&buf, 0, sizeof buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
buf.memory = V4L2_MEMORY_DMABUF;
|
||||
buf.index = index;
|
||||
buf.m.planes = planes;
|
||||
buf.length = n_planes;
|
||||
|
||||
memset(&planes, 0, sizeof planes);
|
||||
memset(&planes, 0, sizeof planes);
|
||||
|
||||
for (i = 0; i < n_planes; ++i)
|
||||
buf.m.planes[i].m.fd = dmafd[i];
|
||||
for (i = 0; i < n_planes; ++i)
|
||||
buf.m.planes[i].m.fd = dmafd[i];
|
||||
|
||||
if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
|
||||
perror("VIDIOC_QBUF");
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
|
||||
perror("VIDIOC_QBUF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Captured or displayed buffers are dequeued with the
|
||||
|
@ -113,8 +113,8 @@ The recommended way to enumerate over the extended controls is by using
|
||||
|
||||
qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
while (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) {
|
||||
/* ... */
|
||||
qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
/* ... */
|
||||
qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
}
|
||||
|
||||
The initial control ID is set to 0 ORed with the
|
||||
@ -132,10 +132,10 @@ control class is found:
|
||||
|
||||
qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
|
||||
if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
|
||||
break;
|
||||
/* ... */
|
||||
qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
|
||||
break;
|
||||
/* ... */
|
||||
qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
|
||||
}
|
||||
|
||||
The 32-bit ``qctrl.id`` value is subdivided into three bit ranges: the
|
||||
@ -302,8 +302,8 @@ Codec Control IDs
|
||||
- ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
|
||||
|
||||
- VBI in private packets, IVTV format (documented in the kernel
|
||||
sources in the file
|
||||
``Documentation/video4linux/cx2341x/README.vbi``)
|
||||
sources in the file
|
||||
``Documentation/video4linux/cx2341x/README.vbi``)
|
||||
|
||||
|
||||
|
||||
@ -1650,7 +1650,7 @@ Codec Control IDs
|
||||
|
||||
- ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY``
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
|
||||
@ -1929,7 +1929,7 @@ Codec Control IDs
|
||||
- ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
|
||||
|
||||
- The stream header is returned together with the first encoded
|
||||
frame.
|
||||
frame.
|
||||
|
||||
|
||||
|
||||
@ -2035,14 +2035,14 @@ Codec Control IDs
|
||||
- ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
|
||||
|
||||
- Slices are interleaved one after other with macroblocks in run
|
||||
length order.
|
||||
length order.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
|
||||
|
||||
- Scatters the macroblocks based on a mathematical function known to
|
||||
both encoder and decoder.
|
||||
both encoder and decoder.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -2340,14 +2340,14 @@ MFC 5.1 Control IDs
|
||||
- ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
|
||||
|
||||
- Frame skip mode enabled and buffer limit is set by the chosen
|
||||
level and is defined by the standard.
|
||||
level and is defined by the standard.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
|
||||
|
||||
- Frame skip mode enabled and buffer limit is set by the VBV
|
||||
(MPEG1/2/4) or CPB (H264) buffer size control.
|
||||
(MPEG1/2/4) or CPB (H264) buffer size control.
|
||||
|
||||
|
||||
|
||||
@ -2690,15 +2690,15 @@ VPX Control IDs
|
||||
- ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
|
||||
|
||||
- Two frames will be searched among the last encoded frame, the
|
||||
golden frame and the alternate reference (altref) frame. The
|
||||
encoder implementation will decide which two are chosen.
|
||||
golden frame and the alternate reference (altref) frame. The
|
||||
encoder implementation will decide which two are chosen.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
|
||||
|
||||
- The last encoded frame, the golden frame and the altref frame will
|
||||
be searched.
|
||||
be searched.
|
||||
|
||||
|
||||
|
||||
@ -2736,15 +2736,15 @@ VPX Control IDs
|
||||
- ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
|
||||
|
||||
- Use the (n-2)th frame as a golden frame, current frame index being
|
||||
'n'.
|
||||
'n'.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
|
||||
|
||||
- Use the previous specific frame indicated by
|
||||
V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a
|
||||
golden frame.
|
||||
V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a
|
||||
golden frame.
|
||||
|
||||
|
||||
|
||||
@ -2867,14 +2867,14 @@ Camera Control IDs
|
||||
- ``V4L2_EXPOSURE_METERING_AVERAGE``
|
||||
|
||||
- Use the light information coming from the entire frame and average
|
||||
giving no weighting to any particular portion of the metered area.
|
||||
giving no weighting to any particular portion of the metered area.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
|
||||
|
||||
- Average the light information coming from the entire frame giving
|
||||
priority to the center of the metered area.
|
||||
priority to the center of the metered area.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -2887,9 +2887,9 @@ Camera Control IDs
|
||||
- ``V4L2_EXPOSURE_METERING_MATRIX``
|
||||
|
||||
- A multi-zone metering. The light intensity is measured in several
|
||||
points of the frame and the results are combined. The algorithm of
|
||||
the zones selection and their significance in calculating the
|
||||
final value is device dependent.
|
||||
points of the frame and the results are combined. The algorithm of
|
||||
the zones selection and their significance in calculating the
|
||||
final value is device dependent.
|
||||
|
||||
|
||||
|
||||
@ -2993,7 +2993,7 @@ Camera Control IDs
|
||||
- ``V4L2_AUTO_FOCUS_STATUS_FAILED``
|
||||
|
||||
- Automatic focus has failed, the driver will not transition from
|
||||
this state until another action is performed by an application.
|
||||
this state until another action is performed by an application.
|
||||
|
||||
|
||||
|
||||
@ -3020,14 +3020,14 @@ Camera Control IDs
|
||||
- ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
|
||||
|
||||
- Normal distance range, limited for best automatic focus
|
||||
performance.
|
||||
performance.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_AUTO_FOCUS_RANGE_MACRO``
|
||||
|
||||
- Macro (close-up) auto focus. The camera will use its minimum
|
||||
possible distance for auto focus.
|
||||
possible distance for auto focus.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -3114,59 +3114,59 @@ Camera Control IDs
|
||||
- ``V4L2_WHITE_BALANCE_INCANDESCENT``
|
||||
|
||||
- White balance setting for incandescent (tungsten) lighting. It
|
||||
generally cools down the colors and corresponds approximately to
|
||||
2500...3500 K color temperature range.
|
||||
generally cools down the colors and corresponds approximately to
|
||||
2500...3500 K color temperature range.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_FLUORESCENT``
|
||||
|
||||
- White balance preset for fluorescent lighting. It corresponds
|
||||
approximately to 4000...5000 K color temperature.
|
||||
approximately to 4000...5000 K color temperature.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
|
||||
|
||||
- With this setting the camera will compensate for fluorescent H
|
||||
lighting.
|
||||
lighting.
|
||||
|
||||
- .. row 6
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_HORIZON``
|
||||
|
||||
- White balance setting for horizon daylight. It corresponds
|
||||
approximately to 5000 K color temperature.
|
||||
approximately to 5000 K color temperature.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_DAYLIGHT``
|
||||
|
||||
- White balance preset for daylight (with clear sky). It corresponds
|
||||
approximately to 5000...6500 K color temperature.
|
||||
approximately to 5000...6500 K color temperature.
|
||||
|
||||
- .. row 8
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_FLASH``
|
||||
|
||||
- With this setting the camera will compensate for the flash light.
|
||||
It slightly warms up the colors and corresponds roughly to
|
||||
5000...5500 K color temperature.
|
||||
It slightly warms up the colors and corresponds roughly to
|
||||
5000...5500 K color temperature.
|
||||
|
||||
- .. row 9
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_CLOUDY``
|
||||
|
||||
- White balance preset for moderately overcast sky. This option
|
||||
corresponds approximately to 6500...8000 K color temperature
|
||||
range.
|
||||
corresponds approximately to 6500...8000 K color temperature
|
||||
range.
|
||||
|
||||
- .. row 10
|
||||
|
||||
- ``V4L2_WHITE_BALANCE_SHADE``
|
||||
|
||||
- White balance preset for shade or heavily overcast sky. It
|
||||
corresponds approximately to 9000...10000 K color temperature.
|
||||
corresponds approximately to 9000...10000 K color temperature.
|
||||
|
||||
|
||||
|
||||
@ -3256,115 +3256,115 @@ Camera Control IDs
|
||||
- ``V4L2_SCENE_MODE_BACKLIGHT``
|
||||
|
||||
- Backlight. Compensates for dark shadows when light is coming from
|
||||
behind a subject, also by automatically turning on the flash.
|
||||
behind a subject, also by automatically turning on the flash.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_SCENE_MODE_BEACH_SNOW``
|
||||
|
||||
- Beach and snow. This mode compensates for all-white or bright
|
||||
scenes, which tend to look gray and low contrast, when camera's
|
||||
automatic exposure is based on an average scene brightness. To
|
||||
compensate, this mode automatically slightly overexposes the
|
||||
frames. The white balance may also be adjusted to compensate for
|
||||
the fact that reflected snow looks bluish rather than white.
|
||||
scenes, which tend to look gray and low contrast, when camera's
|
||||
automatic exposure is based on an average scene brightness. To
|
||||
compensate, this mode automatically slightly overexposes the
|
||||
frames. The white balance may also be adjusted to compensate for
|
||||
the fact that reflected snow looks bluish rather than white.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_SCENE_MODE_CANDLELIGHT``
|
||||
|
||||
- Candle light. The camera generally raises the ISO sensitivity and
|
||||
lowers the shutter speed. This mode compensates for relatively
|
||||
close subject in the scene. The flash is disabled in order to
|
||||
preserve the ambiance of the light.
|
||||
lowers the shutter speed. This mode compensates for relatively
|
||||
close subject in the scene. The flash is disabled in order to
|
||||
preserve the ambiance of the light.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_SCENE_MODE_DAWN_DUSK``
|
||||
|
||||
- Dawn and dusk. Preserves the colors seen in low natural light
|
||||
before dusk and after down. The camera may turn off the flash, and
|
||||
automatically focus at infinity. It will usually boost saturation
|
||||
and lower the shutter speed.
|
||||
before dusk and after down. The camera may turn off the flash, and
|
||||
automatically focus at infinity. It will usually boost saturation
|
||||
and lower the shutter speed.
|
||||
|
||||
- .. row 6
|
||||
|
||||
- ``V4L2_SCENE_MODE_FALL_COLORS``
|
||||
|
||||
- Fall colors. Increases saturation and adjusts white balance for
|
||||
color enhancement. Pictures of autumn leaves get saturated reds
|
||||
and yellows.
|
||||
color enhancement. Pictures of autumn leaves get saturated reds
|
||||
and yellows.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- ``V4L2_SCENE_MODE_FIREWORKS``
|
||||
|
||||
- Fireworks. Long exposure times are used to capture the expanding
|
||||
burst of light from a firework. The camera may invoke image
|
||||
stabilization.
|
||||
burst of light from a firework. The camera may invoke image
|
||||
stabilization.
|
||||
|
||||
- .. row 8
|
||||
|
||||
- ``V4L2_SCENE_MODE_LANDSCAPE``
|
||||
|
||||
- Landscape. The camera may choose a small aperture to provide deep
|
||||
depth of field and long exposure duration to help capture detail
|
||||
in dim light conditions. The focus is fixed at infinity. Suitable
|
||||
for distant and wide scenery.
|
||||
depth of field and long exposure duration to help capture detail
|
||||
in dim light conditions. The focus is fixed at infinity. Suitable
|
||||
for distant and wide scenery.
|
||||
|
||||
- .. row 9
|
||||
|
||||
- ``V4L2_SCENE_MODE_NIGHT``
|
||||
|
||||
- Night, also known as Night Landscape. Designed for low light
|
||||
conditions, it preserves detail in the dark areas without blowing
|
||||
out bright objects. The camera generally sets itself to a
|
||||
medium-to-high ISO sensitivity, with a relatively long exposure
|
||||
time, and turns flash off. As such, there will be increased image
|
||||
noise and the possibility of blurred image.
|
||||
conditions, it preserves detail in the dark areas without blowing
|
||||
out bright objects. The camera generally sets itself to a
|
||||
medium-to-high ISO sensitivity, with a relatively long exposure
|
||||
time, and turns flash off. As such, there will be increased image
|
||||
noise and the possibility of blurred image.
|
||||
|
||||
- .. row 10
|
||||
|
||||
- ``V4L2_SCENE_MODE_PARTY_INDOOR``
|
||||
|
||||
- Party and indoor. Designed to capture indoor scenes that are lit
|
||||
by indoor background lighting as well as the flash. The camera
|
||||
usually increases ISO sensitivity, and adjusts exposure for the
|
||||
low light conditions.
|
||||
by indoor background lighting as well as the flash. The camera
|
||||
usually increases ISO sensitivity, and adjusts exposure for the
|
||||
low light conditions.
|
||||
|
||||
- .. row 11
|
||||
|
||||
- ``V4L2_SCENE_MODE_PORTRAIT``
|
||||
|
||||
- Portrait. The camera adjusts the aperture so that the depth of
|
||||
field is reduced, which helps to isolate the subject against a
|
||||
smooth background. Most cameras recognize the presence of faces in
|
||||
the scene and focus on them. The color hue is adjusted to enhance
|
||||
skin tones. The intensity of the flash is often reduced.
|
||||
field is reduced, which helps to isolate the subject against a
|
||||
smooth background. Most cameras recognize the presence of faces in
|
||||
the scene and focus on them. The color hue is adjusted to enhance
|
||||
skin tones. The intensity of the flash is often reduced.
|
||||
|
||||
- .. row 12
|
||||
|
||||
- ``V4L2_SCENE_MODE_SPORTS``
|
||||
|
||||
- Sports. Significantly increases ISO and uses a fast shutter speed
|
||||
to freeze motion of rapidly-moving subjects. Increased image noise
|
||||
may be seen in this mode.
|
||||
to freeze motion of rapidly-moving subjects. Increased image noise
|
||||
may be seen in this mode.
|
||||
|
||||
- .. row 13
|
||||
|
||||
- ``V4L2_SCENE_MODE_SUNSET``
|
||||
|
||||
- Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
|
||||
up the saturation.
|
||||
up the saturation.
|
||||
|
||||
- .. row 14
|
||||
|
||||
- ``V4L2_SCENE_MODE_TEXT``
|
||||
|
||||
- Text. It applies extra contrast and sharpness, it is typically a
|
||||
black-and-white mode optimized for readability. Automatic focus
|
||||
may be switched to close-up mode and this setting may also involve
|
||||
some lens-distortion correction.
|
||||
black-and-white mode optimized for readability. Automatic focus
|
||||
may be switched to close-up mode and this setting may also involve
|
||||
some lens-distortion correction.
|
||||
|
||||
|
||||
|
||||
@ -3715,15 +3715,15 @@ Flash Control IDs
|
||||
- ``V4L2_FLASH_STROBE_SOURCE_SOFTWARE``
|
||||
|
||||
- The flash strobe is triggered by using the
|
||||
V4L2_CID_FLASH_STROBE control.
|
||||
V4L2_CID_FLASH_STROBE control.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL``
|
||||
|
||||
- The flash strobe is triggered by an external source. Typically
|
||||
this is a sensor, which makes it possible to synchronises the
|
||||
flash strobe start to exposure start.
|
||||
this is a sensor, which makes it possible to synchronises the
|
||||
flash strobe start to exposure start.
|
||||
|
||||
|
||||
|
||||
@ -3782,15 +3782,15 @@ Flash Control IDs
|
||||
- ``V4L2_FLASH_FAULT_OVER_VOLTAGE``
|
||||
|
||||
- Flash controller voltage to the flash LED has exceeded the limit
|
||||
specific to the flash controller.
|
||||
specific to the flash controller.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_FLASH_FAULT_TIMEOUT``
|
||||
|
||||
- The flash strobe was still on when the timeout set by the user ---
|
||||
V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash
|
||||
controllers may set this in all such conditions.
|
||||
V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash
|
||||
controllers may set this in all such conditions.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -3803,36 +3803,36 @@ Flash Control IDs
|
||||
- ``V4L2_FLASH_FAULT_SHORT_CIRCUIT``
|
||||
|
||||
- The short circuit protection of the flash controller has been
|
||||
triggered.
|
||||
triggered.
|
||||
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_FLASH_FAULT_OVER_CURRENT``
|
||||
|
||||
- Current in the LED power supply has exceeded the limit specific to
|
||||
the flash controller.
|
||||
the flash controller.
|
||||
|
||||
- .. row 6
|
||||
|
||||
- ``V4L2_FLASH_FAULT_INDICATOR``
|
||||
|
||||
- The flash controller has detected a short or open circuit
|
||||
condition on the indicator LED.
|
||||
condition on the indicator LED.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- ``V4L2_FLASH_FAULT_UNDER_VOLTAGE``
|
||||
|
||||
- Flash controller voltage to the flash LED has been below the
|
||||
minimum limit specific to the flash controller.
|
||||
minimum limit specific to the flash controller.
|
||||
|
||||
- .. row 8
|
||||
|
||||
- ``V4L2_FLASH_FAULT_INPUT_VOLTAGE``
|
||||
|
||||
- The input voltage of the flash controller is below the limit under
|
||||
which strobing the flash at full current will not be possible.The
|
||||
condition persists until this flag is no longer set.
|
||||
which strobing the flash at full current will not be possible.The
|
||||
condition persists until this flag is no longer set.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -4193,15 +4193,15 @@ Digital Video Control IDs
|
||||
- ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS``
|
||||
|
||||
- Graphics content. Pixel data should be passed unfiltered and
|
||||
without analog reconstruction.
|
||||
without analog reconstruction.
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_DV_IT_CONTENT_TYPE_PHOTO``
|
||||
|
||||
- Photo content. The content is derived from digital still pictures.
|
||||
The content should be passed through with minimal scaling and
|
||||
picture enhancements.
|
||||
The content should be passed through with minimal scaling and
|
||||
picture enhancements.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -4220,7 +4220,7 @@ Digital Video Control IDs
|
||||
- ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC``
|
||||
|
||||
- No IT Content information is available and the ITC bit in the AVI
|
||||
InfoFrame is set to 0.
|
||||
InfoFrame is set to 0.
|
||||
|
||||
|
||||
|
||||
@ -4399,19 +4399,19 @@ Detect Control IDs
|
||||
- ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
|
||||
|
||||
- The image is divided into a grid, each cell with its own motion
|
||||
detection threshold. These thresholds are set through the
|
||||
``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
|
||||
detection threshold. These thresholds are set through the
|
||||
``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_DETECT_MD_MODE_REGION_GRID``
|
||||
|
||||
- The image is divided into a grid, each cell with its own region
|
||||
value that specifies which per-region motion detection thresholds
|
||||
should be used. Each region has its own thresholds. How these
|
||||
per-region thresholds are set up is driver-specific. The region
|
||||
values for the grid are set through the
|
||||
``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
|
||||
value that specifies which per-region motion detection thresholds
|
||||
should be used. Each region has its own thresholds. How these
|
||||
per-region thresholds are set up is driver-specific. The region
|
||||
values for the grid are set through the
|
||||
``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
|
||||
|
||||
|
||||
|
||||
|
@ -67,16 +67,16 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 0
|
||||
|
||||
- Applications request this field order when any one of the
|
||||
``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or
|
||||
``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose
|
||||
depending on hardware capabilities or e. g. the requested image
|
||||
size, and return the actual field order. Drivers must never return
|
||||
``V4L2_FIELD_ANY``. If multiple field orders are possible the
|
||||
driver must choose one of the possible field orders during
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
|
||||
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be
|
||||
``V4L2_FIELD_ANY``.
|
||||
``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or
|
||||
``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose
|
||||
depending on hardware capabilities or e. g. the requested image
|
||||
size, and return the actual field order. Drivers must never return
|
||||
``V4L2_FIELD_ANY``. If multiple field orders are possible the
|
||||
driver must choose one of the possible field orders during
|
||||
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
|
||||
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be
|
||||
``V4L2_FIELD_ANY``.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -85,8 +85,8 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 1
|
||||
|
||||
- Images are in progressive format, not interlaced. The driver may
|
||||
also indicate this order when it cannot distinguish between
|
||||
``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``.
|
||||
also indicate this order when it cannot distinguish between
|
||||
``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -103,9 +103,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 3
|
||||
|
||||
- Images consist of the bottom (aka even) field only. Applications
|
||||
may wish to prevent a device from capturing interlaced images
|
||||
because they will have "comb" or "feathering" artefacts around
|
||||
moving objects.
|
||||
may wish to prevent a device from capturing interlaced images
|
||||
because they will have "comb" or "feathering" artefacts around
|
||||
moving objects.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -114,10 +114,10 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 4
|
||||
|
||||
- Images contain both fields, interleaved line by line. The temporal
|
||||
order of the fields (whether the top or bottom field is first
|
||||
transmitted) depends on the current video standard. M/NTSC
|
||||
transmits the bottom field first, all other standards the top
|
||||
field first.
|
||||
order of the fields (whether the top or bottom field is first
|
||||
transmitted) depends on the current video standard. M/NTSC
|
||||
transmits the bottom field first, all other standards the top
|
||||
field first.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -126,9 +126,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 5
|
||||
|
||||
- Images contain both fields, the top field lines are stored first
|
||||
in memory, immediately followed by the bottom field lines. Fields
|
||||
are always stored in temporal order, the older one first in
|
||||
memory. Image sizes refer to the frame, not fields.
|
||||
in memory, immediately followed by the bottom field lines. Fields
|
||||
are always stored in temporal order, the older one first in
|
||||
memory. Image sizes refer to the frame, not fields.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -137,9 +137,9 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 6
|
||||
|
||||
- Images contain both fields, the bottom field lines are stored
|
||||
first in memory, immediately followed by the top field lines.
|
||||
Fields are always stored in temporal order, the older one first in
|
||||
memory. Image sizes refer to the frame, not fields.
|
||||
first in memory, immediately followed by the top field lines.
|
||||
Fields are always stored in temporal order, the older one first in
|
||||
memory. Image sizes refer to the frame, not fields.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -148,18 +148,18 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 7
|
||||
|
||||
- The two fields of a frame are passed in separate buffers, in
|
||||
temporal order, i. e. the older one first. To indicate the field
|
||||
parity (whether the current field is a top or bottom field) the
|
||||
driver or application, depending on data direction, must set
|
||||
struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to
|
||||
``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive
|
||||
fields pair to build a frame. If fields are successive, without
|
||||
any dropped fields between them (fields can drop individually),
|
||||
can be determined from the struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This
|
||||
format cannot be selected when using the read/write I/O method
|
||||
since there is no way to communicate if a field was a top or
|
||||
bottom field.
|
||||
temporal order, i. e. the older one first. To indicate the field
|
||||
parity (whether the current field is a top or bottom field) the
|
||||
driver or application, depending on data direction, must set
|
||||
struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to
|
||||
``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive
|
||||
fields pair to build a frame. If fields are successive, without
|
||||
any dropped fields between them (fields can drop individually),
|
||||
can be determined from the struct
|
||||
:ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This
|
||||
format cannot be selected when using the read/write I/O method
|
||||
since there is no way to communicate if a field was a top or
|
||||
bottom field.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -168,7 +168,7 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 8
|
||||
|
||||
- Images contain both fields, interleaved line by line, top field
|
||||
first. The top field is transmitted first.
|
||||
first. The top field is transmitted first.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -177,7 +177,7 @@ should have the value ``V4L2_FIELD_ANY`` (0).
|
||||
- 9
|
||||
|
||||
- Images contain both fields, interleaved line by line, top field
|
||||
first. The bottom field is transmitted first.
|
||||
first. The bottom field is transmitted first.
|
||||
|
||||
|
||||
|
||||
|
@ -444,93 +444,93 @@ This unnamed version was finally merged into Linux 2.5.46.
|
||||
|
||||
|
||||
.. flat-table::
|
||||
:header-rows: 1
|
||||
:stub-columns: 0
|
||||
:header-rows: 1
|
||||
:stub-columns: 0
|
||||
|
||||
|
||||
- .. row 1
|
||||
- .. row 1
|
||||
|
||||
- Old defines
|
||||
- Old defines
|
||||
|
||||
- enum :ref:`v4l2_buf_type <v4l2-buf-type>`
|
||||
- enum :ref:`v4l2_buf_type <v4l2-buf-type>`
|
||||
|
||||
- .. row 2
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_BUF_TYPE_CAPTURE``
|
||||
- ``V4L2_BUF_TYPE_CAPTURE``
|
||||
|
||||
- ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
|
||||
- ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
|
||||
|
||||
- .. row 3
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_BUF_TYPE_CODECIN``
|
||||
- ``V4L2_BUF_TYPE_CODECIN``
|
||||
|
||||
- Omitted for now
|
||||
- Omitted for now
|
||||
|
||||
- .. row 4
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_BUF_TYPE_CODECOUT``
|
||||
- ``V4L2_BUF_TYPE_CODECOUT``
|
||||
|
||||
- Omitted for now
|
||||
- Omitted for now
|
||||
|
||||
- .. row 5
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_BUF_TYPE_EFFECTSIN``
|
||||
- ``V4L2_BUF_TYPE_EFFECTSIN``
|
||||
|
||||
- Omitted for now
|
||||
- Omitted for now
|
||||
|
||||
- .. row 6
|
||||
- .. row 6
|
||||
|
||||
- ``V4L2_BUF_TYPE_EFFECTSIN2``
|
||||
- ``V4L2_BUF_TYPE_EFFECTSIN2``
|
||||
|
||||
- Omitted for now
|
||||
- Omitted for now
|
||||
|
||||
- .. row 7
|
||||
- .. row 7
|
||||
|
||||
- ``V4L2_BUF_TYPE_EFFECTSOUT``
|
||||
- ``V4L2_BUF_TYPE_EFFECTSOUT``
|
||||
|
||||
- Omitted for now
|
||||
- Omitted for now
|
||||
|
||||
- .. row 8
|
||||
- .. row 8
|
||||
|
||||
- ``V4L2_BUF_TYPE_VIDEOOUT``
|
||||
- ``V4L2_BUF_TYPE_VIDEOOUT``
|
||||
|
||||
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
|
||||
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
|
||||
|
||||
- .. row 9
|
||||
- .. row 9
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
|
||||
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
|
||||
|
||||
- .. row 10
|
||||
- .. row 10
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_BUF_TYPE_VBI_CAPTURE``
|
||||
- ``V4L2_BUF_TYPE_VBI_CAPTURE``
|
||||
|
||||
- .. row 11
|
||||
- .. row 11
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_BUF_TYPE_VBI_OUTPUT``
|
||||
- ``V4L2_BUF_TYPE_VBI_OUTPUT``
|
||||
|
||||
- .. row 12
|
||||
- .. row 12
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
|
||||
- ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
|
||||
|
||||
- .. row 13
|
||||
- .. row 13
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
|
||||
- ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
|
||||
|
||||
- .. row 14
|
||||
- .. row 14
|
||||
|
||||
- ``V4L2_BUF_TYPE_PRIVATE_BASE``
|
||||
- ``V4L2_BUF_TYPE_PRIVATE_BASE``
|
||||
|
||||
- ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
|
||||
- ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
|
||||
|
||||
|
||||
10. In struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` a enum
|
||||
@ -561,57 +561,57 @@ This unnamed version was finally merged into Linux 2.5.46.
|
||||
|
||||
|
||||
.. flat-table::
|
||||
:header-rows: 1
|
||||
:stub-columns: 0
|
||||
:header-rows: 1
|
||||
:stub-columns: 0
|
||||
|
||||
|
||||
- .. row 1
|
||||
- .. row 1
|
||||
|
||||
- Old flag
|
||||
- Old flag
|
||||
|
||||
- enum :ref:`v4l2_field <v4l2-field>`
|
||||
- enum :ref:`v4l2_field <v4l2-field>`
|
||||
|
||||
- .. row 2
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_FMT_FLAG_NOT_INTERLACED``
|
||||
- ``V4L2_FMT_FLAG_NOT_INTERLACED``
|
||||
|
||||
- ?
|
||||
- ?
|
||||
|
||||
- .. row 3
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
|
||||
- ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
|
||||
|
||||
- ``V4L2_FIELD_INTERLACED``
|
||||
- ``V4L2_FIELD_INTERLACED``
|
||||
|
||||
- .. row 4
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
|
||||
- ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
|
||||
|
||||
- ``V4L2_FIELD_TOP``
|
||||
- ``V4L2_FIELD_TOP``
|
||||
|
||||
- .. row 5
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
|
||||
- ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
|
||||
|
||||
- ``V4L2_FIELD_BOTTOM``
|
||||
- ``V4L2_FIELD_BOTTOM``
|
||||
|
||||
- .. row 6
|
||||
- .. row 6
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_FIELD_SEQ_TB``
|
||||
- ``V4L2_FIELD_SEQ_TB``
|
||||
|
||||
- .. row 7
|
||||
- .. row 7
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_FIELD_SEQ_BT``
|
||||
- ``V4L2_FIELD_SEQ_BT``
|
||||
|
||||
- .. row 8
|
||||
- .. row 8
|
||||
|
||||
- ``-``
|
||||
- ``-``
|
||||
|
||||
- ``V4L2_FIELD_ALTERNATE``
|
||||
- ``V4L2_FIELD_ALTERNATE``
|
||||
|
||||
|
||||
The color space flags were replaced by a enum
|
||||
@ -771,43 +771,43 @@ V4L2 2003-11-05
|
||||
|
||||
- .. row 1
|
||||
|
||||
- Symbol
|
||||
- Symbol
|
||||
|
||||
- In this document prior to revision 0.5
|
||||
- In this document prior to revision 0.5
|
||||
|
||||
- Corrected
|
||||
- Corrected
|
||||
|
||||
- .. row 2
|
||||
|
||||
- ``V4L2_PIX_FMT_RGB24``
|
||||
- ``V4L2_PIX_FMT_RGB24``
|
||||
|
||||
- B, G, R
|
||||
- B, G, R
|
||||
|
||||
- R, G, B
|
||||
- R, G, B
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_PIX_FMT_BGR24``
|
||||
- ``V4L2_PIX_FMT_BGR24``
|
||||
|
||||
- R, G, B
|
||||
- R, G, B
|
||||
|
||||
- B, G, R
|
||||
- B, G, R
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_PIX_FMT_RGB32``
|
||||
- ``V4L2_PIX_FMT_RGB32``
|
||||
|
||||
- B, G, R, X
|
||||
- B, G, R, X
|
||||
|
||||
- R, G, B, X
|
||||
- R, G, B, X
|
||||
|
||||
- .. row 5
|
||||
|
||||
- ``V4L2_PIX_FMT_BGR32``
|
||||
- ``V4L2_PIX_FMT_BGR32``
|
||||
|
||||
- R, G, B, X
|
||||
- R, G, B, X
|
||||
|
||||
- B, G, R, X
|
||||
- B, G, R, X
|
||||
|
||||
|
||||
The ``V4L2_PIX_FMT_BGR24`` example was always correct.
|
||||
@ -1411,7 +1411,7 @@ lines:
|
||||
::
|
||||
|
||||
Section "Module"
|
||||
Load "v4l"
|
||||
Load "v4l"
|
||||
EndSection
|
||||
|
||||
As of XFree86 4.2 this driver still supports only V4L ioctls, however it
|
||||
|
@ -28,20 +28,20 @@ Single-planar format structure
|
||||
- ``height``
|
||||
|
||||
- Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
|
||||
``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
|
||||
refers to the number of lines in the field, otherwise it refers to
|
||||
the number of lines in the frame (which is twice the field height
|
||||
for interlaced formats).
|
||||
``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
|
||||
refers to the number of lines in the field, otherwise it refers to
|
||||
the number of lines in the frame (which is twice the field height
|
||||
for interlaced formats).
|
||||
|
||||
- .. row 3
|
||||
|
||||
- :cspan:`2` Applications set these fields to request an image
|
||||
size, drivers return the closest possible values. In case of
|
||||
planar formats the ``width`` and ``height`` applies to the largest
|
||||
plane. To avoid ambiguities drivers must return values rounded up
|
||||
to a multiple of the scale factor of any smaller planes. For
|
||||
example when the image format is YUV 4:2:0, ``width`` and
|
||||
``height`` must be multiples of two.
|
||||
size, drivers return the closest possible values. In case of
|
||||
planar formats the ``width`` and ``height`` applies to the largest
|
||||
plane. To avoid ambiguities drivers must return values rounded up
|
||||
to a multiple of the scale factor of any smaller planes. For
|
||||
example when the image format is YUV 4:2:0, ``width`` and
|
||||
``height`` must be multiples of two.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -50,11 +50,11 @@ Single-planar format structure
|
||||
- ``pixelformat``
|
||||
|
||||
- The pixel format or type of compression, set by the application.
|
||||
This is a little endian
|
||||
:ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
|
||||
RGB formats in :ref:`rgb-formats`, YUV formats in
|
||||
:ref:`yuv-formats`, and reserved codes in
|
||||
:ref:`reserved-formats`
|
||||
This is a little endian
|
||||
:ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
|
||||
RGB formats in :ref:`rgb-formats`, YUV formats in
|
||||
:ref:`yuv-formats`, and reserved codes in
|
||||
:ref:`reserved-formats`
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -63,10 +63,10 @@ Single-planar format structure
|
||||
- ``field``
|
||||
|
||||
- Video images are typically interlaced. Applications can request to
|
||||
capture or output only the top or bottom field, or both fields
|
||||
interlaced or sequentially stored in one buffer or alternating in
|
||||
separate buffers. Drivers return the actual field order selected.
|
||||
For more details on fields see :ref:`field-order`.
|
||||
capture or output only the top or bottom field, or both fields
|
||||
interlaced or sequentially stored in one buffer or alternating in
|
||||
separate buffers. Drivers return the actual field order selected.
|
||||
For more details on fields see :ref:`field-order`.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -75,35 +75,35 @@ Single-planar format structure
|
||||
- ``bytesperline``
|
||||
|
||||
- Distance in bytes between the leftmost pixels in two adjacent
|
||||
lines.
|
||||
lines.
|
||||
|
||||
- .. row 7
|
||||
|
||||
- :cspan:`2`
|
||||
|
||||
Both applications and drivers can set this field to request
|
||||
padding bytes at the end of each line. Drivers however may ignore
|
||||
the value requested by the application, returning ``width`` times
|
||||
bytes per pixel or a larger value required by the hardware. That
|
||||
implies applications can just set this field to zero to get a
|
||||
reasonable default.
|
||||
Both applications and drivers can set this field to request
|
||||
padding bytes at the end of each line. Drivers however may ignore
|
||||
the value requested by the application, returning ``width`` times
|
||||
bytes per pixel or a larger value required by the hardware. That
|
||||
implies applications can just set this field to zero to get a
|
||||
reasonable default.
|
||||
|
||||
Video hardware may access padding bytes, therefore they must
|
||||
reside in accessible memory. Consider cases where padding bytes
|
||||
after the last line of an image cross a system page boundary.
|
||||
Input devices may write padding bytes, the value is undefined.
|
||||
Output devices ignore the contents of padding bytes.
|
||||
Video hardware may access padding bytes, therefore they must
|
||||
reside in accessible memory. Consider cases where padding bytes
|
||||
after the last line of an image cross a system page boundary.
|
||||
Input devices may write padding bytes, the value is undefined.
|
||||
Output devices ignore the contents of padding bytes.
|
||||
|
||||
When the image format is planar the ``bytesperline`` value applies
|
||||
to the first plane and is divided by the same factor as the
|
||||
``width`` field for the other planes. For example the Cb and Cr
|
||||
planes of a YUV 4:2:0 image have half as many padding bytes
|
||||
following each line as the Y plane. To avoid ambiguities drivers
|
||||
must return a ``bytesperline`` value rounded up to a multiple of
|
||||
the scale factor.
|
||||
When the image format is planar the ``bytesperline`` value applies
|
||||
to the first plane and is divided by the same factor as the
|
||||
``width`` field for the other planes. For example the Cb and Cr
|
||||
planes of a YUV 4:2:0 image have half as many padding bytes
|
||||
following each line as the Y plane. To avoid ambiguities drivers
|
||||
must return a ``bytesperline`` value rounded up to a multiple of
|
||||
the scale factor.
|
||||
|
||||
For compressed formats the ``bytesperline`` value makes no sense.
|
||||
Applications and drivers must set this to 0 in that case.
|
||||
For compressed formats the ``bytesperline`` value makes no sense.
|
||||
Applications and drivers must set this to 0 in that case.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -112,9 +112,9 @@ Single-planar format structure
|
||||
- ``sizeimage``
|
||||
|
||||
- Size in bytes of the buffer to hold a complete image, set by the
|
||||
driver. Usually this is ``bytesperline`` times ``height``. When
|
||||
the image consists of variable length compressed data this is the
|
||||
maximum number of bytes required to hold an image.
|
||||
driver. Usually this is ``bytesperline`` times ``height``. When
|
||||
the image consists of variable length compressed data this is the
|
||||
maximum number of bytes required to hold an image.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -123,8 +123,8 @@ Single-planar format structure
|
||||
- ``colorspace``
|
||||
|
||||
- This information supplements the ``pixelformat`` and must be set
|
||||
by the driver for capture streams and by the application for
|
||||
output streams, see :ref:`colorspaces`.
|
||||
by the driver for capture streams and by the application for
|
||||
output streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -133,29 +133,29 @@ Single-planar format structure
|
||||
- ``priv``
|
||||
|
||||
- This field indicates whether the remaining fields of the
|
||||
:ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the
|
||||
extended fields, are valid. When set to
|
||||
``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields
|
||||
have been correctly initialized. When set to any other value it
|
||||
indicates that the extended fields contain undefined values.
|
||||
:ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the
|
||||
extended fields, are valid. When set to
|
||||
``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields
|
||||
have been correctly initialized. When set to any other value it
|
||||
indicates that the extended fields contain undefined values.
|
||||
|
||||
Applications that wish to use the pixel format extended fields
|
||||
must first ensure that the feature is supported by querying the
|
||||
device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>`
|
||||
capability. If the capability isn't set the pixel format extended
|
||||
fields are not supported and using the extended fields will lead
|
||||
to undefined results.
|
||||
Applications that wish to use the pixel format extended fields
|
||||
must first ensure that the feature is supported by querying the
|
||||
device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>`
|
||||
capability. If the capability isn't set the pixel format extended
|
||||
fields are not supported and using the extended fields will lead
|
||||
to undefined results.
|
||||
|
||||
To use the extended fields, applications must set the ``priv``
|
||||
field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended
|
||||
fields and zero the unused bytes of the
|
||||
:ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field.
|
||||
To use the extended fields, applications must set the ``priv``
|
||||
field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended
|
||||
fields and zero the unused bytes of the
|
||||
:ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field.
|
||||
|
||||
When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC``
|
||||
drivers must act as if all the extended fields were set to zero.
|
||||
On return drivers must set the ``priv`` field to
|
||||
``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to
|
||||
applicable values.
|
||||
When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC``
|
||||
drivers must act as if all the extended fields were set to zero.
|
||||
On return drivers must set the ``priv`` field to
|
||||
``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to
|
||||
applicable values.
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -172,8 +172,8 @@ Single-planar format structure
|
||||
- ``ycbcr_enc``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 13
|
||||
|
||||
@ -182,8 +182,8 @@ Single-planar format structure
|
||||
- ``quantization``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 14
|
||||
|
||||
@ -192,5 +192,5 @@ Single-planar format structure
|
||||
- ``xfer_func``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
@ -35,7 +35,7 @@ describing all planes of that format.
|
||||
- ``bytesperline``
|
||||
|
||||
- Distance in bytes between the leftmost pixels in two adjacent
|
||||
lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -44,7 +44,7 @@ describing all planes of that format.
|
||||
- ``reserved[6]``
|
||||
|
||||
- Reserved for future extensions. Should be zeroed by drivers and
|
||||
applications.
|
||||
applications.
|
||||
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ describing all planes of that format.
|
||||
- ``width``
|
||||
|
||||
- Image width in pixels. See struct
|
||||
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -72,7 +72,7 @@ describing all planes of that format.
|
||||
- ``height``
|
||||
|
||||
- Image height in pixels. See struct
|
||||
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -81,7 +81,7 @@ describing all planes of that format.
|
||||
- ``pixelformat``
|
||||
|
||||
- The pixel format. Both single- and multi-planar four character
|
||||
codes can be used.
|
||||
codes can be used.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -106,8 +106,8 @@ describing all planes of that format.
|
||||
- ``plane_fmt[VIDEO_MAX_PLANES]``
|
||||
|
||||
- An array of structures describing format of each plane this pixel
|
||||
format consists of. The number of valid entries in this array has
|
||||
to be put in the ``num_planes`` field.
|
||||
format consists of. The number of valid entries in this array has
|
||||
to be put in the ``num_planes`` field.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -116,7 +116,7 @@ describing all planes of that format.
|
||||
- ``num_planes``
|
||||
|
||||
- Number of planes (i.e. separate memory buffers) for this format
|
||||
and the number of valid entries in the ``plane_fmt`` array.
|
||||
and the number of valid entries in the ``plane_fmt`` array.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -133,8 +133,8 @@ describing all planes of that format.
|
||||
- ``ycbcr_enc``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -143,8 +143,8 @@ describing all planes of that format.
|
||||
- ``quantization``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -153,8 +153,8 @@ describing all planes of that format.
|
||||
- ``xfer_func``
|
||||
|
||||
- This information supplements the ``colorspace`` and must be set by
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
the driver for capture streams and by the application for output
|
||||
streams, see :ref:`colorspaces`.
|
||||
|
||||
- .. row 12
|
||||
|
||||
@ -163,4 +163,4 @@ describing all planes of that format.
|
||||
- ``reserved[7]``
|
||||
|
||||
- Reserved for future extensions. Should be zeroed by drivers and
|
||||
applications.
|
||||
applications.
|
||||
|
@ -40,7 +40,7 @@ R'G'B' quantization.
|
||||
- ``V4L2_COLORSPACE_DEFAULT``
|
||||
|
||||
- The default colorspace. This can be used by applications to let
|
||||
the driver fill in the colorspace.
|
||||
the driver fill in the colorspace.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -107,10 +107,10 @@ R'G'B' quantization.
|
||||
- ``V4L2_COLORSPACE_RAW``
|
||||
|
||||
- The raw colorspace. This is used for raw image capture where the
|
||||
image is minimally processed and is using the internal colorspace
|
||||
of the device. The software that processes an image using this
|
||||
'colorspace' will have to know the internals of the capture
|
||||
device.
|
||||
image is minimally processed and is using the internal colorspace
|
||||
of the device. The software that processes an image using this
|
||||
'colorspace' will have to know the internals of the capture
|
||||
device.
|
||||
|
||||
|
||||
|
||||
@ -258,23 +258,23 @@ R'G'B' quantization.
|
||||
- ``V4L2_QUANTIZATION_DEFAULT``
|
||||
|
||||
- Use the default quantization encoding as defined by the
|
||||
colorspace. This is always full range for R'G'B' (except for the
|
||||
BT.2020 colorspace) and usually limited range for Y'CbCr.
|
||||
colorspace. This is always full range for R'G'B' (except for the
|
||||
BT.2020 colorspace) and usually limited range for Y'CbCr.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- ``V4L2_QUANTIZATION_FULL_RANGE``
|
||||
|
||||
- Use the full range quantization encoding. I.e. the range [0…1] is
|
||||
mapped to [0…255] (with possible clipping to [1…254] to avoid the
|
||||
0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
|
||||
[0…255] (with possible clipping to [1…254] to avoid the 0x00 and
|
||||
0xff values).
|
||||
mapped to [0…255] (with possible clipping to [1…254] to avoid the
|
||||
0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
|
||||
[0…255] (with possible clipping to [1…254] to avoid the 0x00 and
|
||||
0xff values).
|
||||
|
||||
- .. row 4
|
||||
|
||||
- ``V4L2_QUANTIZATION_LIM_RANGE``
|
||||
|
||||
- Use the limited range quantization encoding. I.e. the range [0…1]
|
||||
is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
|
||||
[16…240].
|
||||
is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
|
||||
[16…240].
|
||||
|
@ -28,7 +28,7 @@ Compressed Formats
|
||||
- 'JPEG'
|
||||
|
||||
- TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
|
||||
:ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
|
||||
:ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-MPEG`:
|
||||
|
||||
@ -37,8 +37,8 @@ Compressed Formats
|
||||
- 'MPEG'
|
||||
|
||||
- MPEG multiplexed stream. The actual format is determined by
|
||||
extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
|
||||
:ref:`mpeg-control-id`.
|
||||
extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
|
||||
:ref:`mpeg-control-id`.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-H264`:
|
||||
|
||||
|
@ -24,13 +24,13 @@ the palette, this must be done with ioctls of the Linux framebuffer API.
|
||||
|
||||
- Code
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 0
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Bit
|
||||
|
||||
- 7
|
||||
@ -55,7 +55,7 @@ the palette, this must be done with ioctls of the Linux framebuffer API.
|
||||
|
||||
- 'PAL8'
|
||||
|
||||
-
|
||||
-
|
||||
- i\ :sub:`7`
|
||||
|
||||
- i\ :sub:`6`
|
||||
|
@ -123,15 +123,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -140,25 +140,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -166,17 +166,17 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -184,25 +184,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -210,10 +210,10 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -124,15 +124,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -141,69 +141,69 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
- 1
|
||||
|
||||
- Y
|
||||
-
|
||||
-
|
||||
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
- 2
|
||||
|
||||
- Y
|
||||
-
|
||||
-
|
||||
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -211,10 +211,10 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -101,7 +101,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -139,15 +139,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -156,25 +156,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -182,17 +182,17 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -200,26 +200,26 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -227,10 +227,10 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -149,15 +149,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -166,25 +166,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -192,29 +192,29 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -222,25 +222,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -248,22 +248,22 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
@ -94,7 +94,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -156,15 +156,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -173,25 +173,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -199,29 +199,29 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -229,25 +229,25 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -255,22 +255,22 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
@ -33,7 +33,7 @@ next to each other in memory.
|
||||
|
||||
- Code
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 0 in memory
|
||||
|
||||
- :cspan:`7` Byte 1
|
||||
@ -44,8 +44,8 @@ next to each other in memory.
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Bit
|
||||
|
||||
- 7
|
||||
@ -64,7 +64,7 @@ next to each other in memory.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -81,7 +81,7 @@ next to each other in memory.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -98,7 +98,7 @@ next to each other in memory.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -121,7 +121,7 @@ next to each other in memory.
|
||||
|
||||
- 'RGB1'
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`2`
|
||||
|
||||
- r\ :sub:`1`
|
||||
@ -144,7 +144,7 @@ next to each other in memory.
|
||||
|
||||
- 'AR12'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`3`
|
||||
|
||||
- g\ :sub:`2`
|
||||
@ -161,7 +161,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`3`
|
||||
|
||||
- a\ :sub:`2`
|
||||
@ -184,7 +184,7 @@ next to each other in memory.
|
||||
|
||||
- 'XR12'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`3`
|
||||
|
||||
- g\ :sub:`2`
|
||||
@ -201,7 +201,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- -
|
||||
@ -224,7 +224,7 @@ next to each other in memory.
|
||||
|
||||
- 'AR15'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -241,7 +241,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -264,7 +264,7 @@ next to each other in memory.
|
||||
|
||||
- 'XR15'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -281,7 +281,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -304,7 +304,7 @@ next to each other in memory.
|
||||
|
||||
- 'RGBP'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -321,7 +321,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`4`
|
||||
|
||||
- r\ :sub:`3`
|
||||
@ -344,7 +344,7 @@ next to each other in memory.
|
||||
|
||||
- 'AR15' | (1 << 31)
|
||||
|
||||
-
|
||||
-
|
||||
- a
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -361,7 +361,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`3`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -384,7 +384,7 @@ next to each other in memory.
|
||||
|
||||
- 'XR15' | (1 << 31)
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -401,7 +401,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`3`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -424,7 +424,7 @@ next to each other in memory.
|
||||
|
||||
- 'RGBR'
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`4`
|
||||
|
||||
- r\ :sub:`3`
|
||||
@ -441,7 +441,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`3`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -464,7 +464,7 @@ next to each other in memory.
|
||||
|
||||
- 'BGR3'
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -481,7 +481,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -498,7 +498,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -521,7 +521,7 @@ next to each other in memory.
|
||||
|
||||
- 'RGB3'
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -538,7 +538,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -555,7 +555,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -578,7 +578,7 @@ next to each other in memory.
|
||||
|
||||
- 'BGRH'
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`5`
|
||||
|
||||
- b\ :sub:`4`
|
||||
@ -595,7 +595,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`4`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`3`
|
||||
|
||||
- g\ :sub:`2`
|
||||
@ -612,7 +612,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`2`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`1`
|
||||
|
||||
- r\ :sub:`0`
|
||||
@ -629,7 +629,7 @@ next to each other in memory.
|
||||
|
||||
- -
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- -
|
||||
@ -652,7 +652,7 @@ next to each other in memory.
|
||||
|
||||
- 'AR24'
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -669,7 +669,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -686,7 +686,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -703,7 +703,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`7`
|
||||
|
||||
- a\ :sub:`6`
|
||||
@ -726,7 +726,7 @@ next to each other in memory.
|
||||
|
||||
- 'XR24'
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -743,7 +743,7 @@ next to each other in memory.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -760,7 +760,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -777,7 +777,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- -
|
||||
@ -800,7 +800,7 @@ next to each other in memory.
|
||||
|
||||
- 'BA24'
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`7`
|
||||
|
||||
- a\ :sub:`6`
|
||||
@ -817,7 +817,7 @@ next to each other in memory.
|
||||
|
||||
- a\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -834,7 +834,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -851,7 +851,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -874,7 +874,7 @@ next to each other in memory.
|
||||
|
||||
- 'BX24'
|
||||
|
||||
-
|
||||
-
|
||||
- -
|
||||
|
||||
- -
|
||||
@ -891,7 +891,7 @@ next to each other in memory.
|
||||
|
||||
- -
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -908,7 +908,7 @@ next to each other in memory.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -925,7 +925,7 @@ next to each other in memory.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -1112,7 +1112,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- Code
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 0 in memory
|
||||
|
||||
- :cspan:`7` Byte 1
|
||||
@ -1123,8 +1123,8 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Bit
|
||||
|
||||
- 7
|
||||
@ -1143,7 +1143,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -1160,7 +1160,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -1177,7 +1177,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -1200,7 +1200,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 'R444'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`3`
|
||||
|
||||
- g\ :sub:`2`
|
||||
@ -1217,7 +1217,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`3`
|
||||
|
||||
- a\ :sub:`2`
|
||||
@ -1240,7 +1240,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 'RGBO'
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -1257,7 +1257,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -1280,7 +1280,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 'RGBQ'
|
||||
|
||||
-
|
||||
-
|
||||
- a
|
||||
|
||||
- r\ :sub:`4`
|
||||
@ -1297,7 +1297,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- g\ :sub:`3`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`2`
|
||||
|
||||
- g\ :sub:`1`
|
||||
@ -1320,7 +1320,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 'BGR4'
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
@ -1337,7 +1337,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- b\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -1354,7 +1354,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -1371,7 +1371,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`7`
|
||||
|
||||
- a\ :sub:`6`
|
||||
@ -1394,7 +1394,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- 'RGB4'
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`7`
|
||||
|
||||
- a\ :sub:`6`
|
||||
@ -1411,7 +1411,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- a\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- r\ :sub:`7`
|
||||
|
||||
- r\ :sub:`6`
|
||||
@ -1428,7 +1428,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- r\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- g\ :sub:`7`
|
||||
|
||||
- g\ :sub:`6`
|
||||
@ -1445,7 +1445,7 @@ either the corresponding ARGB or XRGB format, depending on the driver.
|
||||
|
||||
- g\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- b\ :sub:`7`
|
||||
|
||||
- b\ :sub:`6`
|
||||
|
@ -30,22 +30,22 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Code
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 0 in memory
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 1
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 2
|
||||
|
||||
-
|
||||
-
|
||||
- :cspan:`7` Byte 3
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Bit
|
||||
|
||||
- 7
|
||||
@ -64,7 +64,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -81,7 +81,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -98,7 +98,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 7
|
||||
|
||||
- 6
|
||||
@ -121,7 +121,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 'Y444'
|
||||
|
||||
-
|
||||
-
|
||||
- Cb\ :sub:`3`
|
||||
|
||||
- Cb\ :sub:`2`
|
||||
@ -138,7 +138,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Cr\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`3`
|
||||
|
||||
- a\ :sub:`2`
|
||||
@ -161,7 +161,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 'YUVO'
|
||||
|
||||
-
|
||||
-
|
||||
- Cb\ :sub:`2`
|
||||
|
||||
- Cb\ :sub:`1`
|
||||
@ -178,7 +178,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Cr\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- a
|
||||
|
||||
- Y'\ :sub:`4`
|
||||
@ -201,7 +201,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 'YUVP'
|
||||
|
||||
-
|
||||
-
|
||||
- Cb\ :sub:`2`
|
||||
|
||||
- Cb\ :sub:`1`
|
||||
@ -218,7 +218,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Cr\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- Y'\ :sub:`4`
|
||||
|
||||
- Y'\ :sub:`3`
|
||||
@ -241,7 +241,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- 'YUV4'
|
||||
|
||||
-
|
||||
-
|
||||
- a\ :sub:`7`
|
||||
|
||||
- a\ :sub:`6`
|
||||
@ -258,7 +258,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- a\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- Y'\ :sub:`7`
|
||||
|
||||
- Y'\ :sub:`6`
|
||||
@ -275,7 +275,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Y'\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- Cb\ :sub:`7`
|
||||
|
||||
- Cb\ :sub:`6`
|
||||
@ -292,7 +292,7 @@ component of each pixel in one 16 or 32 bit word.
|
||||
|
||||
- Cb\ :sub:`0`
|
||||
|
||||
-
|
||||
-
|
||||
- Cr\ :sub:`7`
|
||||
|
||||
- Cr\ :sub:`6`
|
||||
|
@ -64,10 +64,10 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'HM12'
|
||||
|
||||
- YUV 4:2:0 format used by the IVTV driver,
|
||||
`http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__
|
||||
`http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__
|
||||
|
||||
The format is documented in the kernel sources in the file
|
||||
``Documentation/video4linux/cx2341x/README.hm12``
|
||||
The format is documented in the kernel sources in the file
|
||||
``Documentation/video4linux/cx2341x/README.hm12``
|
||||
|
||||
- .. _`V4L2-PIX-FMT-CPIA1`:
|
||||
|
||||
@ -84,7 +84,7 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'JPGL'
|
||||
|
||||
- JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW
|
||||
80x.
|
||||
80x.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-SPCA501`:
|
||||
|
||||
@ -245,7 +245,7 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'WNVA'
|
||||
|
||||
- Used by the Winnov Videum driver,
|
||||
`http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__
|
||||
`http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__
|
||||
|
||||
- .. _`V4L2-PIX-FMT-TM6000`:
|
||||
|
||||
@ -263,7 +263,7 @@ please make a proposal on the linux-media mailing list.
|
||||
|
||||
- Used by xirlink CIT, found at IBM webcams.
|
||||
|
||||
Uses one line of Y then 1 line of VYUY
|
||||
Uses one line of Y then 1 line of VYUY
|
||||
|
||||
- .. _`V4L2-PIX-FMT-KONICA420`:
|
||||
|
||||
@ -273,7 +273,7 @@ please make a proposal on the linux-media mailing list.
|
||||
|
||||
- Used by Konica webcams.
|
||||
|
||||
YUV420 planar in blocks of 256 pixels.
|
||||
YUV420 planar in blocks of 256 pixels.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-YYUV`:
|
||||
|
||||
@ -290,7 +290,7 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'Y04 '
|
||||
|
||||
- Old 4-bit greyscale format. Only the most significant 4 bits of
|
||||
each byte are used, the other bits are set to 0.
|
||||
each byte are used, the other bits are set to 0.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-Y6`:
|
||||
|
||||
@ -299,7 +299,7 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'Y06 '
|
||||
|
||||
- Old 6-bit greyscale format. Only the most significant 6 bits of
|
||||
each byte are used, the other bits are set to 0.
|
||||
each byte are used, the other bits are set to 0.
|
||||
|
||||
- .. _`V4L2-PIX-FMT-S5C-UYVY-JPG`:
|
||||
|
||||
@ -308,34 +308,34 @@ please make a proposal on the linux-media mailing list.
|
||||
- 'S5CI'
|
||||
|
||||
- Two-planar format used by Samsung S5C73MX cameras. The first plane
|
||||
contains interleaved JPEG and UYVY image data, followed by meta
|
||||
data in form of an array of offsets to the UYVY data blocks. The
|
||||
actual pointer array follows immediately the interleaved JPEG/UYVY
|
||||
data, the number of entries in this array equals the height of the
|
||||
UYVY image. Each entry is a 4-byte unsigned integer in big endian
|
||||
order and it's an offset to a single pixel line of the UYVY image.
|
||||
The first plane can start either with JPEG or UYVY data chunk. The
|
||||
size of a single UYVY block equals the UYVY image's width
|
||||
multiplied by 2. The size of a JPEG chunk depends on the image and
|
||||
can vary with each line.
|
||||
contains interleaved JPEG and UYVY image data, followed by meta
|
||||
data in form of an array of offsets to the UYVY data blocks. The
|
||||
actual pointer array follows immediately the interleaved JPEG/UYVY
|
||||
data, the number of entries in this array equals the height of the
|
||||
UYVY image. Each entry is a 4-byte unsigned integer in big endian
|
||||
order and it's an offset to a single pixel line of the UYVY image.
|
||||
The first plane can start either with JPEG or UYVY data chunk. The
|
||||
size of a single UYVY block equals the UYVY image's width
|
||||
multiplied by 2. The size of a JPEG chunk depends on the image and
|
||||
can vary with each line.
|
||||
|
||||
The second plane, at an offset of 4084 bytes, contains a 4-byte
|
||||
offset to the pointer array in the first plane. This offset is
|
||||
followed by a 4-byte value indicating size of the pointer array.
|
||||
All numbers in the second plane are also in big endian order.
|
||||
Remaining data in the second plane is undefined. The information
|
||||
in the second plane allows to easily find location of the pointer
|
||||
array, which can be different for each frame. The size of the
|
||||
pointer array is constant for given UYVY image height.
|
||||
The second plane, at an offset of 4084 bytes, contains a 4-byte
|
||||
offset to the pointer array in the first plane. This offset is
|
||||
followed by a 4-byte value indicating size of the pointer array.
|
||||
All numbers in the second plane are also in big endian order.
|
||||
Remaining data in the second plane is undefined. The information
|
||||
in the second plane allows to easily find location of the pointer
|
||||
array, which can be different for each frame. The size of the
|
||||
pointer array is constant for given UYVY image height.
|
||||
|
||||
In order to extract UYVY and JPEG frames an application can
|
||||
initially set a data pointer to the start of first plane and then
|
||||
add an offset from the first entry of the pointers table. Such a
|
||||
pointer indicates start of an UYVY image pixel line. Whole UYVY
|
||||
line can be copied to a separate buffer. These steps should be
|
||||
repeated for each line, i.e. the number of entries in the pointer
|
||||
array. Anything what's in between the UYVY lines is JPEG data and
|
||||
should be concatenated to form the JPEG stream.
|
||||
In order to extract UYVY and JPEG frames an application can
|
||||
initially set a data pointer to the start of first plane and then
|
||||
add an offset from the first entry of the pointers table. Such a
|
||||
pointer indicates start of an UYVY image pixel line. Whole UYVY
|
||||
line can be copied to a separate buffer. These steps should be
|
||||
repeated for each line, i.e. the number of entries in the pointer
|
||||
array. Anything what's in between the UYVY lines is JPEG data and
|
||||
should be concatenated to form the JPEG stream.
|
||||
|
||||
|
||||
|
||||
@ -354,7 +354,7 @@ please make a proposal on the linux-media mailing list.
|
||||
- 0x00000001
|
||||
|
||||
- The color values are premultiplied by the alpha channel value. For
|
||||
example, if a light blue pixel with 50% transparency was described
|
||||
by RGBA values (128, 192, 255, 128), the same pixel described with
|
||||
premultiplied colors would be described by RGBA values (64, 96,
|
||||
128, 128)
|
||||
example, if a light blue pixel with 50% transparency was described
|
||||
by RGBA values (128, 192, 255, 128), the same pixel described with
|
||||
premultiplied colors would be described by RGBA values (64, 96,
|
||||
128, 128)
|
||||
|
@ -52,7 +52,7 @@ Each cell is one byte.
|
||||
- G\ :sub:`03high`
|
||||
|
||||
- B\ :sub:`00low`\ (bits 7--6) G\ :sub:`01low`\ (bits 5--4)
|
||||
B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0)
|
||||
B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0)
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -67,7 +67,7 @@ Each cell is one byte.
|
||||
- R\ :sub:`13high`
|
||||
|
||||
- G\ :sub:`10low`\ (bits 7--6) R\ :sub:`11low`\ (bits 5--4)
|
||||
G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0)
|
||||
G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0)
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -82,7 +82,7 @@ Each cell is one byte.
|
||||
- G\ :sub:`23high`
|
||||
|
||||
- B\ :sub:`20low`\ (bits 7--6) G\ :sub:`21low`\ (bits 5--4)
|
||||
B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0)
|
||||
B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0)
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -97,4 +97,4 @@ Each cell is one byte.
|
||||
- R\ :sub:`33high`
|
||||
|
||||
- G\ :sub:`30low`\ (bits 7--6) R\ :sub:`31low`\ (bits 5--4)
|
||||
G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0)
|
||||
G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0)
|
||||
|
@ -121,15 +121,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
|
@ -119,13 +119,13 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
- 3
|
||||
|
@ -158,12 +158,12 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
- 3
|
||||
@ -172,7 +172,7 @@ Each cell is one byte.
|
||||
|
||||
- 5
|
||||
|
||||
-
|
||||
-
|
||||
- 6
|
||||
|
||||
- 7
|
||||
|
@ -114,16 +114,16 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -132,18 +132,18 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -151,26 +151,26 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -178,18 +178,18 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -197,11 +197,11 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -147,12 +147,12 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
- 3
|
||||
|
@ -136,16 +136,16 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -154,27 +154,27 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -182,18 +182,18 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -201,27 +201,27 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -229,11 +229,11 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -100,7 +100,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -120,7 +120,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -150,16 +150,16 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -168,27 +168,27 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -196,18 +196,18 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -215,27 +215,27 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- C
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -243,11 +243,11 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
@ -99,7 +99,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -135,7 +135,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -181,15 +181,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
|
@ -164,15 +164,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
|
@ -93,7 +93,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -145,7 +145,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -207,7 +207,7 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
- 1
|
||||
|
@ -124,16 +124,16 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
-
|
||||
-
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
@ -146,7 +146,7 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- C
|
||||
@ -163,7 +163,7 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- C
|
||||
@ -180,7 +180,7 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- C
|
||||
@ -197,7 +197,7 @@ Each cell is one byte.
|
||||
|
||||
- Y
|
||||
|
||||
-
|
||||
-
|
||||
- Y
|
||||
|
||||
- C
|
||||
|
@ -119,15 +119,15 @@ Each cell is one byte.
|
||||
|
||||
- .. row 1
|
||||
|
||||
-
|
||||
-
|
||||
- 0
|
||||
|
||||
-
|
||||
-
|
||||
- 1
|
||||
|
||||
- 2
|
||||
|
||||
-
|
||||
-
|
||||
- 3
|
||||
|
||||
- .. row 2
|
||||
|
@ -12,17 +12,17 @@ Examples
|
||||
.. code-block:: c
|
||||
:caption: Example 1.15. Resetting the cropping parameters
|
||||
|
||||
struct v4l2_selection sel = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
|
||||
.target = V4L2_SEL_TGT_CROP_DEFAULT,
|
||||
};
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
sel.target = V4L2_SEL_TGT_CROP;
|
||||
ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
struct v4l2_selection sel = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
|
||||
.target = V4L2_SEL_TGT_CROP_DEFAULT,
|
||||
};
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
sel.target = V4L2_SEL_TGT_CROP;
|
||||
ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
|
||||
Setting a composing area on output of size of *at most* half of limit
|
||||
placed at a center of a display.
|
||||
@ -31,26 +31,26 @@ placed at a center of a display.
|
||||
.. code-block:: c
|
||||
:caption: Example 1.16. Simple downscaling
|
||||
|
||||
struct v4l2_selection sel = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_COMPOSE_BOUNDS,
|
||||
};
|
||||
struct v4l2_rect r;
|
||||
struct v4l2_selection sel = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_COMPOSE_BOUNDS,
|
||||
};
|
||||
struct v4l2_rect r;
|
||||
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
/* setting smaller compose rectangle */
|
||||
r.width = sel.r.width / 2;
|
||||
r.height = sel.r.height / 2;
|
||||
r.left = sel.r.width / 4;
|
||||
r.top = sel.r.height / 4;
|
||||
sel.r = r;
|
||||
sel.target = V4L2_SEL_TGT_COMPOSE;
|
||||
sel.flags = V4L2_SEL_FLAG_LE;
|
||||
ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
/* setting smaller compose rectangle */
|
||||
r.width = sel.r.width / 2;
|
||||
r.height = sel.r.height / 2;
|
||||
r.left = sel.r.width / 4;
|
||||
r.top = sel.r.height / 4;
|
||||
sel.r = r;
|
||||
sel.target = V4L2_SEL_TGT_COMPOSE;
|
||||
sel.flags = V4L2_SEL_FLAG_LE;
|
||||
ret = ioctl(fd, VIDIOC_S_SELECTION, &sel);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
|
||||
A video output device is assumed; change ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
|
||||
for other devices
|
||||
@ -59,23 +59,23 @@ for other devices
|
||||
.. code-block:: c
|
||||
:caption: Example 1.17. Querying for scaling factors
|
||||
|
||||
struct v4l2_selection compose = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_COMPOSE,
|
||||
};
|
||||
struct v4l2_selection crop = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_CROP,
|
||||
};
|
||||
double hscale, vscale;
|
||||
struct v4l2_selection compose = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_COMPOSE,
|
||||
};
|
||||
struct v4l2_selection crop = {
|
||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||
.target = V4L2_SEL_TGT_CROP,
|
||||
};
|
||||
double hscale, vscale;
|
||||
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &compose);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &crop);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &compose);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
ret = ioctl(fd, VIDIOC_G_SELECTION, &crop);
|
||||
if (ret)
|
||||
exit(-1);
|
||||
|
||||
/* computing scaling factors */
|
||||
hscale = (double)compose.r.width / crop.r.width;
|
||||
vscale = (double)compose.r.height / crop.r.height;
|
||||
/* computing scaling factors */
|
||||
hscale = (double)compose.r.width / crop.r.width;
|
||||
vscale = (double)compose.r.height / crop.r.height;
|
||||
|
@ -72,32 +72,32 @@ standard ioctls can be used with the given input or output.
|
||||
struct v4l2_standard standard;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_STD, &std_id)) {
|
||||
/* Note when VIDIOC_ENUMSTD always returns ENOTTY this
|
||||
is no video device or it falls under the USB exception,
|
||||
and VIDIOC_G_STD returning ENOTTY is no error. */
|
||||
/* Note when VIDIOC_ENUMSTD always returns ENOTTY this
|
||||
is no video device or it falls under the USB exception,
|
||||
and VIDIOC_G_STD returning ENOTTY is no error. */
|
||||
|
||||
perror("VIDIOC_G_STD");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_STD");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset(&standard, 0, sizeof(standard));
|
||||
standard.index = 0;
|
||||
|
||||
while (0 == ioctl(fd, VIDIOC_ENUMSTD, &standard)) {
|
||||
if (standard.id & std_id) {
|
||||
printf("Current video standard: %s\\n", standard.name);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (standard.id & std_id) {
|
||||
printf("Current video standard: %s\\n", standard.name);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
standard.index++;
|
||||
standard.index++;
|
||||
}
|
||||
|
||||
/* EINVAL indicates the end of the enumeration, which cannot be
|
||||
empty unless this device falls under the USB exception. */
|
||||
|
||||
if (errno == EINVAL || standard.index == 0) {
|
||||
perror("VIDIOC_ENUMSTD");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_ENUMSTD");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@ -110,13 +110,13 @@ standard ioctls can be used with the given input or output.
|
||||
memset(&input, 0, sizeof(input));
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &input.index)) {
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
|
||||
perror("VIDIOC_ENUM_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_ENUM_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("Current input %s supports:\\n", input.name);
|
||||
@ -125,18 +125,18 @@ standard ioctls can be used with the given input or output.
|
||||
standard.index = 0;
|
||||
|
||||
while (0 == ioctl(fd, VIDIOC_ENUMSTD, &standard)) {
|
||||
if (standard.id & input.std)
|
||||
printf("%s\\n", standard.name);
|
||||
if (standard.id & input.std)
|
||||
printf("%s\\n", standard.name);
|
||||
|
||||
standard.index++;
|
||||
standard.index++;
|
||||
}
|
||||
|
||||
/* EINVAL indicates the end of the enumeration, which cannot be
|
||||
empty unless this device falls under the USB exception. */
|
||||
|
||||
if (errno != EINVAL || standard.index == 0) {
|
||||
perror("VIDIOC_ENUMSTD");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_ENUMSTD");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@ -149,18 +149,18 @@ standard ioctls can be used with the given input or output.
|
||||
memset(&input, 0, sizeof(input));
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &input.index)) {
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
|
||||
perror("VIDIOC_ENUM_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_ENUM_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (0 == (input.std & V4L2_STD_PAL_BG)) {
|
||||
fprintf(stderr, "Oops. B/G PAL is not supported.\\n");
|
||||
exit(EXIT_FAILURE);
|
||||
fprintf(stderr, "Oops. B/G PAL is not supported.\\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Note this is also supposed to work when only B
|
||||
@ -169,8 +169,8 @@ standard ioctls can be used with the given input or output.
|
||||
std_id = V4L2_STD_PAL_BG;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_S_STD, &std_id)) {
|
||||
perror("VIDIOC_S_STD");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_S_STD");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
.. [1]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@ started. In the write loop, when the application runs out of free
|
||||
buffers it must wait until an empty buffer can be dequeued and reused.
|
||||
Two methods exist to suspend execution of the application until one or
|
||||
more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF
|
||||
<VIDIOC_QBUF>`` blocks when no buffer is in the outgoing queue. When the
|
||||
<VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the
|
||||
``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function,
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN``
|
||||
error code when no buffer is available. The :ref:`select()
|
||||
|
@ -33,10 +33,10 @@ Selection flags
|
||||
- (1 << 0)
|
||||
|
||||
- Suggest the driver it should choose greater or equal rectangle (in
|
||||
size) than was requested. Albeit the driver may choose a lesser
|
||||
size, it will only do so due to hardware limitations. Without this
|
||||
flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the
|
||||
closest possible rectangle.
|
||||
size) than was requested. Albeit the driver may choose a lesser
|
||||
size, it will only do so due to hardware limitations. Without this
|
||||
flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the
|
||||
closest possible rectangle.
|
||||
|
||||
- Yes
|
||||
|
||||
@ -49,8 +49,8 @@ Selection flags
|
||||
- (1 << 1)
|
||||
|
||||
- Suggest the driver it should choose lesser or equal rectangle (in
|
||||
size) than was requested. Albeit the driver may choose a greater
|
||||
size, it will only do so due to hardware limitations.
|
||||
size) than was requested. Albeit the driver may choose a greater
|
||||
size, it will only do so due to hardware limitations.
|
||||
|
||||
- Yes
|
||||
|
||||
@ -63,8 +63,8 @@ Selection flags
|
||||
- (1 << 2)
|
||||
|
||||
- The configuration must not be propagated to any further processing
|
||||
steps. If this flag is not given, the configuration is propagated
|
||||
inside the subdevice to all further processing steps.
|
||||
steps. If this flag is not given, the configuration is propagated
|
||||
inside the subdevice to all further processing steps.
|
||||
|
||||
- No
|
||||
|
||||
|
@ -60,7 +60,7 @@ of the two interfaces they are used.
|
||||
- 0x0002
|
||||
|
||||
- Bounds of the crop rectangle. All valid crop rectangles fit inside
|
||||
the crop bounds rectangle.
|
||||
the crop bounds rectangle.
|
||||
|
||||
- Yes
|
||||
|
||||
@ -73,12 +73,12 @@ of the two interfaces they are used.
|
||||
- 0x0003
|
||||
|
||||
- The native size of the device, e.g. a sensor's pixel array.
|
||||
``left`` and ``top`` fields are zero for this target. Setting the
|
||||
native size will generally only make sense for memory to memory
|
||||
devices where the software can create a canvas of a given size in
|
||||
which for example a video frame can be composed. In that case
|
||||
V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of
|
||||
that canvas.
|
||||
``left`` and ``top`` fields are zero for this target. Setting the
|
||||
native size will generally only make sense for memory to memory
|
||||
devices where the software can create a canvas of a given size in
|
||||
which for example a video frame can be composed. In that case
|
||||
V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of
|
||||
that canvas.
|
||||
|
||||
- Yes
|
||||
|
||||
@ -115,7 +115,7 @@ of the two interfaces they are used.
|
||||
- 0x0102
|
||||
|
||||
- Bounds of the compose rectangle. All valid compose rectangles fit
|
||||
inside the compose bounds rectangle.
|
||||
inside the compose bounds rectangle.
|
||||
|
||||
- Yes
|
||||
|
||||
@ -128,7 +128,7 @@ of the two interfaces they are used.
|
||||
- 0x0103
|
||||
|
||||
- The active area and all padding pixels that are inserted or
|
||||
modified by hardware.
|
||||
modified by hardware.
|
||||
|
||||
- Yes
|
||||
|
||||
|
@ -33,137 +33,137 @@ file: media/v4l/v4l2grab.c
|
||||
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
||||
|
||||
struct buffer {
|
||||
void *start;
|
||||
size_t length;
|
||||
void *start;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
static void xioctl(int fh, int request, void *arg)
|
||||
{
|
||||
int r;
|
||||
int r;
|
||||
|
||||
do {
|
||||
r = v4l2_ioctl(fh, request, arg);
|
||||
} while (r == -1 && ((errno == EINTR) || (errno == EAGAIN)));
|
||||
do {
|
||||
r = v4l2_ioctl(fh, request, arg);
|
||||
} while (r == -1 && ((errno == EINTR) || (errno == EAGAIN)));
|
||||
|
||||
if (r == -1) {
|
||||
fprintf(stderr, "error %d, %s\\n", errno, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (r == -1) {
|
||||
fprintf(stderr, "error %d, %s\\n", errno, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct v4l2_format fmt;
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_requestbuffers req;
|
||||
enum v4l2_buf_type type;
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
int r, fd = -1;
|
||||
unsigned int i, n_buffers;
|
||||
char *dev_name = "/dev/video0";
|
||||
char out_name[256];
|
||||
FILE *fout;
|
||||
struct buffer *buffers;
|
||||
struct v4l2_format fmt;
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_requestbuffers req;
|
||||
enum v4l2_buf_type type;
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
int r, fd = -1;
|
||||
unsigned int i, n_buffers;
|
||||
char *dev_name = "/dev/video0";
|
||||
char out_name[256];
|
||||
FILE *fout;
|
||||
struct buffer *buffers;
|
||||
|
||||
fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
|
||||
if (fd < 0) {
|
||||
perror("Cannot open device");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
|
||||
if (fd < 0) {
|
||||
perror("Cannot open device");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
CLEAR(fmt);
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
fmt.fmt.pix.width = 640;
|
||||
fmt.fmt.pix.height = 480;
|
||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
|
||||
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
|
||||
xioctl(fd, VIDIOC_S_FMT, &fmt);
|
||||
if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_RGB24) {
|
||||
printf("Libv4l didn't accept RGB24 format. Can't proceed.\\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if ((fmt.fmt.pix.width != 640) || (fmt.fmt.pix.height != 480))
|
||||
printf("Warning: driver is sending image at %dx%d\\n",
|
||||
fmt.fmt.pix.width, fmt.fmt.pix.height);
|
||||
CLEAR(fmt);
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
fmt.fmt.pix.width = 640;
|
||||
fmt.fmt.pix.height = 480;
|
||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
|
||||
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
|
||||
xioctl(fd, VIDIOC_S_FMT, &fmt);
|
||||
if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_RGB24) {
|
||||
printf("Libv4l didn't accept RGB24 format. Can't proceed.\\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if ((fmt.fmt.pix.width != 640) || (fmt.fmt.pix.height != 480))
|
||||
printf("Warning: driver is sending image at %dx%d\\n",
|
||||
fmt.fmt.pix.width, fmt.fmt.pix.height);
|
||||
|
||||
CLEAR(req);
|
||||
req.count = 2;
|
||||
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
req.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_REQBUFS, &req);
|
||||
CLEAR(req);
|
||||
req.count = 2;
|
||||
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
req.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_REQBUFS, &req);
|
||||
|
||||
buffers = calloc(req.count, sizeof(*buffers));
|
||||
for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
|
||||
CLEAR(buf);
|
||||
buffers = calloc(req.count, sizeof(*buffers));
|
||||
for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
|
||||
CLEAR(buf);
|
||||
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = n_buffers;
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = n_buffers;
|
||||
|
||||
xioctl(fd, VIDIOC_QUERYBUF, &buf);
|
||||
xioctl(fd, VIDIOC_QUERYBUF, &buf);
|
||||
|
||||
buffers[n_buffers].length = buf.length;
|
||||
buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
fd, buf.m.offset);
|
||||
buffers[n_buffers].length = buf.length;
|
||||
buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
fd, buf.m.offset);
|
||||
|
||||
if (MAP_FAILED == buffers[n_buffers].start) {
|
||||
perror("mmap");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
if (MAP_FAILED == buffers[n_buffers].start) {
|
||||
perror("mmap");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < n_buffers; ++i) {
|
||||
CLEAR(buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = i;
|
||||
xioctl(fd, VIDIOC_QBUF, &buf);
|
||||
}
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
for (i = 0; i < n_buffers; ++i) {
|
||||
CLEAR(buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = i;
|
||||
xioctl(fd, VIDIOC_QBUF, &buf);
|
||||
}
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
|
||||
xioctl(fd, VIDIOC_STREAMON, &type);
|
||||
for (i = 0; i < 20; i++) {
|
||||
do {
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
xioctl(fd, VIDIOC_STREAMON, &type);
|
||||
for (i = 0; i < 20; i++) {
|
||||
do {
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
|
||||
/* Timeout. */
|
||||
tv.tv_sec = 2;
|
||||
tv.tv_usec = 0;
|
||||
/* Timeout. */
|
||||
tv.tv_sec = 2;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
r = select(fd + 1, &fds, NULL, NULL, &tv);
|
||||
} while ((r == -1 && (errno = EINTR)));
|
||||
if (r == -1) {
|
||||
perror("select");
|
||||
return errno;
|
||||
}
|
||||
r = select(fd + 1, &fds, NULL, NULL, &tv);
|
||||
} while ((r == -1 && (errno = EINTR)));
|
||||
if (r == -1) {
|
||||
perror("select");
|
||||
return errno;
|
||||
}
|
||||
|
||||
CLEAR(buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_DQBUF, &buf);
|
||||
CLEAR(buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_DQBUF, &buf);
|
||||
|
||||
sprintf(out_name, "out%03d.ppm", i);
|
||||
fout = fopen(out_name, "w");
|
||||
if (!fout) {
|
||||
perror("Cannot open image");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fprintf(fout, "P6\\n%d %d 255\\n",
|
||||
fmt.fmt.pix.width, fmt.fmt.pix.height);
|
||||
fwrite(buffers[buf.index].start, buf.bytesused, 1, fout);
|
||||
fclose(fout);
|
||||
sprintf(out_name, "out%03d.ppm", i);
|
||||
fout = fopen(out_name, "w");
|
||||
if (!fout) {
|
||||
perror("Cannot open image");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fprintf(fout, "P6\\n%d %d 255\\n",
|
||||
fmt.fmt.pix.width, fmt.fmt.pix.height);
|
||||
fwrite(buffers[buf.index].start, buf.bytesused, 1, fout);
|
||||
fclose(fout);
|
||||
|
||||
xioctl(fd, VIDIOC_QBUF, &buf);
|
||||
}
|
||||
xioctl(fd, VIDIOC_QBUF, &buf);
|
||||
}
|
||||
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
xioctl(fd, VIDIOC_STREAMOFF, &type);
|
||||
for (i = 0; i < n_buffers; ++i)
|
||||
v4l2_munmap(buffers[i].start, buffers[i].length);
|
||||
v4l2_close(fd);
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
xioctl(fd, VIDIOC_STREAMOFF, &type);
|
||||
for (i = 0; i < n_buffers; ++i)
|
||||
v4l2_munmap(buffers[i].start, buffers[i].length);
|
||||
v4l2_close(fd);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,16 +35,16 @@ all the output ioctls when the device has one or more outputs.
|
||||
int index;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_G_INPUT, &index)) {
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_G_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset(&input, 0, sizeof(input));
|
||||
input.index = index;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) {
|
||||
perror("VIDIOC_ENUMINPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_ENUMINPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("Current input: %s\\n", input.name);
|
||||
@ -58,6 +58,6 @@ all the output ioctls when the device has one or more outputs.
|
||||
index = 0;
|
||||
|
||||
if (-1 == ioctl(fd, VIDIOC_S_INPUT, &index)) {
|
||||
perror("VIDIOC_S_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
perror("VIDIOC_S_INPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -94,12 +94,12 @@ than the number requested.
|
||||
- ``count``
|
||||
|
||||
- The number of buffers requested or granted. If count == 0, then
|
||||
:ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
|
||||
created buffers, and it will check the validity of ``memory`` and
|
||||
``format.type``. If those are invalid -1 is returned and errno is
|
||||
set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
|
||||
0. It will never set errno to ``EBUSY`` error code in this particular
|
||||
case.
|
||||
:ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
|
||||
created buffers, and it will check the validity of ``memory`` and
|
||||
``format.type``. If those are invalid -1 is returned and errno is
|
||||
set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
|
||||
0. It will never set errno to ``EBUSY`` error code in this particular
|
||||
case.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -108,8 +108,8 @@ than the number requested.
|
||||
- ``memory``
|
||||
|
||||
- Applications set this field to ``V4L2_MEMORY_MMAP``,
|
||||
``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
|
||||
:ref:`v4l2-memory`
|
||||
``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See
|
||||
:ref:`v4l2-memory`
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -126,7 +126,7 @@ than the number requested.
|
||||
- ``reserved``\ [8]
|
||||
|
||||
- A place holder for future extensions. Drivers and applications
|
||||
must set the array to zero.
|
||||
must set the array to zero.
|
||||
|
||||
|
||||
|
||||
|
@ -65,9 +65,9 @@ overlay devices.
|
||||
- ``type``
|
||||
|
||||
- Type of the data stream, set by the application. Only these types
|
||||
are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
|
||||
``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
|
||||
``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
|
||||
are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
|
||||
``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
|
||||
``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -76,11 +76,11 @@ overlay devices.
|
||||
- ``bounds``
|
||||
|
||||
- Defines the window within capturing or output is possible, this
|
||||
may exclude for example the horizontal and vertical blanking
|
||||
areas. The cropping rectangle cannot exceed these limits. Width
|
||||
and height are defined in pixels, the driver writer is free to
|
||||
choose origin and units of the coordinate system in the analog
|
||||
domain.
|
||||
may exclude for example the horizontal and vertical blanking
|
||||
areas. The cropping rectangle cannot exceed these limits. Width
|
||||
and height are defined in pixels, the driver writer is free to
|
||||
choose origin and units of the coordinate system in the analog
|
||||
domain.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -89,10 +89,10 @@ overlay devices.
|
||||
- ``defrect``
|
||||
|
||||
- Default cropping rectangle, it shall cover the "whole picture".
|
||||
Assuming pixel aspect 1/1 this could be for example a 640 × 480
|
||||
rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM
|
||||
centered over the active picture area. The same co-ordinate system
|
||||
as for ``bounds`` is used.
|
||||
Assuming pixel aspect 1/1 this could be for example a 640 × 480
|
||||
rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM
|
||||
centered over the active picture area. The same co-ordinate system
|
||||
as for ``bounds`` is used.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -101,12 +101,12 @@ overlay devices.
|
||||
- ``pixelaspect``
|
||||
|
||||
- This is the pixel aspect (y / x) when no scaling is applied, the
|
||||
ratio of the actual sampling frequency and the frequency required
|
||||
to get square pixels.
|
||||
ratio of the actual sampling frequency and the frequency required
|
||||
to get square pixels.
|
||||
|
||||
When cropping coordinates refer to square pixels, the driver sets
|
||||
``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
|
||||
SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
|
||||
When cropping coordinates refer to square pixels, the driver sets
|
||||
``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
|
||||
SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
|
||||
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ overlay devices.
|
||||
- ``left``
|
||||
|
||||
- Horizontal offset of the top, left corner of the rectangle, in
|
||||
pixels.
|
||||
pixels.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -134,7 +134,7 @@ overlay devices.
|
||||
- ``top``
|
||||
|
||||
- Vertical offset of the top, left corner of the rectangle, in
|
||||
pixels.
|
||||
pixels.
|
||||
|
||||
- .. row 3
|
||||
|
||||
|
@ -100,23 +100,23 @@ instructions.
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``addr``
|
||||
|
||||
- Match a chip by this number, interpreted according to the ``type``
|
||||
field.
|
||||
field.
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- char
|
||||
|
||||
- ``name[32]``
|
||||
|
||||
- Match a chip by this name, interpreted according to the ``type``
|
||||
field. Currently unused.
|
||||
field. Currently unused.
|
||||
|
||||
|
||||
|
||||
@ -151,9 +151,9 @@ instructions.
|
||||
- ``flags``
|
||||
|
||||
- Set by the driver. If ``V4L2_CHIP_FL_READABLE`` is set, then the
|
||||
driver supports reading registers from the device. If
|
||||
``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing
|
||||
registers.
|
||||
driver supports reading registers from the device. If
|
||||
``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing
|
||||
registers.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -180,7 +180,7 @@ instructions.
|
||||
- 0
|
||||
|
||||
- Match the nth chip on the card, zero for the bridge chip. Does not
|
||||
match sub-devices.
|
||||
match sub-devices.
|
||||
|
||||
- .. row 2
|
||||
|
||||
|
@ -109,23 +109,23 @@ instructions.
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``addr``
|
||||
|
||||
- Match a chip by this number, interpreted according to the ``type``
|
||||
field.
|
||||
field.
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- char
|
||||
|
||||
- ``name[32]``
|
||||
|
||||
- Match a chip by this name, interpreted according to the ``type``
|
||||
field. Currently unused.
|
||||
field. Currently unused.
|
||||
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ instructions.
|
||||
- 0
|
||||
|
||||
- Match the nth chip on the card, zero for the bridge chip. Does not
|
||||
match sub-devices.
|
||||
match sub-devices.
|
||||
|
||||
- .. row 2
|
||||
|
||||
|
@ -69,8 +69,8 @@ introduced in Linux 3.3.
|
||||
|
||||
- ``cmd``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- The decoder command, see :ref:`decoder-cmds`.
|
||||
|
||||
- .. row 2
|
||||
@ -79,10 +79,10 @@ introduced in Linux 3.3.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Flags to go with the command. If no flags are defined for this
|
||||
command, drivers and applications must set this field to zero.
|
||||
command, drivers and applications must set this field to zero.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -90,97 +90,97 @@ introduced in Linux 3.3.
|
||||
|
||||
- (anonymous)
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- struct
|
||||
|
||||
- ``start``
|
||||
|
||||
-
|
||||
-
|
||||
- Structure containing additional data for the
|
||||
``V4L2_DEC_CMD_START`` command.
|
||||
``V4L2_DEC_CMD_START`` command.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __s32
|
||||
|
||||
- ``speed``
|
||||
|
||||
- Playback speed and direction. The playback speed is defined as
|
||||
``speed``/1000 of the normal speed. So 1000 is normal playback.
|
||||
Negative numbers denote reverse playback, so -1000 does reverse
|
||||
playback at normal speed. Speeds -1, 0 and 1 have special
|
||||
meanings: speed 0 is shorthand for 1000 (normal playback). A speed
|
||||
of 1 steps just one frame forward, a speed of -1 steps just one
|
||||
frame back.
|
||||
``speed``/1000 of the normal speed. So 1000 is normal playback.
|
||||
Negative numbers denote reverse playback, so -1000 does reverse
|
||||
playback at normal speed. Speeds -1, 0 and 1 have special
|
||||
meanings: speed 0 is shorthand for 1000 (normal playback). A speed
|
||||
of 1 steps just one frame forward, a speed of -1 steps just one
|
||||
frame back.
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``format``
|
||||
|
||||
- Format restrictions. This field is set by the driver, not the
|
||||
application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if
|
||||
there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if
|
||||
the decoder operates on full GOPs (*Group Of Pictures*). This is
|
||||
usually the case for reverse playback: the decoder needs full
|
||||
GOPs, which it can then play in reverse order. So to implement
|
||||
reverse playback the application must feed the decoder the last
|
||||
GOP in the video file, then the GOP before that, etc. etc.
|
||||
application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if
|
||||
there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if
|
||||
the decoder operates on full GOPs (*Group Of Pictures*). This is
|
||||
usually the case for reverse playback: the decoder needs full
|
||||
GOPs, which it can then play in reverse order. So to implement
|
||||
reverse playback the application must feed the decoder the last
|
||||
GOP in the video file, then the GOP before that, etc. etc.
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
- struct
|
||||
|
||||
- ``stop``
|
||||
|
||||
-
|
||||
-
|
||||
- Structure containing additional data for the ``V4L2_DEC_CMD_STOP``
|
||||
command.
|
||||
command.
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __u64
|
||||
|
||||
- ``pts``
|
||||
|
||||
- Stop playback at this ``pts`` or immediately if the playback is
|
||||
already past that timestamp. Leave to 0 if you want to stop after
|
||||
the last frame was decoded.
|
||||
already past that timestamp. Leave to 0 if you want to stop after
|
||||
the last frame was decoded.
|
||||
|
||||
- .. row 9
|
||||
|
||||
-
|
||||
-
|
||||
- struct
|
||||
|
||||
- ``raw``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 10
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``data``\ [16]
|
||||
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
the array to zero.
|
||||
the array to zero.
|
||||
|
||||
|
||||
|
||||
@ -199,12 +199,12 @@ introduced in Linux 3.3.
|
||||
- 0
|
||||
|
||||
- Start the decoder. When the decoder is already running or paused,
|
||||
this command will just change the playback speed. That means that
|
||||
calling ``V4L2_DEC_CMD_START`` when the decoder was paused will
|
||||
*not* resume the decoder. You have to explicitly call
|
||||
``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
|
||||
``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
|
||||
muted when playing back at a non-standard speed.
|
||||
this command will just change the playback speed. That means that
|
||||
calling ``V4L2_DEC_CMD_START`` when the decoder was paused will
|
||||
*not* resume the decoder. You have to explicitly call
|
||||
``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
|
||||
``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
|
||||
muted when playing back at a non-standard speed.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -213,23 +213,23 @@ introduced in Linux 3.3.
|
||||
- 1
|
||||
|
||||
- Stop the decoder. When the decoder is already stopped, this
|
||||
command does nothing. This command has two flags: if
|
||||
``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
|
||||
the picture to black after it stopped decoding. Otherwise the last
|
||||
image will repeat. mem2mem decoders will stop producing new frames
|
||||
altogether. They will send a ``V4L2_EVENT_EOS`` event when the
|
||||
last frame has been decoded and all frames are ready to be
|
||||
dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on
|
||||
the last buffer of the capture queue to indicate there will be no
|
||||
new buffers produced to dequeue. This buffer may be empty,
|
||||
indicated by the driver setting the ``bytesused`` field to 0. Once
|
||||
the ``V4L2_BUF_FLAG_LAST`` flag was set, the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code. If
|
||||
``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
|
||||
immediately (ignoring the ``pts`` value), otherwise it will keep
|
||||
decoding until timestamp >= pts or until the last of the pending
|
||||
data from its internal buffers was decoded.
|
||||
command does nothing. This command has two flags: if
|
||||
``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
|
||||
the picture to black after it stopped decoding. Otherwise the last
|
||||
image will repeat. mem2mem decoders will stop producing new frames
|
||||
altogether. They will send a ``V4L2_EVENT_EOS`` event when the
|
||||
last frame has been decoded and all frames are ready to be
|
||||
dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on
|
||||
the last buffer of the capture queue to indicate there will be no
|
||||
new buffers produced to dequeue. This buffer may be empty,
|
||||
indicated by the driver setting the ``bytesused`` field to 0. Once
|
||||
the ``V4L2_BUF_FLAG_LAST`` flag was set, the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code. If
|
||||
``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
|
||||
immediately (ignoring the ``pts`` value), otherwise it will keep
|
||||
decoding until timestamp >= pts or until the last of the pending
|
||||
data from its internal buffers was decoded.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -238,10 +238,10 @@ introduced in Linux 3.3.
|
||||
- 2
|
||||
|
||||
- Pause the decoder. When the decoder has not been started yet, the
|
||||
driver will return an ``EPERM`` error code. When the decoder is
|
||||
already paused, this command does nothing. This command has one
|
||||
flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the
|
||||
decoder output to black when paused.
|
||||
driver will return an ``EPERM`` error code. When the decoder is
|
||||
already paused, this command does nothing. This command has one
|
||||
flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the
|
||||
decoder output to black when paused.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -250,9 +250,9 @@ introduced in Linux 3.3.
|
||||
- 3
|
||||
|
||||
- Resume decoding after a PAUSE command. When the decoder has not
|
||||
been started yet, the driver will return an ``EPERM`` error code. When
|
||||
the decoder is already running, this command does nothing. No
|
||||
flags are defined for this command.
|
||||
been started yet, the driver will return an ``EPERM`` error code. When
|
||||
the decoder is already running, this command does nothing. No
|
||||
flags are defined for this command.
|
||||
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@ call.
|
||||
|
||||
- ``type``
|
||||
|
||||
-
|
||||
-
|
||||
- Type of the event, see :ref:`event-type`.
|
||||
|
||||
- .. row 2
|
||||
@ -61,12 +61,12 @@ call.
|
||||
|
||||
- ``u``
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 3
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_event_vsync <v4l2-event-vsync>`
|
||||
|
||||
- ``vsync``
|
||||
@ -75,7 +75,7 @@ call.
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>`
|
||||
|
||||
- ``ctrl``
|
||||
@ -84,7 +84,7 @@ call.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
|
||||
|
||||
- ``frame_sync``
|
||||
@ -93,7 +93,7 @@ call.
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
|
||||
|
||||
- ``motion_det``
|
||||
@ -102,7 +102,7 @@ call.
|
||||
|
||||
- .. row 7
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_event_src_change <v4l2-event-src-change>`
|
||||
|
||||
- ``src_change``
|
||||
@ -111,13 +111,13 @@ call.
|
||||
|
||||
- .. row 8
|
||||
|
||||
-
|
||||
-
|
||||
- __u8
|
||||
|
||||
- ``data``\ [64]
|
||||
|
||||
- Event data. Defined by the event type. The union should be used to
|
||||
define easily accessible type for events.
|
||||
define easily accessible type for events.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -125,7 +125,7 @@ call.
|
||||
|
||||
- ``pending``
|
||||
|
||||
-
|
||||
-
|
||||
- Number of pending events excluding this one.
|
||||
|
||||
- .. row 10
|
||||
@ -134,10 +134,10 @@ call.
|
||||
|
||||
- ``sequence``
|
||||
|
||||
-
|
||||
-
|
||||
- Event sequence number. The sequence number is incremented for
|
||||
every subscribed event that takes place. If sequence numbers are
|
||||
not contiguous it means that events have been lost.
|
||||
every subscribed event that takes place. If sequence numbers are
|
||||
not contiguous it means that events have been lost.
|
||||
|
||||
- .. row 11
|
||||
|
||||
@ -145,10 +145,10 @@ call.
|
||||
|
||||
- ``timestamp``
|
||||
|
||||
-
|
||||
-
|
||||
- Event timestamp. The timestamp has been taken from the
|
||||
``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2,
|
||||
use :c:func:`clock_gettime(2)`.
|
||||
``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2,
|
||||
use :c:func:`clock_gettime(2)`.
|
||||
|
||||
- .. row 12
|
||||
|
||||
@ -156,10 +156,10 @@ call.
|
||||
|
||||
- ``id``
|
||||
|
||||
-
|
||||
-
|
||||
- The ID associated with the event source. If the event does not
|
||||
have an associated ID (this depends on the event type), then this
|
||||
is 0.
|
||||
have an associated ID (this depends on the event type), then this
|
||||
is 0.
|
||||
|
||||
- .. row 13
|
||||
|
||||
@ -167,9 +167,9 @@ call.
|
||||
|
||||
- ``reserved``\ [8]
|
||||
|
||||
-
|
||||
-
|
||||
- Reserved for future extensions. Drivers must set the array to
|
||||
zero.
|
||||
zero.
|
||||
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ call.
|
||||
- 0
|
||||
|
||||
- All events. V4L2_EVENT_ALL is valid only for
|
||||
VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
|
||||
VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -197,8 +197,8 @@ call.
|
||||
- 1
|
||||
|
||||
- This event is triggered on the vertical sync. This event has a
|
||||
struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated
|
||||
with it.
|
||||
struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated
|
||||
with it.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -207,8 +207,8 @@ call.
|
||||
- 2
|
||||
|
||||
- This event is triggered when the end of a stream is reached. This
|
||||
is typically used with MPEG decoders to report to the application
|
||||
when the last of the MPEG stream has been decoded.
|
||||
is typically used with MPEG decoders to report to the application
|
||||
when the last of the MPEG stream has been decoded.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -217,28 +217,28 @@ call.
|
||||
- 3
|
||||
|
||||
- This event requires that the ``id`` matches the control ID from
|
||||
which you want to receive events. This event is triggered if the
|
||||
control's value changes, if a button control is pressed or if the
|
||||
control's flags change. This event has a struct
|
||||
:ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it.
|
||||
This struct contains much of the same information as struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
|
||||
:ref:`v4l2_control <v4l2-control>`.
|
||||
which you want to receive events. This event is triggered if the
|
||||
control's value changes, if a button control is pressed or if the
|
||||
control's flags change. This event has a struct
|
||||
:ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it.
|
||||
This struct contains much of the same information as struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
|
||||
:ref:`v4l2_control <v4l2-control>`.
|
||||
|
||||
If the event is generated due to a call to
|
||||
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
|
||||
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
|
||||
event will *not* be sent to the file handle that called the ioctl
|
||||
function. This prevents nasty feedback loops. If you *do* want to
|
||||
get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
|
||||
flag.
|
||||
If the event is generated due to a call to
|
||||
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
|
||||
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
|
||||
event will *not* be sent to the file handle that called the ioctl
|
||||
function. This prevents nasty feedback loops. If you *do* want to
|
||||
get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
|
||||
flag.
|
||||
|
||||
This event type will ensure that no information is lost when more
|
||||
events are raised than there is room internally. In that case the
|
||||
struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the
|
||||
second-oldest event is kept, but the ``changes`` field of the
|
||||
second-oldest event is ORed with the ``changes`` field of the
|
||||
oldest event.
|
||||
This event type will ensure that no information is lost when more
|
||||
events are raised than there is room internally. In that case the
|
||||
struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the
|
||||
second-oldest event is kept, but the ``changes`` field of the
|
||||
second-oldest event is ORed with the ``changes`` field of the
|
||||
oldest event.
|
||||
|
||||
- .. row 5
|
||||
|
||||
@ -247,16 +247,16 @@ call.
|
||||
- 4
|
||||
|
||||
- Triggered immediately when the reception of a frame has begun.
|
||||
This event has a struct
|
||||
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
|
||||
associated with it.
|
||||
This event has a struct
|
||||
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
|
||||
associated with it.
|
||||
|
||||
If the hardware needs to be stopped in the case of a buffer
|
||||
underrun it might not be able to generate this event. In such
|
||||
cases the ``frame_sequence`` field in struct
|
||||
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not
|
||||
be incremented. This causes two consecutive frame sequence numbers
|
||||
to have n times frame interval in between them.
|
||||
If the hardware needs to be stopped in the case of a buffer
|
||||
underrun it might not be able to generate this event. In such
|
||||
cases the ``frame_sequence`` field in struct
|
||||
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not
|
||||
be incremented. This causes two consecutive frame sequence numbers
|
||||
to have n times frame interval in between them.
|
||||
|
||||
- .. row 6
|
||||
|
||||
@ -265,19 +265,19 @@ call.
|
||||
- 5
|
||||
|
||||
- This event is triggered when a source parameter change is detected
|
||||
during runtime by the video device. It can be a runtime resolution
|
||||
change triggered by a video decoder or the format change happening
|
||||
on an input connector. This event requires that the ``id`` matches
|
||||
the input index (when used with a video device node) or the pad
|
||||
index (when used with a subdevice node) from which you want to
|
||||
receive events.
|
||||
during runtime by the video device. It can be a runtime resolution
|
||||
change triggered by a video decoder or the format change happening
|
||||
on an input connector. This event requires that the ``id`` matches
|
||||
the input index (when used with a video device node) or the pad
|
||||
index (when used with a subdevice node) from which you want to
|
||||
receive events.
|
||||
|
||||
This event has a struct
|
||||
:ref:`v4l2_event_src_change <v4l2-event-src-change>`
|
||||
associated with it. The ``changes`` bitfield denotes what has
|
||||
changed for the subscribed pad. If multiple events occurred before
|
||||
application could dequeue them, then the changes will have the
|
||||
ORed value of all the events generated.
|
||||
This event has a struct
|
||||
:ref:`v4l2_event_src_change <v4l2-event-src-change>`
|
||||
associated with it. The ``changes`` bitfield denotes what has
|
||||
changed for the subscribed pad. If multiple events occurred before
|
||||
application could dequeue them, then the changes will have the
|
||||
ORed value of all the events generated.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -286,9 +286,9 @@ call.
|
||||
- 6
|
||||
|
||||
- Triggered whenever the motion detection state for one or more of
|
||||
the regions changes. This event has a struct
|
||||
:ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
|
||||
associated with it.
|
||||
the regions changes. This event has a struct
|
||||
:ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
|
||||
associated with it.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -332,9 +332,9 @@ call.
|
||||
|
||||
- ``changes``
|
||||
|
||||
-
|
||||
-
|
||||
- A bitmask that tells what has changed. See
|
||||
:ref:`ctrl-changes-flags`.
|
||||
:ref:`ctrl-changes-flags`.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -342,32 +342,32 @@ call.
|
||||
|
||||
- ``type``
|
||||
|
||||
-
|
||||
-
|
||||
- The type of the control. See enum
|
||||
:ref:`v4l2_ctrl_type <v4l2-ctrl-type>`.
|
||||
:ref:`v4l2_ctrl_type <v4l2-ctrl-type>`.
|
||||
|
||||
- .. row 3
|
||||
|
||||
- union (anonymous)
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 4
|
||||
|
||||
-
|
||||
-
|
||||
- __s32
|
||||
|
||||
- ``value``
|
||||
|
||||
- The 32-bit value of the control for 32-bit control types. This is
|
||||
0 for string controls since the value of a string cannot be passed
|
||||
using :ref:`VIDIOC_DQEVENT`.
|
||||
0 for string controls since the value of a string cannot be passed
|
||||
using :ref:`VIDIOC_DQEVENT`.
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- __s64
|
||||
|
||||
- ``value64``
|
||||
@ -380,7 +380,7 @@ call.
|
||||
|
||||
- ``flags``
|
||||
|
||||
-
|
||||
-
|
||||
- The control flags. See :ref:`control-flags`.
|
||||
|
||||
- .. row 7
|
||||
@ -389,9 +389,9 @@ call.
|
||||
|
||||
- ``minimum``
|
||||
|
||||
-
|
||||
-
|
||||
- The minimum value of the control. See struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -399,9 +399,9 @@ call.
|
||||
|
||||
- ``maximum``
|
||||
|
||||
-
|
||||
-
|
||||
- The maximum value of the control. See struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -409,9 +409,9 @@ call.
|
||||
|
||||
- ``step``
|
||||
|
||||
-
|
||||
-
|
||||
- The step value of the control. See struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
|
||||
- .. row 10
|
||||
|
||||
@ -419,9 +419,9 @@ call.
|
||||
|
||||
- ``default_value``
|
||||
|
||||
-
|
||||
-
|
||||
- The default value value of the control. See struct
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
||||
|
||||
|
||||
|
||||
@ -458,7 +458,7 @@ call.
|
||||
- ``changes``
|
||||
|
||||
- A bitmask that tells what has changed. See
|
||||
:ref:`src-changes-flags`.
|
||||
:ref:`src-changes-flags`.
|
||||
|
||||
|
||||
|
||||
@ -477,9 +477,9 @@ call.
|
||||
- ``flags``
|
||||
|
||||
- Currently only one flag is available: if
|
||||
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the
|
||||
``frame_sequence`` field is valid, otherwise that field should be
|
||||
ignored.
|
||||
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the
|
||||
``frame_sequence`` field is valid, otherwise that field should be
|
||||
ignored.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -488,7 +488,7 @@ call.
|
||||
- ``frame_sequence``
|
||||
|
||||
- The sequence number of the frame being received. Only valid if the
|
||||
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set.
|
||||
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -497,11 +497,11 @@ call.
|
||||
- ``region_mask``
|
||||
|
||||
- The bitmask of the regions that reported motion. There is at least
|
||||
one region. If this field is 0, then no motion was detected at
|
||||
all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control
|
||||
(see :ref:`detect-controls`) to assign a different region to
|
||||
each cell in the motion detection grid, then that all cells are
|
||||
automatically assigned to the default region 0.
|
||||
one region. If this field is 0, then no motion was detected at
|
||||
all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control
|
||||
(see :ref:`detect-controls`) to assign a different region to
|
||||
each cell in the motion detection grid, then that all cells are
|
||||
automatically assigned to the default region 0.
|
||||
|
||||
|
||||
|
||||
@ -520,9 +520,9 @@ call.
|
||||
- 0x0001
|
||||
|
||||
- This control event was triggered because the value of the control
|
||||
changed. Special cases: Volatile controls do no generate this
|
||||
event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
|
||||
flag set, then this event is sent as well, regardless its value.
|
||||
changed. Special cases: Volatile controls do no generate this
|
||||
event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
|
||||
flag set, then this event is sent as well, regardless its value.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -531,7 +531,7 @@ call.
|
||||
- 0x0002
|
||||
|
||||
- This control event was triggered because the control flags
|
||||
changed.
|
||||
changed.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -540,7 +540,7 @@ call.
|
||||
- 0x0004
|
||||
|
||||
- This control event was triggered because the minimum, maximum,
|
||||
step or the default value of the control changed.
|
||||
step or the default value of the control changed.
|
||||
|
||||
|
||||
|
||||
@ -559,8 +559,8 @@ call.
|
||||
- 0x0001
|
||||
|
||||
- This event gets triggered when a resolution change is detected at
|
||||
an input. This can come from an input connector or from a video
|
||||
decoder.
|
||||
an input. This can come from an input connector or from a video
|
||||
decoder.
|
||||
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- ``standards``
|
||||
|
||||
- The video standard(s) supported by the hardware. See
|
||||
:ref:`dv-bt-standards` for a list of standards.
|
||||
:ref:`dv-bt-standards` for a list of standards.
|
||||
|
||||
- .. row 8
|
||||
|
||||
@ -121,7 +121,7 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- ``capabilities``
|
||||
|
||||
- Several flags giving more information about the capabilities. See
|
||||
:ref:`dv-bt-cap-capabilities` for a description of the flags.
|
||||
:ref:`dv-bt-cap-capabilities` for a description of the flags.
|
||||
|
||||
- .. row 9
|
||||
|
||||
@ -130,7 +130,7 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- ``reserved``\ [16]
|
||||
|
||||
- Reserved for future extensions. Drivers must set the array to
|
||||
zero.
|
||||
zero.
|
||||
|
||||
|
||||
|
||||
@ -157,8 +157,8 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- ``pad``
|
||||
|
||||
- Pad number as reported by the media controller API. This field is
|
||||
only used when operating on a subdevice node. When operating on a
|
||||
video node applications must set this field to zero.
|
||||
only used when operating on a subdevice node. When operating on a
|
||||
video node applications must set this field to zero.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -167,18 +167,18 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- ``reserved``\ [2]
|
||||
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
the array to zero.
|
||||
the array to zero.
|
||||
|
||||
- .. row 4
|
||||
|
||||
- union
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 5
|
||||
|
||||
-
|
||||
-
|
||||
- struct :ref:`v4l2_bt_timings_cap <v4l2-bt-timings-cap>`
|
||||
|
||||
- ``bt``
|
||||
@ -187,12 +187,12 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
|
||||
- .. row 6
|
||||
|
||||
-
|
||||
-
|
||||
- __u32
|
||||
|
||||
- ``raw_data``\ [32]
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
|
||||
@ -211,8 +211,8 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
|
||||
- .. row 2
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -231,14 +231,14 @@ that doesn't support them will return an ``EINVAL`` error code.
|
||||
- V4L2_DV_BT_CAP_REDUCED_BLANKING
|
||||
|
||||
- CVT/GTF specific: the timings can make use of reduced blanking
|
||||
(CVT) or the 'Secondary GTF' curve (GTF).
|
||||
(CVT) or the 'Secondary GTF' curve (GTF).
|
||||
|
||||
- .. row 6
|
||||
|
||||
- V4L2_DV_BT_CAP_CUSTOM
|
||||
|
||||
- Can support non-standard timings, i.e. timings not belonging to
|
||||
the standards set in the ``standards`` field.
|
||||
the standards set in the ``standards`` field.
|
||||
|
||||
|
||||
|
||||
|
@ -86,8 +86,8 @@ introduced in Linux 2.6.21.
|
||||
- ``flags``
|
||||
|
||||
- Flags to go with the command, see :ref:`encoder-flags`. If no
|
||||
flags are defined for this command, drivers and applications must
|
||||
set this field to zero.
|
||||
flags are defined for this command, drivers and applications must
|
||||
set this field to zero.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -96,7 +96,7 @@ introduced in Linux 2.6.21.
|
||||
- ``data``\ [8]
|
||||
|
||||
- Reserved for future extensions. Drivers and applications must set
|
||||
the array to zero.
|
||||
the array to zero.
|
||||
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ introduced in Linux 2.6.21.
|
||||
- 0
|
||||
|
||||
- Start the encoder. When the encoder is already running or paused,
|
||||
this command does nothing. No flags are defined for this command.
|
||||
this command does nothing. No flags are defined for this command.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -124,18 +124,18 @@ introduced in Linux 2.6.21.
|
||||
- 1
|
||||
|
||||
- Stop the encoder. When the ``V4L2_ENC_CMD_STOP_AT_GOP_END`` flag
|
||||
is set, encoding will continue until the end of the current *Group
|
||||
Of Pictures*, otherwise encoding will stop immediately. When the
|
||||
encoder is already stopped, this command does nothing. mem2mem
|
||||
encoders will send a ``V4L2_EVENT_EOS`` event when the last frame
|
||||
has been encoded and all frames are ready to be dequeued and will
|
||||
set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of
|
||||
the capture queue to indicate there will be no new buffers
|
||||
produced to dequeue. This buffer may be empty, indicated by the
|
||||
driver setting the ``bytesused`` field to 0. Once the
|
||||
``V4L2_BUF_FLAG_LAST`` flag was set, the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code.
|
||||
is set, encoding will continue until the end of the current *Group
|
||||
Of Pictures*, otherwise encoding will stop immediately. When the
|
||||
encoder is already stopped, this command does nothing. mem2mem
|
||||
encoders will send a ``V4L2_EVENT_EOS`` event when the last frame
|
||||
has been encoded and all frames are ready to be dequeued and will
|
||||
set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of
|
||||
the capture queue to indicate there will be no new buffers
|
||||
produced to dequeue. This buffer may be empty, indicated by the
|
||||
driver setting the ``bytesused`` field to 0. Once the
|
||||
``V4L2_BUF_FLAG_LAST`` flag was set, the
|
||||
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
|
||||
but return an ``EPIPE`` error code.
|
||||
|
||||
- .. row 3
|
||||
|
||||
@ -144,9 +144,9 @@ introduced in Linux 2.6.21.
|
||||
- 2
|
||||
|
||||
- Pause the encoder. When the encoder has not been started yet, the
|
||||
driver will return an ``EPERM`` error code. When the encoder is
|
||||
already paused, this command does nothing. No flags are defined
|
||||
for this command.
|
||||
driver will return an ``EPERM`` error code. When the encoder is
|
||||
already paused, this command does nothing. No flags are defined
|
||||
for this command.
|
||||
|
||||
- .. row 4
|
||||
|
||||
@ -155,9 +155,9 @@ introduced in Linux 2.6.21.
|
||||
- 3
|
||||
|
||||
- Resume encoding after a PAUSE command. When the encoder has not
|
||||
been started yet, the driver will return an ``EPERM`` error code. When
|
||||
the encoder is already running, this command does nothing. No
|
||||
flags are defined for this command.
|
||||
been started yet, the driver will return an ``EPERM`` error code. When
|
||||
the encoder is already running, this command does nothing. No
|
||||
flags are defined for this command.
|
||||
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@ introduced in Linux 2.6.21.
|
||||
- 0x0001
|
||||
|
||||
- Stop encoding at the end of the current *Group Of Pictures*,
|
||||
rather than immediately.
|
||||
rather than immediately.
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user