Needed for Gungrave G.O.R.E. (besides some bits in raw AAC handling).
The game is fine with GetInputStatus always returning MFT_INPUT_STATUS_ACCEPT_DATA for both h264 and aac but I think it is better to be correct here.
--
v2: winegstreamer: Set MF_SA_D3D11_AWARE attribute for h264 transform.
winegstreamer: Implement _GetInputStatus() for aac decoder transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2080
Huw Davies (@huw) commented about programs/rpcss/rpcss_main.c:
> }
>
> +/* Generates a new OXID suitable for use by an apartment.
> + * Each call to this function returns a distinct OXID.
> + * This function should not be invoked directly - use rpcss_get_new_apartment_oxid
> + * instead. */
> +HRESULT __cdecl irpcss_get_new_apartment_oxid(handle_t h, OXID *oxid)
> +{
> + HRESULT status;
> + ULONG oxid_upper_bits;
> +
> + static LONG oxid_lower_bits;
> +
> + status = I_RpcBindingInqLocalClientPID(h, &oxid_upper_bits);
> + ERR("Got client PID: %ld", oxid_upper_bits);
> + if (status != S_OK) {
Please put the opening brace on a new line.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2059#note_22594
Huw Davies (@huw) commented about programs/rpcss/rpcss_main.c:
> return S_OK;
> }
>
> +/* Generates a new OXID suitable for use by an apartment.
> + * Each call to this function returns a distinct OXID.
> + * This function should not be invoked directly - use rpcss_get_new_apartment_oxid
> + * instead. */
> +HRESULT __cdecl irpcss_get_new_apartment_oxid(handle_t h, OXID *oxid)
> +{
> + HRESULT status;
> + ULONG oxid_upper_bits;
> +
> + static LONG oxid_lower_bits;
> +
> + status = I_RpcBindingInqLocalClientPID(h, &oxid_upper_bits);
> + ERR("Got client PID: %ld", oxid_upper_bits);
This looks like it's left-over from debugging.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2059#note_22593
Huw Davies (@huw) commented about programs/rpcss/rpcss_main.c:
> return S_OK;
> }
>
> +/* Generates a new OXID suitable for use by an apartment.
> + * Each call to this function returns a distinct OXID.
> + * This function should not be invoked directly - use rpcss_get_new_apartment_oxid
> + * instead. */
> +HRESULT __cdecl irpcss_get_new_apartment_oxid(handle_t h, OXID *oxid)
> +{
> + HRESULT status;
> + ULONG oxid_upper_bits;
> +
I think we can get rid of this blank line.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2059#note_22592
Huw Davies (@huw) commented about dlls/combase/apartment.c:
>
> - if (apt->multi_threaded)
> - {
> - /* FIXME: should be randomly generated by in an RPC call to rpcss */
> - apt->oxid = ((OXID)GetCurrentProcessId() << 32) | 0xcafe;
> - }
> - else
> - {
> - /* FIXME: should be randomly generated by in an RPC call to rpcss */
> - apt->oxid = ((OXID)GetCurrentProcessId() << 32) | GetCurrentThreadId();
> - }
> + /* Get a new OXID to use for this apartment. Note that re-creating
> + * an apartment (by calling CoUninitialize and then CoInitializeEx)
> + * will result in a new OXID. This ensures that we don't re-use a
> + * proxy_manager` that refers to a dead apartment. */
> + rpcss_get_new_apartment_oxid(&apt->oxid);
We would want to test for this failing (and probably clean up and return NULL).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2059#note_22591