• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <2010> Thiago Santos <thiago.sousa.santos@collabora.co.uk>
3  * Copyright (C) <2018> Nicola Murino <nicola.murino@gmail.com>
4  *
5  * gstopencvutils.h: miscellaneous utility functions
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef __GST_OPENCV_UTILS__
24 #define __GST_OPENCV_UTILS__
25 
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29 
30 #include <gst/gst.h>
31 #include <gst/video/video.h>
32 #include <gst/opencv/opencv-prelude.h>
33 
34 G_BEGIN_DECLS
35 
36 GST_OPENCV_API
37 gboolean gst_opencv_parse_cv_mat_params_from_caps
38     (GstCaps * caps, gint * width, gint * height, int * cv_type,
39     GError ** err);
40 
41 GST_OPENCV_API
42 gboolean gst_opencv_cv_mat_params_from_video_info
43     (GstVideoInfo * info, gint * width, gint * height, int *cv_type,
44     GError ** err);
45 
46 GST_OPENCV_API
47 gboolean gst_opencv_cv_image_type_from_video_format (GstVideoFormat format,
48     int * cv_type, GError ** err);
49 
50 GST_OPENCV_API
51 GstCaps * gst_opencv_caps_from_cv_image_type (int cv_type);
52 
53 G_END_DECLS
54 
55 #endif /* __GST_OPENCV_UTILS__ */
56