Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IMediaDescriptorFactory

interface IMediaDescriptorFactory
Extends com.amazon.apmf.IStandard MediaDescriptor Module Factory Interface

Methods

createMediaConfigForVideoDecoder()

IMediaConfig* createMediaConfigForVideoDecoder()
Creates an IMediaConfig configuration object for the Video Decoder. After getting object IMediaConfig, applications need to query below interfaces to get the interfaces object for setting formats and features. Supported interfaces for Video Decoder usecase are:- IMediaFormat, IMediaCodecFeatures, IMediaFormatProfileLevel, IVideoFormat, IVideoHdrFormat,IDecoderFeatures, IVideoCodecFeatures, IVideoDecoderFeatures Various usecases of this configuration.
  1. To set the required configuration using setter APIs.
  2. check capabilities for the configuration using queryMediaCapabilities API.
Once the object is created for video decoder, all the queries to interfaces specific to audio or video encoder would return null pointer.

Returns

IMediaConfig* IMediaConfig configuration instance.

createMediaConfigForVideoEncoder()

IMediaConfig* createMediaConfigForVideoEncoder()
Creates an IMediaConfig configuration object for the Video Encoder. After getting object IMediaConfig, applications need to query below interfaces to get the interfaces object for setting formats and features. Supported interfaces for Video Encoder usecase are:- IMediaFormat, IMediaCodecFeatures, IMediaFormatProfileLevel, IVideoFormat, IEncoderFeatures,IVideoEncoderFormat, IEncoderFeatures, IVideoCodecFeatures, IVideoEncoderFeatures Various usecases of this configuration.
  1. To set the required configuration using setter APIs.
  2. check capabilities for the configuration using queryMediaCapabilities API.
Once the object is created for video encoder, all the queries to interfaces specific to audio or video decoder would return null pointer.

Returns

IMediaConfig* IMediaConfig configuration instance.

createMediaConfigForAudioDecoder()

IMediaConfig* createMediaConfigForAudioDecoder()
Creates an IMediaConfig configuration object for the Audio Decoder. After getting object IMediaConfig, applications need to query below interfaces to get the interfaces object for setting formats and features. Supported interfaces for Audio Decoder usecase are:- IMediaFormat, IMediaCodecFeatures, IMediaFormatProfileLevel, IAudioFormat IDecoderFeatures, IAudioDecoderFeatures Various usecases of this configuration.
  1. To set the required configuration using setter APIs.
  2. check capabilities for the configuration using queryMediaCapabilities API.
Once the object is created for audio decoder, all the queries to interfaces specific to video or audio encoder would return null pointer.

Returns

IMediaConfig* IMediaConfig configuration instance.

createMediaConfigForAudioEncoder()

IMediaConfig* createMediaConfigForAudioEncoder()
Creates an IMediaConfig configuration object for the Audio Encoder. After getting object IMediaConfig, applications need to query below interfaces to get the interfaces object for setting formats and features. Supported interfaces for Audio Encoder usecase are:- IMediaFormat, IMediaCodecFeatures, IMediaFormatProfileLevel, IAudioFormat, IEncoderFeatures Various usecases of this configuration.
  1. To set the required configuration using setter APIs
  2. check capabilities for the configuration using queryMediaCapabilities API.
Once the object is created for audio encoder, all the queries to interfaces specific to video or audio decoder would return null pointer.

Returns

IMediaConfig* IMediaConfig configuration instance.

queryMediaCapabilities()

IMediaCapabilities*[] queryMediaCapabilities(IMediaConfig* config)
Fetches the list of codecs supported by the required configuration. After getting the array of IMediaCapabilities’s pointer, applications may want to query available interfaces through TryQueryInterface to get all capabilities for supported codec. Supported interfaces are based on the IMediaConfig passed as argument. IMediaConfig created from createMediaConfigForVideoDecoder() and passed as an argument to queryMediaCapabilities implements TryQueryInterface on the following interfaces: IMediaFormatCapabilities, IMediaCodecFeaturesCapabilities, IMediaFormatProfileLevelCapabilities, IDecoderFeaturesCapabilities, IVideoCodecFeaturesCapabilities, IVideoDecoderFeaturesCapabilities IMediaConfig created from createMediaConfigForAudioDecoder() and passed as an argument to queryMediaCapabilities implements TryQueryInterface on the following interfaces: IMediaFormatCapabilities, IMediaCodecFeaturesCapabilities, IMediaFormatProfileLevelCapabilities, IAudioDecoderFeaturesCapabilities, IAudioFormatCapabilities, IDecoderFeaturesCapabilities IMediaConfig created from createMediaConfigForVideoEncoder() and passed as an argument to queryMediaCapabilities implements TryQueryInterface on the following interfaces: IMediaFormatCapabilities, IMediaCodecFeaturesCapabilities, IMediaFormatProfileLevelCapabilities, IVideoCodecFeaturesCapabilities, IVideoEncoderFeaturesCapabilities, IVideoFormatCapabilities IMediaConfig created from createMediaConfigForAudioEncoder() and passed as an argument to queryMediaCapabilities implements TryQueryInterface on the following interfaces: IMediaFormatCapabilities, IMediaCodecFeaturesCapabilities, IMediaFormatProfileLevelCapabilities IMediaConfig created from createMediaConfigForAudioDecryptor() (created using IMediaDescriptorFactory2) and passed as an argument to queryMediaCapabilities implements TryQueryInterface on the following interfaces: IAudioDecryptorFormatCapabilities, IAudioFormatCapabilities Various usecases of query media capabilities.
  1. check if the configuration is supported or not. if returned array size is > 0.
  2. get list of all the supported video decoder, video encoders, audio decoders or audio encoders.
  3. iterate over the list and check for particular format/feature capabilities, like hardware backed, 4k resolution support etc.
  4. saves system resources/network bandwidth by checking the capabilities prior to streaming any content.
If the passed IMediaConfig is for video decoder, all the queries to interfaces specific to audio or video encoder would return null pointer.

Parameters

config
IMediaConfig* — Required The IMediaConfig configuration object,

Returns

IMediaCapabilities*[] Array of IMediaCapabilities capabilities objects.
Last modified on October 29, 2026