On 3/23/22 16:46, Rémi Bernon wrote:
On 3/23/22 06:10, Nikolay Sivov wrote:
On 3/21/22 23:11, Rémi Bernon wrote:
static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { - FIXME("iface %p, id %#lx, info %p stub!\n", iface, id, info); - return E_NOTIMPL; + struct h264_decoder *decoder = impl_from_IMFTransform(iface);
+ TRACE("iface %p, id %#lx, info %p.\n", iface, id, info);
+ if (!decoder->input_type) + return MF_E_TRANSFORM_TYPE_NOT_SET;
+ info->hnsMaxLatency = 0; + info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE; + info->cbSize = 0x1000; + info->cbMaxLookahead = 0; + info->cbAlignment = 0;
+ return S_OK; } static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
Is it really using static size here, regardless of input stream parameters? Like frame size for example? Not sure how useful this field is in a first place for decoder input, maybe they set it to be non-zero.
Yeah I don't think it's really useful, and I'm not even sure it's actually required. Input stream parameters is really just the codec subtype, I believe H264 streams have their metadata embedded in the first packets.
FWIW choosing one input media type or the other doesn't change this value, neither does it change after the stream change event has been received. So it really looks like to be a static value.
It's maybe not very useful but I don't think it's wrong.