Crate linux_video_core

Source
Expand description

§Core Linux V4L2 API for Rust (core)

github crate docs MIT CI

This crates intended to provide access to Linux V4L2 APIs without any limitations.

The primary design goal is an optimal balance between safety and overhead. The implementation much closer to system calls than v4l. Interface types wraps kernel types to avoid unnecessary copying.

At end this is my demure attempt to do things right.

§Crates

This crate provides low-level bindings and does not intended to end-users.

Modules§

private

Structs§

Area
Area data
Audio
AudioCapabilityFlag
AudioOut
AutoFocusStatus
BandModulation
BtTimings
BtTimingsCap
Buffer
BufferCapabilityFlag
BufferData
BufferFlag
BufferRef
Capability
CapabilityFlag
CaptureParm
ChipFlag
ChipMatch
Clip
Control
CreateBuffers
Crop
CropCap
CtrlEnumFlag
CtrlFlag
DbgChipInfo
DbgMatch
DbgRegister
DecCmdFlag
DecoderCmd
DecoderCmdUnionRaw
DecoderCmdUnionStart
DecoderCmdUnionStop
DvBtCapabilityFlag
DvBtStd
Timings standards
DvFlag
DvSyncPol
Polarities
DvTimings
DvTimingsCap
Edid
EncCmdFlag
EncIdx
EncIdxEntry
EncoderCmd
EncoderCmdUnionRaw
EnumDvTimings
Error
The error type for I/O operations of the Read, Write, Seek, and associated traits.
Event
EventCtrl
EventCtrlChangeFlag
EventFrameSync
EventMotionDet
EventMotionDetFlag
EventSrcChange
EventSrcChangeFlag
EventSubFlag
EventSubscription
EventVsync
ExportBuffer
ExtControl
ExtControls
FlashFault
FmtDesc
Format description
FmtFlag
Format
Stream data format
Fract
Fraction value
FrameBuffer
FrameBufferCapabilityFlag
FrameBufferFlag
FrameBufferFmt
Frequency
FrequencyBand
FrmIvalEnum
Frame interval description
FrmIvalStepwise
Stepwise frame interval
FrmSizeEnum
Frame size description
FrmSizeIter
FrmSizeStepwise
Stepwise frame sizes
FwhtFlag
FwhtParams
H264DecodeParamFlag
H264DecodeParams
H264DpbEntry
H264DpbEntryFlag
H264Pps
H264PpsFlag
H264PredWeights
H264Reference
H264ScalingMatrix
H264SliceFlag
H264SliceParams
H264Sps
H264SpsConstraintFlag
H264SpsFlag
H264WeightFactors
Hdr10CllInfo
Hdr10Mastering
Hdr10MasteringDisplay
HwFreqSeek
In
Capture (input direction)
Input
InputCapabilityFlag
InputStatusFlag
IoCapabilityFlag
JpegCompression
JpegMarker
Lock
MemoryFlag
MenuItem
Helper type to represent menu item
MetaFormat
Metadata format definition
Mmap
Memory mapping
Modulator
Mpeg2PicFlag
Mpeg2Picture
Mpeg2Quantisation
Mpeg2SeqFlag
Mpeg2Sequence
MpegVbiFmtIvtv
MpegVbiITV0
MpegVbiItv0
MpegVbiItv0Line
Out
Render (output direction)
Output
OutputCapabilityFlag
OutputParm
PixFmtFlag
PixFormat
Single-planar pixel format
PixFormatMplane
Multiplanar format definition
Plane
PlanePixFormat
Per-plane format definition
QueryCtrl
QueryExtCtrl
QueryMenu
QueueData
RdsBlockFlag
RdsData
Rect
Rectangle data
RequestBuffers
SdrFormat
SDR format definition
Selection
SelectionFlag
SlicedVbiCap
SlicedVbiData
SlicedVbiFormat
SlicedVbiType
Standard
StdId
StreamParm
TimeCode
Time code
TimeCodeFlag
TimeCodeUserBits
Tuner
TunerCapabilityFlag
TunerModeFlag
TunerSubFlag
UserPtr
Userspace pointer
Value
Control value
Values
Control values
VbiFlags
VbiFormat
VersionTriple
Version numbers
Vp8Entropy
Vp8EntropyCoderState
Vp8Frame
Vp8FrameFlag
Vp8LoopFilter
Vp8Quantization
Vp8Segment
Vp8SegmentFlag
Vp9CompressedHdr
Vp9Frame
Vp9FrameFlag
Vp9LoopFilter
Vp9LoopFilterFlag
Vp9MvProbs
Vp9Quantization
Vp9Segmentation
Vp9SegmentationFlag
Vp9SignBias
Window

Enums§

