[PATCH] mfmediaengine: Add IMFMediaEngine stub.

Jactry Zeng jzeng at codeweavers.com
Wed Sep 4 04:06:09 CDT 2019


On 4/9/2019 2:26 pm, Nikolay Sivov wrote:
> Where does this come from? Is _INVIAL a typo?
Ah, right! It should be _INVALID.
>> +
>> +struct media_engine_attributes
>> +{
>> +    IMFMediaEngineNotify *callback;
>> +    HWND playback_hwnd;
>> +    DXGI_FORMAT output_format;
>> +    IMFDXGIDeviceManager *dxgi_manager;
>> +    enum media_engine_mode mode;
>> +};
>> +
>> +struct media_engine
>> +{
>> +    IMFMediaEngine IMFMediaEngine_iface;
>> +    LONG refcount;
>> +    DWORD flags;
>> +    struct media_engine_attributes attributes;
>> +};
>> +
>
> Do you need these structures separate? You can still have init_media_engine() + heap_alloc_zero() in CreateInstance(). 

I just wanted to avoid allocating memory for a media_engine struct before we making sure attributes are valid and an IMFMediaEngine interface will be created.

I will follow your suggestion and send another try.

Thanks for the review.





More information about the wine-devel mailing list