mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
d3d11: Rename native handle getter and context utils functions
Make them consistent with cuda context utils functions. Put in-only parameter before all in-out parameters, and add _handle() suffix to native handle getter functions.
This commit is contained in:
parent
d3426cf15b
commit
494ec13316
6 changed files with 14 additions and 14 deletions
|
@ -592,7 +592,7 @@ gst_d3d11_device_new (gint adapter)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_d3d11_device_get_device:
|
||||
* gst_d3d11_device_get_device_handle:
|
||||
* @device: a #GstD3D11Device
|
||||
*
|
||||
* Used for various D3D11 APIs directly.
|
||||
|
@ -601,7 +601,7 @@ gst_d3d11_device_new (gint adapter)
|
|||
* Returns: (transfer none): the ID3D11Device
|
||||
*/
|
||||
ID3D11Device *
|
||||
gst_d3d11_device_get_device (GstD3D11Device * device)
|
||||
gst_d3d11_device_get_device_handle (GstD3D11Device * device)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_D3D11_DEVICE (device), NULL);
|
||||
|
||||
|
@ -609,7 +609,7 @@ gst_d3d11_device_get_device (GstD3D11Device * device)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_d3d11_device_get_device_context:
|
||||
* gst_d3d11_device_get_device_context_handle:
|
||||
* @device: a #GstD3D11Device
|
||||
*
|
||||
* Used for various D3D11 APIs directly.
|
||||
|
@ -618,7 +618,7 @@ gst_d3d11_device_get_device (GstD3D11Device * device)
|
|||
* Returns: (transfer none): the ID3D11DeviceContext
|
||||
*/
|
||||
ID3D11DeviceContext *
|
||||
gst_d3d11_device_get_device_context (GstD3D11Device * device)
|
||||
gst_d3d11_device_get_device_context_handle (GstD3D11Device * device)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_D3D11_DEVICE (device), NULL);
|
||||
|
||||
|
|
|
@ -79,9 +79,9 @@ GType gst_d3d11_device_get_type (void);
|
|||
|
||||
GstD3D11Device * gst_d3d11_device_new (gint adapter);
|
||||
|
||||
ID3D11Device * gst_d3d11_device_get_device (GstD3D11Device * device);
|
||||
ID3D11Device * gst_d3d11_device_get_device_handle (GstD3D11Device * device);
|
||||
|
||||
ID3D11DeviceContext * gst_d3d11_device_get_device_context (GstD3D11Device * device);
|
||||
ID3D11DeviceContext * gst_d3d11_device_get_device_context_handle (GstD3D11Device * device);
|
||||
|
||||
GstD3D11DXGIFactoryVersion gst_d3d11_device_get_chosen_dxgi_factory_version (GstD3D11Device * device);
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ _map_cpu_access_data (GstD3D11Device * device, gpointer data)
|
|||
ID3D11Resource *texture = (ID3D11Resource *) dmem->texture;
|
||||
ID3D11Resource *staging = (ID3D11Resource *) dmem->staging;
|
||||
ID3D11DeviceContext *device_context =
|
||||
gst_d3d11_device_get_device_context (device);
|
||||
gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
ID3D11DeviceContext_CopySubresourceRegion (device_context,
|
||||
staging, 0, 0, 0, 0, texture, 0, NULL);
|
||||
|
@ -190,7 +190,7 @@ _unmap_cpu_access_data (GstD3D11Device * device, gpointer data)
|
|||
ID3D11Resource *texture = (ID3D11Resource *) dmem->texture;
|
||||
ID3D11Resource *staging = (ID3D11Resource *) dmem->staging;
|
||||
ID3D11DeviceContext *device_context =
|
||||
gst_d3d11_device_get_device_context (device);
|
||||
gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
ID3D11DeviceContext_Unmap (device_context, staging, 0);
|
||||
|
||||
|
@ -315,7 +315,7 @@ _calculate_buffer_size (GstD3D11Device * device, CalculateSizeData * data)
|
|||
HRESULT hr;
|
||||
D3D11_MAPPED_SUBRESOURCE map;
|
||||
ID3D11DeviceContext *device_context =
|
||||
gst_d3d11_device_get_device_context (device);
|
||||
gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
hr = ID3D11DeviceContext_Map (device_context,
|
||||
(ID3D11Resource *) data->staging, 0, GST_MAP_READWRITE, 0, &map);
|
||||
|
|
|
@ -108,7 +108,7 @@ gst_d3d11_device_get_supported_caps_internal (GstD3D11Device * device,
|
|||
GValue v_list = G_VALUE_INIT;
|
||||
GstCaps *supported_caps;
|
||||
|
||||
d3d11_device = gst_d3d11_device_get_device (device);
|
||||
d3d11_device = gst_d3d11_device_get_device_handle (device);
|
||||
g_value_init (&v_list, GST_TYPE_LIST);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (gst_dxgi_format_map); i++) {
|
||||
|
|
|
@ -587,7 +587,7 @@ _upload_frame (GstD3D11Device * device, gpointer data)
|
|||
|
||||
self = upload_data->sink;
|
||||
|
||||
device_context = gst_d3d11_device_get_device_context (device);
|
||||
device_context = gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
hr = ID3D11DeviceContext_Map (device_context,
|
||||
upload_data->resource, 0, D3D11_MAP_WRITE, 0, &d3d11_map);
|
||||
|
|
|
@ -495,8 +495,8 @@ gst_d3d11_window_on_resize (GstD3D11Device * device, GstD3D11Window * window)
|
|||
if (!window->swap_chain)
|
||||
return;
|
||||
|
||||
d3d11_dev = gst_d3d11_device_get_device (device);
|
||||
d3d11_context = gst_d3d11_device_get_device_context (device);
|
||||
d3d11_dev = gst_d3d11_device_get_device_handle (device);
|
||||
d3d11_context = gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
if (window->backbuffer) {
|
||||
ID3D11Texture2D_Release (window->backbuffer);
|
||||
|
@ -1057,7 +1057,7 @@ _present_on_device_thread (GstD3D11Device * device, FramePresentData * data)
|
|||
src_box.front = 0;
|
||||
src_box.back = 1;
|
||||
|
||||
device_context = gst_d3d11_device_get_device_context (device);
|
||||
device_context = gst_d3d11_device_get_device_context_handle (device);
|
||||
|
||||
if (data->resource) {
|
||||
ID3D11DeviceContext_ClearRenderTargetView (device_context, self->rtv,
|
||||
|
|
Loading…
Reference in a new issue