2019-12-03 11:35:06 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2019> Seungha Yang <seungha.yang@navercorp.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_D3D11_COLOR_CONVERTER_H__
|
|
|
|
#define __GST_D3D11_COLOR_CONVERTER_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/video/video.h>
|
2020-12-20 17:47:45 +00:00
|
|
|
#include <gst/d3d11/gstd3d11.h>
|
2019-12-03 11:35:06 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _GstD3D11ColorConverter GstD3D11ColorConverter;
|
|
|
|
|
|
|
|
GstD3D11ColorConverter * gst_d3d11_color_converter_new (GstD3D11Device * device,
|
|
|
|
GstVideoInfo * in_info,
|
|
|
|
GstVideoInfo * out_info);
|
|
|
|
|
2020-08-01 11:16:52 +00:00
|
|
|
GstD3D11ColorConverter * gst_d3d11_color_converter_new_with_alpha (GstD3D11Device * device,
|
|
|
|
GstVideoInfo * in_info,
|
|
|
|
GstVideoInfo * out_info,
|
|
|
|
gfloat alpha);
|
|
|
|
|
2019-12-03 11:35:06 +00:00
|
|
|
void gst_d3d11_color_converter_free (GstD3D11ColorConverter * converter);
|
|
|
|
|
|
|
|
gboolean gst_d3d11_color_converter_convert (GstD3D11ColorConverter * converter,
|
|
|
|
ID3D11ShaderResourceView *srv[GST_VIDEO_MAX_PLANES],
|
2020-06-02 16:20:41 +00:00
|
|
|
ID3D11RenderTargetView *rtv[GST_VIDEO_MAX_PLANES],
|
|
|
|
ID3D11BlendState *blend,
|
|
|
|
gfloat blend_factor[4]);
|
2019-12-03 11:35:06 +00:00
|
|
|
|
2019-12-24 06:54:57 +00:00
|
|
|
gboolean gst_d3d11_color_converter_convert_unlocked (GstD3D11ColorConverter * converter,
|
|
|
|
ID3D11ShaderResourceView *srv[GST_VIDEO_MAX_PLANES],
|
2020-06-02 16:20:41 +00:00
|
|
|
ID3D11RenderTargetView *rtv[GST_VIDEO_MAX_PLANES],
|
|
|
|
ID3D11BlendState *blend,
|
|
|
|
gfloat blend_factor[4]);
|
2019-12-24 06:54:57 +00:00
|
|
|
|
2020-06-02 15:46:13 +00:00
|
|
|
gboolean gst_d3d11_color_converter_update_viewport (GstD3D11ColorConverter * converter,
|
|
|
|
D3D11_VIEWPORT * viewport);
|
2019-12-03 13:54:26 +00:00
|
|
|
|
2020-06-02 15:46:13 +00:00
|
|
|
gboolean gst_d3d11_color_converter_update_src_rect (GstD3D11ColorConverter * converter,
|
|
|
|
RECT * src_rect);
|
2020-03-07 09:29:20 +00:00
|
|
|
|
2020-06-02 15:59:15 +00:00
|
|
|
gboolean gst_d3d11_color_converter_update_dest_rect (GstD3D11ColorConverter * converter,
|
|
|
|
RECT * dest_rect);
|
|
|
|
|
2019-12-03 11:35:06 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_D3D11_COLOR_CONVERTER_H__ */
|