1 /* GStreamer
2  *
3  * Copyright (C) 2016 Igalia
4  *
5  * Authors:
6  *  Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
7  *  Javier Martin <javiermartin@by.com.es>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  */
25 
26 #ifndef __GST_KMS_UTILS_H__
27 #define __GST_KMS_UTILS_H__
28 
29 #include <gst/video/video.h>
30 
31 G_BEGIN_DECLS
32 
33 GstVideoFormat gst_video_format_from_drm (guint32 drmfmt);
34 guint32        gst_drm_format_from_video (GstVideoFormat fmt);
35 guint32        gst_drm_bpp_from_drm (guint32 drmfmt);
36 guint32        gst_drm_height_from_drm (guint32 drmfmt, guint32 height);
37 GstCaps *      gst_kms_sink_caps_template_fill (void);
38 void           gst_video_calculate_device_ratio (guint dev_width,
39 						 guint dev_height,
40 						 guint dev_width_mm,
41 						 guint dev_height_mm,
42 						 guint * dpy_par_n,
43 						 guint * dpy_par_d);
44 
45 G_END_DECLS
46 
47 #endif
48