[PATCH v2 1/5] winegstreamer: Require media source's IMFByteStream to be seekable.
Zebediah Figura
z.figura12 at gmail.com
Mon Nov 2 15:44:29 CST 2020
On 11/2/20 3:14 PM, Derek Lesho wrote:
>
> On 11/2/20 2:41 PM, Zebediah Figura wrote:
>> On 11/2/20 1:34 PM, Derek Lesho wrote:
>>> If there is ever a need to support an un-seekable bytestream, we'll
>>> have to use GstAppSrc.
>>>
>>> Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
>>> ---
>>> dlls/winegstreamer/media_source.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/dlls/winegstreamer/media_source.c
>>> b/dlls/winegstreamer/media_source.c
>>> index dbc656a24da..df5dedd484d 100644
>>> --- a/dlls/winegstreamer/media_source.c
>>> +++ b/dlls/winegstreamer/media_source.c
>>> @@ -1232,6 +1232,7 @@ static HRESULT
>>> media_source_constructor(IMFByteStream *bytestream, struct media_
>>> struct media_source *object = heap_alloc_zero(sizeof(*object));
>>> IMFStreamDescriptor **descriptors = NULL;
>>> + DWORD bytestream_caps;
>>> unsigned int i;
>>> HRESULT hr;
>>> int ret;
>>> @@ -1239,6 +1240,12 @@ static HRESULT
>>> media_source_constructor(IMFByteStream *bytestream, struct media_
>>> if (!object)
>>> return E_OUTOFMEMORY;
>>> + if (FAILED(hr = IMFByteStream_GetCapabilities(bytestream,
>>> &bytestream_caps)))
>>> + return hr;
>>> +
>>> + if (!(bytestream_caps & MFBYTESTREAM_IS_SEEKABLE))
>> As a further comment, unless this is something that Windows media
>> sources don't support either, I suspect this deserves a FIXME.
> https://stackoverflow.com/questions/41406319/source-reader-and-custom-non-seekable-byte-stream
>
>
> Seems like not all windows media sources support this.
Sure, but if even some do, I would expect that an application *might*
depend on that, enough that it's worth complaining loudly about if it
happens.
>>
>>> + return MF_E_BYTESTREAM_NOT_SEEKABLE;
>>> +
>>> object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl;
>>> object->async_commands_callback.lpVtbl =
>>> &source_async_commands_callback_vtbl;
>>> object->ref = 1;
>>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201102/b9de42e4/attachment-0001.sig>
More information about the wine-devel
mailing list