2.6.4 IBMDStreamingMutableVideoEncodingMode Interface¶
The IBMDStreamingMutableVideoEncodingMode
interface represents a mutable streaming video encoding mode.
Methods are provided to set video codec settings and audio codec settings. Use this interface if you wish to perform cropping or scaling of the input video frame, adjust the video or audio bit rate and to change other video or audio codec settings.
Interface |
Interface ID |
Description |
---|---|---|
IID_IBMDStreamingVideoEncodingMode |
|
|
IID_IBMDStreamingVideoEncodingMode |
|
2.6.4.1 IBMDStreamingMutableVideoEncodingMode::SetSourceRect method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetSourceRect(uint32_t posX, uint32_t posY, uint32_t width, uint32_t height);¶
The SetSourceRect method sets the source rectangle used for encoding video.
Cropping of the input video frame can be achieved by using a source rectangle that is different to the input video frame dimensions.
When no source rectangle is set, the source rectangle of the parent
IBMDStreamingVideoEncodingMode
interface will be used by the encoder.- Parameters:
posX – X coordinate of source rectangle origin.
posY – Y coordinate of source rectangle origin.
width – Width of source rectangle.
height – Height of source rectangle.
- Return values:
S_OK – Success
2.6.4.2 IBMDStreamingMutableVideoEncodingMode::SetDestSize method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetDestSize(uint32_t width, uint32_t height);¶
The SetDestSize method sets the destination rectangle used for encoding video.
When the destination rectangle size is set to a different size to the source rectangle size, scaling will be performed by the encoder.
When no destination rectangle size is set, the destination rectangle size of the parent
IBMDStreamingVideoEncodingMode
interface will be used by the encoder.- Parameters:
width – Width of destination rectangle.
height – Height of destination rectangle.
- Return values:
S_OK – Success
2.6.4.3 IBMDStreamingMutableVideoEncodingMode::SetFlag method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetFlag(BMDStreamingEncodingModePropertyID cfgID, Boolean value);¶
The SetFlag method sets a boolean value into the configuration setting associated with the given
BMDStreamingEncodingModePropertyID
.- Parameters:
cfgID – The ID of the configuration setting.
value – The boolean value to set into the selected configuration setting.
- Return values:
E_INVALIDARG – One or more parameters are invalid.
E_FAIL – Failure
S_OK – Success
2.6.4.4 IBMDStreamingMutableVideoEncodingMode::SetInt method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetInt(BMDStreamingEncodingModePropertyID cfgID, int64_t value);¶
The SetInt method sets an integer value into the configuration setting associated with the given
BMDStreamingEncodingModePropertyID
.- Parameters:
cfgID – The ID of the configuration setting.
value – The integer value to set into the selected configuration setting.
- Return values:
E_INVALIDARG – One or more parameters are invalid.
E_FAIL – Failure
S_OK – Success
2.6.4.5 IBMDStreamingMutableVideoEncodingMode::SetFloat method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetFloat(BMDStreamingEncodingModePropertyID cfgID, double value);¶
The SetFloat method sets a double value into the configuration setting associated with the given
BMDStreamingEncodingModePropertyID
.- Parameters:
cfgID – The ID of the configuration setting.
value – The double value to set into the selected configuration setting.
- Return values:
E_INVALIDARG – One or more parameters are invalid.
E_FAIL – Failure
S_OK – Success
2.6.4.6 IBMDStreamingMutableVideoEncodingMode::SetString method¶
-
HRESULT IBMDStreamingMutableVideoEncodingMode::SetString(BMDStreamingEncodingModePropertyID cfgID, string value);¶
The SetString method sets a string value into the configuration setting associated with the given
BMDStreamingEncodingModePropertyID
.- Parameters:
cfgID – The ID of the configuration setting.
value – The string value to set into the selected configuration setting.
- Return values:
E_INVALIDARG – One or more parameters are invalid.
E_FAIL – Failure
S_OK – Success