On 11/2/20 11:00 AM, Derek Lesho wrote:
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@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.
It seems fair to assume that MFBYTESTREAM_IS_SEEKABLE also covers SetCurrentPosition(). I'd assume that flag covers all random access, and would be clear for e.g. a TCP byte stream.
[Incidentally, although this is an implementation detail, typefind does support streams which can't seek, although perhaps not very well, and it seems to need push mode.]