Expand description
This low-level crate used by openh264 contains
- a fully self-contained version of OpenH264
- alternatively, a libloading wrapper around precompiled OpenH264 binaries
unsafe
Rust bindings- build logic that should work “out of the box” on most platforms (sans bugs)
Modules§
- source
- API surface using built-in source.
Structs§
- ISVC
Decoder Vtbl - ISVC
Encoder Vtbl - SFrameBS
Info - @brief Frame bit stream info
- SLTR
Config - @brief Structure for LTR configuration
- SLTR
Marking Feedback - @brief Structure for LTR marking feedback
- SLTR
Recover Request - @brief Structure for LTR recover request
- SLayerBS
Info - @brief Bitstream inforamtion of a layer being encoded
- SRate
Thresholds - @brief thresholds of the initial, maximal and minimal rate
- SSlice
Argument - @brief Structure for slice argument
- SSpatial
Layer Config - @brief Structure for spatial layer configuration
- SVideo
Property - @brief Define a new struct to show the property of video bitstream.
- Slice
Information - @brief Information of coded Slice(=NAL)(s)
- Source_
Picture_ s - @brief Structure for source picture
- TagBitrate
Info - @brief Structure for bit rate info
- TagBuffer
Info - @brief Buffer info
- TagDecoder
Capability - @brief The capability of decoder, for SDP negotiation
- TagDelivery
Status - @brief Structure for dilivery status
- TagDump
Layer - @brief Structure for dump layer info
- TagEnc
Param Base - @brief SVC Encoding Parameters
- TagEnc
Param Ext - @brief SVC Encoding Parameters extention
- TagLevel
Info - @brief Structure for level info in layer
- TagParser
BsInfo - @brief Structure for parse only output
- TagProfile
Info - @brief Structure for profile info in layer
- TagSVC
Decoding Param - @brief SVC Decoding Parameters, reserved here and potential applicable in the future
- TagSys
MemBuffer - @brief Structure for decoder memery
- TagVideo
Decoder Statistics - @brief Structure for decoder statistics
- TagVideo
Encoder Statistics - @brief Structure for encoder statistics
- TagVui
SarInfo - @brief Structure for sample aspect ratio (SAR) info in VUI
- _tag
Version - @brief Struct of OpenH264 version / /// /// E.g. SDK version is 1.2.0.0, major version number is 1, minor version number is 2, and revision number is 0.
Enums§
- DynamicAPI
- Convenience wrapper around
libloading
andsource
API surfaces. - Error
Constants§
- ASP_1x1
- ASP_
10x11 - ASP_
12x11 - ASP_
15x11 - ASP_
16x11 - ASP_
18x11 - ASP_
20x11 - ASP_
24x11 - ASP_
32x11 - ASP_
40x33 - ASP_
64x33 - ASP_
80x33 - ASP_
160x99 - ASP_
EXT_ SAR - ASP_
UNSPECIFIED - AUTO_
REF_ PIC_ COUNT - AVERAGE_
RTP_ PAYLOAD_ LEN - CAMERA_
VIDEO_ NON_ REAL_ TIME - CAMERA_
VIDEO_ REAL_ TIME - < camera video for real-time communication
- CM_
BT709 - CM_
BT470BG - CM_
BT2020C - CM_
BT2020NC - CM_FCC
- CM_GBR
- CM_
NUM_ ENUM - CM_
RESERVE D3 - CM_
SMPT E170M - CM_
SMPT E240M - CM_
UNDEF - CM_
YCGCO - CONSTANT_
ID - < constant id in SPS/PPS
- CP_
BT709 - CP_
BT470BG - CP_
BT470M - CP_
BT2020 - CP_FILM
- CP_
NUM_ ENUM - CP_
RESERVE D0 - CP_
RESERVE D3 - CP_
SMPT E170M - CP_
SMPT E240M - CP_
UNDEF - DEBLOCKING_
IDC_ 0 - DEBLOCKING_
IDC_ 1 - DEBLOCKING_
IDC_ 2 - DEBLOCKING_
OFFSET - DEBLOCKING_
OFFSET_ MINUS - DECODER_
OPTION_ END_ OF_ STREAM - < end of stream flag
- DECODER_
OPTION_ ERROR_ CON_ IDC - < indicate decoder error concealment method
- DECODER_
OPTION_ FRAME_ NUM - < feedback current decoded frame number
- DECODER_
OPTION_ GET_ SAR_ INFO - < feedback decoder Sample Aspect Ratio info in Vui
- DECODER_
OPTION_ GET_ STATISTICS - < feedback decoder statistics
- DECODER_
OPTION_ IDR_ PIC_ ID - < feedback current frame belong to which IDR period
- DECODER_
OPTION_ IS_ REF_ PIC - < feedback current frame is ref pic or not
- DECODER_
OPTION_ LEVEL - < get current AU level info,only is used in GetOption
- DECODER_
OPTION_ LTR_ MARKED_ FRAME_ NUM - < feedback frame num marked by current Frame
- DECODER_
OPTION_ LTR_ MARKING_ FLAG - < feedback wether current frame mark a LTR
- DECODER_
OPTION_ NUM_ OF_ FRAMES_ REMAINING_ IN_ BUFFER - < number of frames remaining in decoder buffer when pictures are required to re-ordered into display-order.
- DECODER_
OPTION_ NUM_ OF_ THREADS - < number of decoding threads. The maximum thread count is equal or less than lesser of (cpu core counts and 16).
- DECODER_
OPTION_ PROFILE - < get current AU profile info, only is used in GetOption
- DECODER_
OPTION_ STATISTICS_ LOG_ INTERVAL - < set log output interval
- DECODER_
OPTION_ TEMPORAL_ ID - < feedback temporal id for application layer
- DECODER_
OPTION_ TRACE_ CALLBACK - < a void ()(void context, int level, const char* message) function which receives log messages
- DECODER_
OPTION_ TRACE_ CALLBACK_ CONTEXT - < context info of trace callbac
- DECODER_
OPTION_ TRACE_ LEVEL - DECODER_
OPTION_ VCL_ NAL - < feedback whether or not have VCL NAL in current AU for application layer
- ENCODER_
LTR_ MARKING_ FEEDBACK - ENCODER_
LTR_ MARKING_ PERIOD - ENCODER_
LTR_ RECOVERY_ REQUEST - ENCODER_
OPTION_ BITRATE - ENCODER_
OPTION_ BITS_ VARY_ PERCENTAGE - < bit vary percentage
- ENCODER_
OPTION_ COMPLEXITY - ENCODER_
OPTION_ CURRENT_ PATH - ENCODER_
OPTION_ DATAFORMAT - ENCODER_
OPTION_ DELIVERY_ STATUS - < the delivery info which is a feedback from app level
- ENCODER_
OPTION_ DUMP_ FILE - < dump layer reconstruct frame to a specified file
- ENCODER_
OPTION_ ENABLE_ PREFIX_ NAL_ ADDING - < enable prefix: true–enable prefix; false–disable prefix
- ENCODER_
OPTION_ ENABLE_ SSEI - < enable SSEI: true–enable ssei; false–disable ssei
- ENCODER_
OPTION_ FRAME_ RATE - < maximal input frame rate, current supported range: MAX_FRAME_RATE = 30,MIN_FRAME_RATE = 1
- ENCODER_
OPTION_ GET_ STATISTICS - < read only
- ENCODER_
OPTION_ IDR_ INTERVAL - < IDR period,0/-1 means no Intra period (only the first frame); lager than 0 means the desired IDR period, must be multiple of (2^temporal_layer)
- ENCODER_
OPTION_ INTER_ SPATIAL_ PRED - ENCODER_
OPTION_ IS_ LOSSLESS_ LINK - < advanced algorithmetic settings
- ENCODER_
OPTION_ LEVEL - < assgin the level for each layer
- ENCODER_
OPTION_ LTR - < 0:disable LTR;larger than 0 enable LTR; LTR number is fixed to be 2 in current encoder
- ENCODER_
OPTION_ MAX_ BITRATE - ENCODER_
OPTION_ NUMBER_ REF - < the number of refererence frame
- ENCODER_
OPTION_ PROFILE - < assgin the profile for each layer
- ENCODER_
OPTION_ RC_ FRAME_ SKIP - ENCODER_
OPTION_ RC_ MODE - ENCODER_
OPTION_ SPS_ PPS_ ID_ STRATEGY - < different stategy in adjust ID in SPS/PPS: 0- constant ID, 1-additional ID, 6-mapping and additional
- ENCODER_
OPTION_ STATISTICS_ LOG_ INTERVAL - < log interval in millisecond
- ENCODER_
OPTION_ SVC_ ENCODE_ PARAM_ BASE - < structure of Base Param
- ENCODER_
OPTION_ SVC_ ENCODE_ PARAM_ EXT - < structure of Extension Param
- ENCODER_
OPTION_ TRACE_ CALLBACK - < a void ()(void context, int level, const char* message) function which receives log messages
- ENCODER_
OPTION_ TRACE_ CALLBACK_ CONTEXT - < context info of trace callback
- ENCODER_
OPTION_ TRACE_ LEVEL - < trace info based on the trace level
- ENCODER_
PADDING_ PADDING - < 0:disable padding;1:padding
- ERROR_
CON_ DISABLE - ERROR_
CON_ FRAME_ COPY - ERROR_
CON_ FRAME_ COPY_ CROSS_ IDR - ERROR_
CON_ SLICE_ COPY - ERROR_
CON_ SLICE_ COPY_ CROSS_ IDR - ERROR_
CON_ SLICE_ COPY_ CROSS_ IDR_ FREEZE_ RES_ CHANGE - ERROR_
CON_ SLICE_ MV_ COPY_ CROSS_ IDR - ERROR_
CON_ SLICE_ MV_ COPY_ CROSS_ IDR_ FREEZE_ RES_ CHANGE - ET_
FEC_ FULL - < Forward Error Correction in 100% redundency mode
- ET_
FEC_ HALF - < Forward Error Correction in 50% redundency mode
- ET_FMO
- < Flexible Macroblock Ordering
- ET_
IP_ SCALE - < IP Scalable
- ET_
IR_ R1 - < Intra Refresh in predifined 2% MB
- ET_
IR_ R2 - < Intra Refresh in predifined 5% MB
- ET_
IR_ R3 - < Intra Refresh in predifined 10% MB
- ET_NONE
- < NONE Error Tools
- ET_RFS
- < Reference Frame Selection
- FEEDBACK_
NON_ VCL_ NAL - FEEDBACK_
UNKNOWN_ NAL - FEEDBACK_
VCL_ NAL - FRAME_
NUM_ IDR - FRAME_
NUM_ PARAM_ SET - HIGH_
COMPLEXITY - < high complexity, lowest speed, high quality
- IDR_
RECOVERY_ REQUEST - INCREASING_
ID - < SPS/PPS id increases at each IDR
- INPUT_
CONTENT_ TYPE_ ALL - LEVEL_
1_ 0 - LEVEL_
1_ 1 - LEVEL_
1_ 2 - LEVEL_
1_ 3 - LEVEL_
1_ B - LEVEL_
2_ 0 - LEVEL_
2_ 1 - LEVEL_
2_ 2 - LEVEL_
3_ 0 - LEVEL_
3_ 1 - LEVEL_
3_ 2 - LEVEL_
4_ 0 - LEVEL_
4_ 1 - LEVEL_
4_ 2 - LEVEL_
5_ 0 - LEVEL_
5_ 1 - LEVEL_
5_ 2 - LEVEL_
UNKNOWN - LOW_
COMPLEXITY - < the lowest compleixty,the fastest speed,
- LTR_
MARKING_ FAILED - LTR_
MARKING_ SUCCESS - LTR_
RECOVERY_ REQUEST - MAX_
LAYER_ NUM_ OF_ FRAME - MAX_
NAL_ UNITS_ IN_ LAYER - MAX_
QUALITY_ LAYER_ NUM - MAX_
RTP_ PAYLOAD_ LEN - MAX_
SLICES_ NUM_ TMP - MAX_
SPATIAL_ LAYER_ NUM - MAX_
TEMPORAL_ LAYER_ NUM - MEDIUM_
COMPLEXITY - < medium complexity, medium speed,medium quality
- NAL_PPS
- NAL_
PRIORITY_ DISPOSABLE - NAL_
PRIORITY_ HIGH - NAL_
PRIORITY_ HIGHEST - NAL_
PRIORITY_ LOW - NAL_SEI
- < ref_idc == 0
- NAL_
SLICE - NAL_
SLICE_ DPA - NAL_
SLICE_ DPB - NAL_
SLICE_ DPC - NAL_
SLICE_ IDR - < ref_idc != 0
- NAL_SPS
- NAL_
UNKNOWN - NON_
VIDEO_ CODING_ LAYER - NO_
LTR_ MARKING_ FEEDBACK - NO_
RECOVERY_ REQUSET - PRO_
BASELINE - PRO_
CAVL C444 - PRO_
EXTENDED - PRO_
HIGH - PRO_
HIGH10 - PRO_
HIGH422 - PRO_
HIGH444 - PRO_
MAIN - PRO_
SCALABLE_ BASELINE - PRO_
SCALABLE_ HIGH - PRO_
UNKNOWN - RC_
BITRATE_ MODE - < bitrate mode
- RC_
BITRATE_ MODE_ POST_ SKIP - < this is in-building RC MODE, WILL BE DELETED after algorithm tuning!
- RC_
BUFFERBASED_ MODE - < no bitrate control,only using buffer status,adjust the video quality
- RC_
OFF_ MODE - < rate control off mode
- RC_
QUALITY_ MODE - < quality mode
- RC_
TIMESTAMP_ MODE - SAVED_
NALUNIT_ NUM_ TMP - SCREEN_
CONTENT_ NON_ REAL_ TIME - SCREEN_
CONTENT_ REAL_ TIME - < screen content signal
- SM_
FIXEDSLCNUM_ SLICE - < | according to SliceNum | enabled dynamic slicing for multi-thread
- SM_
RASTER_ SLICE - < | according to SlicesAssign | need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
- SM_
RESERVED - SM_
SINGLE_ SLICE - < | SliceNum==1
- SM_
SIZELIMITED_ SLICE - < | according to SliceSize | slicing according to size, the slicing will be dynamic(have no idea about slice_nums until encoding current frame)
- SPATIAL_
LAYER_ 0 - SPATIAL_
LAYER_ 1 - SPATIAL_
LAYER_ 2 - SPATIAL_
LAYER_ 3 - SPATIAL_
LAYER_ ALL - SPS_
LISTING - < using SPS in the existing list if possible
- SPS_
LISTING_ AND_ PPS_ INCREASING - SPS_
PPS_ LISTING - TRC_
BT709 - TRC_
BT470BG - TRC_
BT470M - TRC_
BT1361E - TRC_
BT2020_ 10 - TRC_
BT2020_ 12 - TRC_
IEC61966_ 2_ 1 - TRC_
IEC61966_ 2_ 4 - TRC_
LINEAR - TRC_
LOG100 - TRC_
LOG316 - TRC_
NUM_ ENUM - TRC_
RESERVE D0 - TRC_
RESERVE D3 - TRC_
SMPT E170M - TRC_
SMPT E240M - TRC_
UNDEF - UNSPECIFIED_
BIT_ RATE - VF_
COMPONENT - VF_MAC
- VF_NTSC
- VF_
NUM_ ENUM - VF_PAL
- VF_
SECAM - VF_
UNDEF - VIDEO_
BITSTREAM_ AVC - VIDEO_
BITSTREAM_ DEFAULT - VIDEO_
BITSTREAM_ SVC - VIDEO_
CODING_ LAYER - WELS_
LOG_ DEBUG - < debug log, critical algo log
- WELS_
LOG_ DEFAULT - < default log iLevel in Wels codec
- WELS_
LOG_ DETAIL - < per packet/frame log
- WELS_
LOG_ ERROR - < error log iLevel
- WELS_
LOG_ INFO - < information log iLevel
- WELS_
LOG_ LEVEL_ COUNT - WELS_
LOG_ QUIET - < quiet mode
- WELS_
LOG_ RESV - < resversed log iLevel
- WELS_
LOG_ WARNING - < Warning log iLevel
- __
bool_ true_ false_ are_ defined - cmInit
Expected - < initial action is expected
- cmInit
Para Error - < parameters are invalid
- cmMalloc
Meme Error - < malloc a memory error
- cmResult
Success - < successful
- cmUnknown
Reason - cmUnsupported
Data - dsBitstream
Error - < error bitstreams(maybe broken internal frame) the decoder cared
- dsData
Error Concealed - < current data error concealed specified
- dsDep
Layer Lost - < dependented layer is ever lost
- dsDst
BufNeed Expan - < actual picture size exceeds size of dst pBuffer feed in decoder, so need expand its size
- dsError
Free - < bit stream error-free
- dsFrame
Pending - < need more throughput to generate a frame output,
- dsInitial
OptExpected - < initializing operation is expected
- dsInvalid
Argument - < invalid argument specified
- dsNo
Param Sets - < no parameter set NALs involved
- dsOut
OfMemory - < out of memory due to new request
- dsRef
List Null Ptrs - <ref picure list contains null ptrs within uiRefCount range
- dsRef
Lost - < layer lost at reference frame with temporal id 0
- false_
- true_
- video
FormatABGR - video
FormatARGB - video
FormatBGR - video
FormatBGRA - video
Format I420 - < the same as IYUV
- video
Format Internal - < only used in SVC decoder testbed
- video
FormatN V12 - < new format for output by DXVA decoding
- video
FormatRGB - < rgb color formats
- video
FormatRG B555 - video
FormatRG B565 - video
FormatRGBA - video
FormatUYVY - video
FormatV Flip - video
FormatYU Y2 - < yuv color formats
- video
FormatY V12 - video
FormatYVYU - video
Frame TypeI - < I frame type
- video
Frame TypeIDR - < IDR frame in H.264
- video
Frame TypeIP Mixed - < a frame where I and P slices are mixing, not supported yet
- video
Frame Type Invalid - < encoder not ready or parameters are invalidate
- video
Frame TypeP - < P frame type
- video
Frame Type Skip - < skip the frame based encoder kernel
Statics§
- kiKey
NumMultiple ⚠ - @brief In a GOP, multiple of the key frame number, derived from the number of layers(index or array below)
Traits§
- API
- Abstraction over
source
orlibloading
APIs.
Type Aliases§
- CM_
RETURN - @brief Enumerate return type
- DECODER_
OPTION - @brief Option types introduced in decoder application
- DECODING_
STATE - @brief Decoding status
- ECOMPLEXITY_
MODE - @brief Enumulate the complexity mode
- EColor
Matrix - @brief Enumerate the type of color matrix
- EColor
Primaries - @brief Enumerate the type of color primaries
- ELevel
Idc - @brief Enumerate the type of level id
- ENCODER_
OPTION - @brief Option types introduced in SVC encoder application
- ENal
Priority - @brief NRI: eNalRefIdc
- ENal
Unit Type - @brief Enumulate the nal unit type
- EParameter
SetStrategy - @brief Enumulate for the stategy of SPS/PPS strategy
- EProfile
Idc - @brief Enumerate the type of profile id
- ERROR_
CON_ IDC - @brief Enumerate the type of error concealment methods
- ERR_
TOOL - ESample
Aspect Ratio - @brief Enumerate the type of sample aspect ratio
- ETransfer
Characteristics - @brief Enumerate the type of transfer characteristics
- EUsage
Type - @brief Encoder usage type
- EVideo
FormatSPS - @brief Enumerate the type of video format
- EVideo
Format Type - @brief Enumerate the type of video format
- EVideo
Frame Type - @brief Enumerate video frame type
- FEEDBACK_
VCL_ NAL_ IN_ AU - @brief Feedback that whether or not have VCL NAL in current AU
- ISVC
Decoder - ISVC
Encoder - KEY_
FRAME_ REQUEST_ TYPE - @brief Enumerate the type of key frame request
- LAYER_
NUM - @brief Spatial layer num
- LAYER_
TYPE - @brief Type of layer being encoded
- Open
H264 Version - @brief Struct of OpenH264 version / /// /// E.g. SDK version is 1.2.0.0, major version number is 1, minor version number is 2, and revision number is 0.
- PDecoding
Param - @brief SVC Decoding Parameters, reserved here and potential applicable in the future
- PEnc
Param Base - @brief SVC Encoding Parameters
- PFrameBS
Info - @brief Frame bit stream info
- PLayerBS
Info - @brief Bitstream inforamtion of a layer being encoded
- PParser
BsInfo - @brief Structure for parse only output
- PRate
Thresholds - @brief thresholds of the initial, maximal and minimal rate
- PSlice
Info - @brief Information of coded Slice(=NAL)(s)
- PVui
SarInfo - @brief Structure for sample aspect ratio (SAR) info in VUI
- RC_
MODES - @brief Enumerate the type of rate control mode
- SBitrate
Info - @brief Structure for bit rate info
- SBuffer
Info - @brief Buffer info
- SDecoder
Capability - @brief The capability of decoder, for SDP negotiation
- SDecoder
Statistics - @brief Structure for decoder statistics
- SDecoding
Param - @brief SVC Decoding Parameters, reserved here and potential applicable in the future
- SDelivery
Status - @brief Structure for dilivery status
- SDump
Layer - @brief Structure for dump layer info
- SEnc
Param Base - @brief SVC Encoding Parameters
- SEnc
Param Ext - @brief SVC Encoding Parameters extention
- SEncoder
Statistics - @brief Structure for encoder statistics
- SLevel
Info - @brief Structure for level info in layer
- SParser
BsInfo - @brief Structure for parse only output
- SProfile
Info - @brief Structure for profile info in layer
- SSource
Picture - @brief Structure for source picture
- SSysMEM
Buffer - @brief Structure for decoder memery
- SVui
SarInfo - @brief Structure for sample aspect ratio (SAR) info in VUI
- Slice
Info - @brief Information of coded Slice(=NAL)(s)
- Slice
Mode Enum - @brief Enumerate the type of slice mode
- VIDEO_
BITSTREAM_ TYPE - @brief Enumerate the type of video bitstream which is provided to decoder
- Wels
Trace Callback - _bindgen_
ty_ 1 - @brief eDeblockingIdc
- _bindgen_
ty_ 2 - @brief to do
- _bindgen_
ty_ 3 - @brief Enumerate the type of wels log