|
void | GetStreamCount (DWORD *numberOfInputStreams, DWORD *numberOfOutputStreams) const |
| Retrieves the number of input and output streams.
|
|
StreamCount | GetStreamCount () const |
|
void | GetInputStreamInfo (DWORD inputStreamIndex, DWORD *flags) const |
| Retrieves information about an input stream, such as any restrictions on the number of samples per buffer, and whether the stream performs lookahead on the input data. This information never changes.
|
|
DWORD | GetInputStreamInfo (DWORD inputStreamIndex) const |
|
void | GetOutputStreamInfo (DWORD outputStreamIndex, DWORD *flags) const |
| Retrieves information about an output stream; for example, whether the stream is discardable, and whether it uses a fixed sample size. This information never changes.
|
|
DWORD | GetOutputStreamInfo (DWORD outputStreamIndex) const |
|
bool | GetInputType (DWORD inputStreamIndex, DWORD typeIndex, DMO_MEDIA_TYPE *mediaType) const |
| Retrieves a preferred media type for a specified input stream.
|
|
bool | GetOutputType (DWORD outputStreamIndex, DWORD typeIndex, DMO_MEDIA_TYPE *mediaType) const |
| Retrieves a preferred media type for a specified output stream.
|
|
bool | SetInputType (DWORD inputStreamIndex, const DMO_MEDIA_TYPE *mediaType, DWORD flags=0) const |
| Sets the media type on an input stream, or tests whether a media type is acceptable.
|
|
bool | IsValidInputType (DWORD inputStreamIndex, const DMO_MEDIA_TYPE *mediaType) |
|
void | ClearInputType (DWORD inputStreamIndex) |
|
bool | SetOutputType (DWORD outputStreamIndex, const DMO_MEDIA_TYPE *mediaType, DWORD flags) const |
| Sets the media type on an output stream, or tests whether a media type is acceptable.
|
|
bool | IsValidOutputType (DWORD outputStreamIndex, const DMO_MEDIA_TYPE *mediaType) |
|
void | ClearOutputType (DWORD outputStreamIndex) |
|
bool | GetInputCurrentType (DWORD inputStreamIndex, DMO_MEDIA_TYPE *mediaType) const |
| Retrieves the media type that was set for an input stream, if any.
|
|
bool | GetOutputCurrentType (DWORD outputStreamIndex, DMO_MEDIA_TYPE *mediaType) const |
|
void | GetInputSizeInfo (DWORD iputStreamIndex, DWORD *size, DWORD *maxLookahead, DWORD *alignment) const |
|
void | GetOutputSizeInfo (DWORD outputStreamIndex, DWORD *size, DWORD *alignment) const |
|
void | GetInputMaxLatency (DWORD inputStreamIndex, REFERENCE_TIME *maxLatency) const |
|
void | SetInputMaxLatency (DWORD inputStreamIndex, REFERENCE_TIME maxLatency) const |
|
void | Flush () const |
|
void | Discontinuity (DWORD inputStreamIndex) const |
|
void | AllocateStreamingResources () const |
|
void | FreeStreamingResources () const |
|
void | GetInputStatus (DWORD inputStreamIndex, DWORD *flags) const |
|
void | ProcessInput (DWORD inputStreamIndex, IMediaBuffer *buffer, DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME timelength) const |
|
void | ProcessOutput (DWORD flags, DWORD outputBufferCount, DMO_OUTPUT_DATA_BUFFER *outputBuffers, DWORD *status) const |
|
void | Lock (LONG lock) const |
|
constexpr | Unknown () noexcept |
|
| Unknown (IUnknown *unknown, bool addref=false) noexcept |
|
| Unknown (REFIID iid, const Unknown &unknown, bool throwIfNoInterface=true) |
|
| Unknown (const Unknown &other) noexcept |
|
| Unknown (Unknown &&other) noexcept |
|
| ~Unknown () noexcept |
|
constexpr | operator bool () const noexcept |
|
Unknown & | operator= (const Unknown &other) noexcept |
|
Unknown & | operator= (Unknown &&other) noexcept |
|
void | swap (Unknown &other) noexcept |
|
void | ResetPtr (IUnknown *other=nullptr, bool addRef=false) noexcept |
|
Unknown & | operator= (nullptr_t) |
|
IUnknown * | Detach () |
|
template<typename T >
requires std::is_base_of_v<Unknown, T > |
T | As () const |
|
template<typename T >
requires std::is_base_of_v<Unknown, T> |
bool | Is () const noexcept |
|
template<typename T >
requires std::is_base_of_v<IUnknown, T> |
ComPtr< T > | As () const |
|
template<typename T >
requires std::is_base_of_v<IUnknown, T> |
bool | Is () const noexcept |
| This function can be used to detect if an object supports a particular COM interface derived from IUnknown.
|
|
template<typename T = IUnknown> |
T * | GetInterfacePointer () const noexcept |
|
bool | QueryInterface (REFIID riid, void **itf) const |
| Queries a COM object for a pointer to one of its interface; identifying the interface by a reference to its interface identifier (IID). If the COM object implements the interface, then it returns a pointer to that interface after calling IUnknown::AddRef on it.
|
|
template<typename T >
requires std::is_base_of_v<IUnknown, T> |
bool | QueryInterface (T **itf) const |
|
constexpr bool | operator== (const Unknown &other) const noexcept |
|
constexpr bool | operator!= (const Unknown &other) const noexcept |
|
constexpr bool | operator== (const IUnknown *other) const noexcept |
|
constexpr bool | operator!= (const IUnknown *other) const noexcept |
|
The MediaObject class provides functions for manipulating a Microsoft DirectX Media Object.
bool Harlinn::Windows::Media::MediaObject::GetInputType |
( |
DWORD | inputStreamIndex, |
|
|
DWORD | typeIndex, |
|
|
DMO_MEDIA_TYPE * | mediaType ) const |
|
inline |
Retrieves a preferred media type for a specified input stream.
- Parameters
-
inputStreamIndex | Zero-based index of an input stream |
typeIndex | Zero-based index on the set of acceptable media types. |
mediaType | Pointer to a DMO_MEDIA_TYPE structure allocated by the caller, or nullptr. If this parameter is non-NULL, the method fills the structure with the media type. You can use the value NULL to test whether the type index is in range, by checking the return code. |
- Returns
- true on success, or false if the typeIndex is out of range.
Call this method to enumerate an input stream's preferred media types. The DMO assigns each media type an index value in order of preference. The most preferred type has an index of zero. To enumerate all the types, make successive calls while incrementing the type index until the method returns false. The DMO is not guaranteed to enumerate every media type that it supports.
The format block in the returned type might be NULL. If so, the format type is GUID_NULL. Check the format type before dereferencing the format block.
If the method succeeds, call MoFreeMediaType to free the format block. (This function is also safe to call when the format block is NULL.)
To set the media type, call the MediaObject::SetInputType method. Setting the media type on one stream can change another stream's preferred types. In fact, a stream might not have a preferred type until the type is set on another stream. For example, a decoder might not have a preferred output type until the input type is set. However, the DMO is not required to update its preferred types dynamically in this fashion. Thus, the types returned by this method are not guaranteed to be valid; they might fail when used in the SetInputType method.
To test whether a particular media type is acceptable, call SetInputType with the DMO_SET_TYPEF_TEST_ONLY flag.
To test whether the typeIndex parameter is in range, set mediaType to NULL. The method returns true if the index is in range, or false if the index is out of range.
bool Harlinn::Windows::Media::MediaObject::GetOutputType |
( |
DWORD | outputStreamIndex, |
|
|
DWORD | typeIndex, |
|
|
DMO_MEDIA_TYPE * | mediaType ) const |
|
inline |
Retrieves a preferred media type for a specified output stream.
- Parameters
-
outputStreamIndex | Zero-based index of an output stream |
typeIndex | Zero-based index on the set of acceptable media types. |
mediaType | Pointer to a DMO_MEDIA_TYPE structure allocated by the caller, or NULL. If this parameter is non-NULL, the method fills the structure with the media type. You can use the value NULL to test whether the type index is in range, by checking the return code. |
- Returns
- true on success, or false if the typeIndex is out of range.
Call this method to enumerate an output stream's preferred media types. The DMO assigns each media type an index value, in order of preference. The most preferred type has an index of zero. To enumerate all the types, make successive calls while incrementing the type index, until the method returns false. The DMO is not guaranteed to enumerate every media type that it supports.
The format block in the returned type might be NULL. If so, the format type is GUID_NULL. You should check the format type before dereferencing the format block.
If the method succeeds, call MoFreeMediaType to free the format block. (This function is also safe to call when the format block is NULL.)
To set the media type, call the MediaObject::SetOutputType method. Setting the media type on one stream can change another stream's preferred types. In fact, a stream might not have a preferred type until the type is set on another stream. For example, a decoder might not have a preferred output type until the input type is set. However, the DMO is not required to update its preferred types dynamically in this fashion. Thus, the types returned by this method are not guaranteed to be valid; they might fail when used in the SetOutputType method.
To test whether a particular media type is acceptable, call SetOutputType with the DMO_SET_TYPEF_TEST_ONLY flag.
To test whether the typeIndex parameter is in range, set mediaType to NULL. The method returns true if the index is in range, or false if the index is out of range.