d3d11: Update comments

Remove copy & paste mistake (this is not GstGL) and add more
description.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1374>
This commit is contained in:
Seungha Yang 2021-11-23 00:25:07 +09:00 committed by GStreamer Marge Bot
parent 5e3bf0fff7
commit ffa8aff6b1
2 changed files with 11 additions and 13 deletions

View file

@ -370,9 +370,11 @@ gst_d3d11_buffer_pool_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
GstFlowReturn ret = GST_FLOW_OK;
buf = gst_buffer_new ();
/* For texture-array case, we release memory in reset_buffer() so that it can
* be returned to allocator. So our acquire_buffer() method is expecting
* empty buffer in that case. Don't fill memory here for non-texture-array */
/* In case of texture-array, we are releasing memory objects in
* the GstBufferPool::reset_buffer() so that GstD3D11Memory objects can be
* returned to the GstD3D11PoolAllocator. So, underlying GstD3D11Memory
* will be filled in the later GstBufferPool::acquire_buffer() call.
* Don't fill memory here for non-texture-array therefore */
if (!priv->texture_array_pool) {
ret = gst_d3d11_buffer_pool_fill_buffer (self, buf);
if (ret != GST_FLOW_OK) {
@ -421,8 +423,9 @@ gst_d3d11_buffer_pool_reset_buffer (GstBufferPool * pool, GstBuffer * buffer)
GstD3D11BufferPool *self = GST_D3D11_BUFFER_POOL (pool);
GstD3D11BufferPoolPrivate *priv = self->priv;
/* if we are using texture array, return memory to allocator, so that
* memory pool allocator can wake up if it's waiting for available memory */
/* If we are using texture array, we should return GstD3D11Memory to
* to the GstD3D11PoolAllocator, so that the allocator can wake up
* if it's waiting for available memory object */
if (priv->texture_array_pool) {
GST_LOG_OBJECT (self, "Returning memory to allocator");
gst_buffer_remove_all_memory (buffer);

View file

@ -327,8 +327,9 @@ run_d3d11_context_query (GstElement * element, GstD3D11Device ** device)
}
}
/* 2) although we found d3d11 device context above, the element does not want
* to use the context. Then try to find from the other direction */
/* 2) although we found d3d11 device context above, the context might not be
* expected/wanted one by the element (e.g., belongs to the other GPU).
* Then try to find it from the other direction */
if (*device == NULL && run_query (element, query, GST_PAD_SINK)) {
gst_query_parse_context (query, &ctxt);
if (ctxt) {
@ -354,12 +355,6 @@ run_d3d11_context_query (GstElement * element, GstD3D11Device ** device)
gst_element_post_message (element, msg);
}
/*
* Whomever responds to the need-context message performs a
* GstElement::set_context() with the required context in which the element
* is required to update the display_ptr or call gst_gl_handle_set_context().
*/
gst_query_unref (query);
}