Ocean
|
This class implements utilities functions for the Microsoft Media Foundation. More...
Data Structures | |
struct | GUIDCompare |
GUID helper struct. More... | |
Static Public Member Functions | |
static std::string | attribute2String (const GUID &attribute) |
Translates a media foundation attribute to a readable string. More... | |
static std::string | majorMediaType2String (const GUID &type) |
Translates a major media type to a readable string. More... | |
static std::string | videoSubtype2String (const GUID &type) |
Translates a video subtype to a readable string. More... | |
static std::string | unregisteredVideoSubtype2String (const GUID &type) |
Translates an unregistered video subtype to a readable string. More... | |
static std::string | audioSubtype2String (const GUID &type) |
Translates an audio subtype to a readable string. More... | |
static std::string | transformCategory2String (const GUID &category) |
Translates an transform category to a readable string. More... | |
static std::string | guid2String (const GUID &value) |
Translates the GUID key to a string. More... | |
static bool | dumpAttributes (IMFAttributes *attributes, std::string &result) |
Dumps a set of attributes to a string object. More... | |
static bool | enumerateTransforms (std::string &result) |
Enumerates the registered media foundation transforms. More... | |
static FrameType::PixelFormat | convertMediaSubtype (const GUID &mediaSubtype) |
Converts a Media Foundation media subtype to a pixel format. More... | |
static FrameType::PixelOrigin | extractPixelOrigin (const GUID &mediaSubtype) |
Returns the pixel origin of a Media Foundation media subtype. More... | |
static GUID | convertPixelFormat (const FrameType::PixelFormat pixelFormat) |
Converts a pixel format to a Media Foundation media subtype. More... | |
static ScopedIMFMediaSource | createMediaSourceByUrl (const std::wstring &url) |
Creates the media source object for a given URL. More... | |
static ScopedIMFTopologyNode | addSourceNodeToTopology (IMFTopology *topology, IMFMediaSource *mediaSource, IMFPresentationDescriptor *presentationDescriptor, IMFStreamDescriptor *streamDescriptor) |
Adds a source node to a given topology. More... | |
static ScopedIMFTopologyNode | addOutputNodeToTopology (IMFTopology *topology, IMFActivate *sinkActivate, const DWORD streamIndex=0) |
Adds an output node to a given topology. More... | |
static bool | connectSelectedStream (IMFTopology *topology, IMFMediaSource *mediaSource, IMFActivate *sinkActivate, const GUID &majorMediaType) |
Connects the selected media source with a given sink activate object. More... | |
static bool | getAllocatedString (IMFActivate *activate, const GUID &key, std::string &value) |
Returns an allocated string from an activate. More... | |
template<typename T > | |
static ScopedMediaFoundationObject< T > | topologyNodeObject (IMFTopologyNode *node) |
Extracts an object from a topology node. More... | |
template<typename T > | |
static ScopedMediaFoundationObject< T > | eventObject (IMFMediaEvent *mediaEvent) |
Extracts an object from an event. More... | |
Private Types | |
typedef std::map< GUID, std::string, GUIDCompare > | IdMap |
Definition of a map mapping GUID objects to strings. More... | |
Static Private Member Functions | |
static IdMap | guidMap () |
Returns a map mapping all GUID ids to readable strings. More... | |
static IdMap | attributeMap () |
Returns a map mapping attribute GUID ids to readable strings. More... | |
static IdMap | majorMediaTypeMap () |
Returns a map mapping major media type GUID ids to readable strings. More... | |
static IdMap | videoSubtypeMap () |
Returns a map mapping video subtype GUID ids to readable strings. More... | |
static IdMap | audioSubtypeMap () |
Returns a map mapping audio subtype GUID ids to readable strings. More... | |
static IdMap | transformCategoryMap () |
Returns a map mapping transform category GUID ids to readable strings. More... | |
This class implements utilities functions for the Microsoft Media Foundation.
|
private |
Definition of a map mapping GUID objects to strings.
|
static |
Adds an output node to a given topology.
topology | The topology to that the node will be added, must be valid |
sinkActivate | Sink activate object, must be valid |
streamIndex | Stream index |
|
static |
Adds a source node to a given topology.
topology | The topology to that the node will be added, must be valid |
mediaSource | Media source object, must be valid |
presentationDescriptor | Presentation descriptor, must be valid |
streamDescriptor | Stream descriptor, must be valid |
|
static |
Translates a media foundation attribute to a readable string.
attribute | The attribute to be translated |
|
staticprivate |
Returns a map mapping attribute GUID ids to readable strings.
|
static |
Translates an audio subtype to a readable string.
type | The type to be translated |
|
staticprivate |
Returns a map mapping audio subtype GUID ids to readable strings.
|
static |
Connects the selected media source with a given sink activate object.
topology | The topology that will receive the connection, must be valid |
mediaSource | The media source object, must be valid |
sinkActivate | The sink activate object, must be valid |
majorMediaType | Major media type |
|
static |
|
static |
|
static |
Creates the media source object for a given URL.
The resulting object has to be released by the caller.
url | URL for that the media source object will be returned |
|
static |
Dumps a set of attributes to a string object.
attributes | The attributes to dump |
result | Resulting dump |
|
static |
Enumerates the registered media foundation transforms.
result | The resulting enumerated transforms |
|
static |
Extracts an object from an event.
mediaEvent | Media event from that the object will be extracted, must be valid |
T | Data type of the desired object |
|
static |
|
static |
Returns an allocated string from an activate.
activate | The activate from which the string will be returned, must be valid |
key | The key identifying which value to retrieve, must be valid |
value | The resulting string value @reutrn True, if succeeded |
|
static |
Translates the GUID key to a string.
value | The value to be translated |
|
staticprivate |
Returns a map mapping all GUID ids to readable strings.
|
static |
Translates a major media type to a readable string.
type | The type to be translated |
|
staticprivate |
Returns a map mapping major media type GUID ids to readable strings.
|
static |
Extracts an object from a topology node.
node | The node from that the object will be extracted, must be valid |
T | Data type of the desired object |
|
static |
Translates an transform category to a readable string.
category | The category to be translated |
|
staticprivate |
Returns a map mapping transform category GUID ids to readable strings.
|
static |
Translates an unregistered video subtype to a readable string.
type | The type to be translated |
|
static |
Translates a video subtype to a readable string.
type | The type to be translated |
|
staticprivate |
Returns a map mapping video subtype GUID ids to readable strings.