2.6.3 IBMDStreamingVideoEncodingMode Interface

The IBMDStreamingVideoEncodingMode interface represents a streaming video encoding mode.

The encoding mode encapsulates all the available encoder settings such as video codec settings and audio codec settings. To make changes to encoder settings use the IBMDStreamingMutableVideoEncodingMode interface obtained via the CreateMutableVideoEncodingMode method.

Related Interfaces

Interface

Interface ID

Description

IBMDStreamingMutableVideoEncodingMode

IID_IBMDStreamingMutableVideoEncodingMode

IBMDStreamingVideoEncodingMode::CreateMutableVideoEncodingMode() outputs an IBMDStreamingMutableVideoEncodingMode object interface

IBMDStreamingMutableVideoEncodingMode

IID_IBMDStreamingMutableVideoEncodingMode

IBMDStreamingMutableVideoEncodingMode subclasses IBMDStreamingVideoEncodingMode

IBMDStreamingVideoEncodingModePresetIterator

IID_IBMDStreamingVideoEncodingModePresetIterator

IBMDStreamingVideoEncodingModePresetIterator::Next() outputs an IBMDStreamingVideoEncodingMode object interface

IBMDStreamingDeviceInput

IID_IBMDStreamingDeviceInput

IBMDStreamingDeviceInput::GetVideoEncodingMode() outputs an IBMDStreamingVideoEncodingMode object interface

IBMDStreamingDeviceInput

IID_IBMDStreamingDeviceInput

IBMDStreamingDeviceInput::DoesSupportVideoEncodingMode() outputs an IBMDStreamingVideoEncodingMode object interface

2.6.3.1 IBMDStreamingVideoEncodingMode::GetName method

HRESULT IBMDStreamingVideoEncodingMode::GetName(string *name);

The GetName method returns a string describing the video encoding mode.

Parameters:

name – Video encoding name. This allocated string must be freed by the caller when no longer required.

Return values:
  • E_POINTER – The name parameter is invalid.

  • E_FAIL – Failure

  • S_OK – Success

2.6.3.2 IBMDStreamingVideoEncodingMode::GetPresetID method

unsigned int IBMDStreamingVideoEncodingMode::GetPresetID();

The GetPresetID method returns the unique ID representing the preset video mode.

Returns:

Unique ID of preset video mode.

2.6.3.3 IBMDStreamingVideoEncodingMode::GetSourcePositionX method

unsigned int IBMDStreamingVideoEncodingMode::GetSourcePositionX();

The GetSourcePositionX method returns the x coordinate of the origin of the source rectangle used for encoding video.

Returns:

The x coordindate in pixels for source rectangle origin.

2.6.3.4 IBMDStreamingVideoEncodingMode::GetSourcePositionY method

unsigned int IBMDStreamingVideoEncodingMode::GetSourcePositionY();

The GetSourcePositionY method returns the y coordinate of the origin of the source rectangle used for encoding video.

Returns:

The y coordindate in pixels for source rectangle origin.

2.6.3.5 IBMDStreamingVideoEncodingMode::GetSourceWidth method

unsigned int IBMDStreamingVideoEncodingMode::GetSourceWidth();

The GetSourceWidth method returns the width of the source rectangle used for encoding video.

Returns:

Width in pixels of the source rectangle.

2.6.3.6 IBMDStreamingVideoEncodingMode::GetSourceHeight method

unsigned int IBMDStreamingVideoEncodingMode::GetSourceHeight();

The GetSourceHeight method the height of the source rectangle used for encoding video.

Returns:

Height in pixels of the source rectangle.

2.6.3.7 IBMDStreamingVideoEncodingMode::GetDestWidth method

unsigned int IBMDStreamingVideoEncodingMode::GetDestWidth();

The GetDestWidth method returns the width of the destination rectangle used when encoding video. If the destination rectangle is different to the source rectangle the video will be scaled when encoding.

Returns:

Width in pixels of the destination rectangle.

2.6.3.8 IBMDStreamingVideoEncodingMode::GetDestHeight method

unsigned int IBMDStreamingVideoEncodingMode::GetDestHeight();

The GetDestHeight method returns the height of the destination rectangle used when encoding video. If the destination rectangle is different to the source rectangle the video will be scaled when encoding.

Returns:

Height in pixels of the destination rectangle.

2.6.3.9 IBMDStreamingVideoEncodingMode::GetFlag method

HRESULT IBMDStreamingVideoEncodingMode::GetFlag(BMDStreamingEncodingModePropertyID cfgID, Boolean *value);

The GetFlag method gets the current value of the boolean configuration setting associated with the given BMDStreamingEncodingModePropertyID.

Parameters:
Return values:
  • E_INVALIDARG – One or more parameters are invalid.

  • S_OK – Success

2.6.3.10 IBMDStreamingVideoEncodingMode::GetInt method

HRESULT IBMDStreamingVideoEncodingMode::GetInt(BMDStreamingEncodingModePropertyID cfgID, int64_t *value);

The GetInt method gets the current value of the integer configuration setting associated with the given BMDStreamingEncodingModePropertyID.

Parameters:
Return values:
  • E_INVALIDARG – One or more parameters are invalid.

  • S_OK – Success

2.6.3.11 IBMDStreamingVideoEncodingMode::GetFloat method

HRESULT IBMDStreamingVideoEncodingMode::GetFloat(BMDStreamingEncodingModePropertyID cfgID, double *value);

The GetFloat gets the current value of the double configuration setting associated with the given BMDStreamingEncodingModePropertyID.

Parameters:
Return values:
  • E_INVALIDARG – One or more parameters are invalid.

  • S_OK – Success

2.6.3.12 IBMDStreamingVideoEncodingMode::GetString method

HRESULT IBMDStreamingVideoEncodingMode::GetString(BMDStreamingEncodingModePropertyID cfgID, string *value);

The GetString current value of the string configuration setting associated with the given BMDStreamingEncodingModePropertyID.

Parameters:
  • cfgIDBMDStreamingEncodingModePropertyID to get string value for.

  • value – The value corresponding to cfgID. This allocated string must be freed by the caller when no longer required.

Return values:
  • E_INVALIDARG – One or more parameters are invalid.

  • S_OK – Success

2.6.3.13 IBMDStreamingVideoEncodingMode::CreateMutableVideoEncodingMode method

HRESULT IBMDStreamingVideoEncodingMode::CreateMutableVideoEncodingMode(IBMDStreamingMutableVideoEncodingMode **newEncodingMode);

The CreateMutableVideoEncodingMode method creates a new interface which is a mutable copy of the IBMDStreamingVideoEncodingMode interface.

IBMDStreamingMutableVideoEncodingMode is a subclass of IBMDStreamingVideoEncodingMode and inherits all its methods. It provides additional methods to change settings for the encoding of video and audio streams.

Parameters:

newEncodingMode – A new mutable encoding mode interface.

Return values:
  • E_POINTER – The newEncodingMode parameter is invalid.

  • E_OUTOFMEMORY – Unable to allocate memory for new interface.

  • S_OK – Success