[PATCH 1/5] winegstreamer: Implement IMFMediaSource::GetCharacteristics.

Derek Lesho dlesho at codeweavers.com
Mon Nov 2 11:00:25 CST 2020


On 11/2/20 10:47 AM, Nikolay Sivov wrote:

> On 11/2/20 7:26 PM, Derek Lesho wrote:
>> Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
>> ---
>>   dlls/winegstreamer/media_source.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
>> index dbc656a24da..913b1cc9e93 100644
>> --- a/dlls/winegstreamer/media_source.c
>> +++ b/dlls/winegstreamer/media_source.c
>> @@ -1032,12 +1032,14 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO
>>   {
>>       struct media_source *source = impl_from_IMFMediaSource(iface);
>>   
>> -    FIXME("(%p)->(%p): stub\n", source, characteristics);
>> +    TRACE("(%p)->(%p)\n", source, characteristics);
>>   
>>       if (source->state == SOURCE_SHUTDOWN)
>>           return MF_E_SHUTDOWN;
>>   
>> -    return E_NOTIMPL;
>> +    *characteristics = MFMEDIASOURCE_CAN_SEEK;
>> +
>> +    return S_OK;
>>   }
>>   
>>   static HRESULT WINAPI media_source_CreatePresentationDescriptor(IMFMediaSource *iface, IMFPresentationDescriptor **descriptor)
> I think if the choice is between 0 and CAN_SEEK, it should consider
> MFBYTESTREAM_IS_SEEKABLE. Unless of course if winegstreamer code
> currently won't work for non-seekable bytestreams at all.
>
Since we are now using typefind for the input because Zebediah wanted a 
generic source, it seems that the SetCurrentPosition is used after 
typefind figures out what type of data the input is.  So if the absence 
of MFBYTESTREAM_IS_SEEKABLE means SetCurrentPosition doesn't work, then 
yeah, I don't think the current code would work with such a bytestream 
at all.  On the other hand, if MFBYTESTREAM_IS_SEEKABLE only indicates 
whether IMFByteStream::Seek is functional, then we should be fine as we 
never use that method. The documentation on this isn't clear.



More information about the wine-devel mailing list