[PATCH 04/17] winegstreamer: Implement ::Get(Input/Output)StreamInfo for audio conversion transform.

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Dec 3 21:30:36 CST 2020


On 12/3/20 3:55 PM, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
> ---
> v1(v6): Made naming and style of the two functions consistent.
> ---
>  dlls/winegstreamer/audioconvert.c | 23 +++++++++++++++++++----
>  1 file changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
> index 631c57d6d55..d204d9582ba 100644
> --- a/dlls/winegstreamer/audioconvert.c
> +++ b/dlls/winegstreamer/audioconvert.c
> @@ -123,16 +123,31 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in
>  
>  static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
>  {
> -    FIXME("%p %u %p.\n", iface, id, info);
> +    TRACE("%p %u %p.\n", iface, id, info);
>  
> -    return E_NOTIMPL;
> +    if (id != 0)
> +        return MF_E_INVALIDSTREAMNUMBER;
> +
> +    info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_DOES_NOT_ADDREF;
> +    info->cbMaxLookahead = 0;
> +    info->cbAlignment = 0;
> +    info->hnsMaxLatency = 0;
> +

"info->cbSize" isn't set here; is that intentional?

> +    return S_OK;
>  }
>  
>  static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
>  {
> -    FIXME("%p %u %p.\n", iface, id, info);
> +    TRACE("%p %u %p.\n", iface, id, info);
>  
> -    return E_NOTIMPL;
> +    if (id != 0)
> +        return MF_E_INVALIDSTREAMNUMBER;
> +
> +    info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;

Is it intentional to provide WHOLE_SAMPLES in GetInputStreamInfo() but
not (the equivalent flag) here?

> +    info->cbSize = 0;
> +    info->cbAlignment = 0;
> +
> +    return S_OK;
>  }
>  
>  static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x0D9D358A07A17840.asc
Type: application/pgp-keys
Size: 1769 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201203/fe8b622a/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201203/fe8b622a/attachment.sig>


More information about the wine-devel mailing list