AudioMode
AutoFocusRange
AutoNPresentWhiteBalance
BufferType
CameraOrientation
CidMpegVideoHevcLoopFilterMode
CidMpegVideoHevcRefreshType
CidMpegVideoHevcSizeOfLengthField
ColorFx
ColorSpace
Colorspace enum
ContentType
Buffer content type
CtrlBase
CtrlClass
CtrlId
CtrlType
DecCmd
DecStartFmt
Deempasis
DetectMdMode
DvFormat
DvItContentType
DvRgbRange
DvTimingsType
DvTxMode
EncCmd
EncIdxFrame
EventType
ExposureAutoType
ExposureMetering
Field
FlashLedMode
FlashStrobeSource
FourCc
FrmIvalType
FrmSizeType
FwhtVersion
H264Ref
H264SliceType
HsvEncoding
InputType
IoMode
IsoSensitivityAutoType
JpegActiveMarker
JpegChromaSubsampling
Memory
Mpeg2Pic
Mpeg2PicCodingType
MpegAudioAc3Bitrate
MpegAudioCrc
MpegAudioDecPlayback
MpegAudioEmphasis
MpegAudioEncoding
MpegAudioL1Bitrate
MpegAudioL2Bitrate
MpegAudioL3Bitrate
MpegAudioMode
MpegAudioModeExtension
MpegAudioSamplingFreq
MpegCx2341xVideoChromaSpatialFilterType
MpegCx2341xVideoLumaSpatialFilterType
MpegCx2341xVideoMedianFilterType
MpegCx2341xVideoTemporalFilterMode
MpegMfc51VideoForceFrameSkipMode
MpegMfc51VideoForceFrameType
MpegStreamType
MpegStreamVbiFmt
MpegVbiIvtvType
MpegVideoAspect
MpegVideoBitrateMode
MpegVideoEncoding
MpegVideoFrameSkipMode
MpegVideoH264EntropyMode
MpegVideoH264FmoChangeDir
MpegVideoH264FmoMapType
MpegVideoH264HierCodingType
MpegVideoH264Level
MpegVideoH264Profile
MpegVideoH264SeiFpArrangementType
MpegVideoH264VuiSarIdc
MpegVideoHeaderMode
MpegVideoHevcHierCodingType
MpegVideoHevcLevel
MpegVideoHevcProfile
MpegVideoHevcTier
MpegVideoLoopFilterMode
MpegVideoMpeg2Level
MpegVideoMpeg2Profile
MpegVideoMpeg4Level
MpegVideoMpeg4Profile
MpegVideoMultiSliceMode
MpegVideoVp8Profile
MpegVideoVp9Level
MpegVideoVp9Profile
OutputType
PowerLineFrequency
Preemphasis
Priority
Quantization
The default for R’G’B’ quantization is always full range. For Y’CbCr the quantization is always limited range, except for ColorSpace::Jpeg: this is full range.
SceneMode
SelectionTarget
StatelessH264DecodeMode
StatelessH264StartCode
TimeCodeType
Timestamp
TimestampSrc
TunerType
Vp8GoldenFrameSel
Vp8NumPartitions
Vp8NumRefFrames
Vp9InterpFilter
Vp9ReferenceMode
Vp9ResetFrameCtx
Vp9SegmentationLevel
Vp9TxMode
XferFunc
Mapping of XferFunc::Default to actual transfer functions for the various colorspaces
YcbcrEncoding
Mapping of YcbcrEncoding::Default to actual encodings for the various colorspaces

Constants§

CID_MAX_CTRLS
CID_PRIVATE_BASE
CTRL_CLASS_MPEG
CTRL_ID_MASK
CTRL_MAX_DIMS
CTRL_WHICH_CUR_VAL
CTRL_WHICH_DEF_VAL
CTRL_WHICH_REQUEST_VAL
ENC_IDX_ENTRIES
H264_NUM_DPB_ENTRIES
H264_REF_LIST_LEN
PIX_FMT_PRIV_MAGIC
VBI_ITU_525_F1_START
VBI_ITU_525_F2_START
VBI_ITU_625_F1_START
VBI_ITU_625_F2_START
VIDEO_MAX_FRAME
VIDEO_MAX_PLANES
VP8_COEFF_PROB_CNT
VP8_MV_PROB_CNT
VP9_NUM_FRAME_CTX
VP9_PROFILE_MAX
VP9_SEGMENT_FEATURE_ENABLED_MASK

Traits§

Direction
Direction types
GetValue
IsEventData
IsFormatData
Format data types
IsFrmIvalData
IsFrmSizeData
IsPlainCtrlData
Plain control value types
IsStreamParm
Stream parameter types
IsTimestamp
Something which can be used as timestamp
Method
I/O method types
MutValue
RefValue
SetValue

Type Aliases§

FrmIvalDiscrete
Discrete frame interval
FrmSizeDiscrete
Discrete frame size
Result
A specialized Result type for I/O operations.