• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2013, Fluendo S.A.
3  *   Author: Andoni Morales <amorales@fluendo.com>
4  *
5  * Copyright (C) 2015, Collabora Ltd.
6  *   Author: Matthieu Bouron <matthieu.bouron@collabora.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation
11  * version 2.1 of the License.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
21  *
22  */
23 
24 #ifndef __GST_AMC_SURFACE_H__
25 #define __GST_AMC_SURFACE_H__
26 
27 #include <glib-object.h>
28 #include <jni.h>
29 #include "jni/gstamcsurfacetexture-jni.h"
30 
31 G_BEGIN_DECLS
32 
33 #define GST_TYPE_AMC_SURFACE                  (gst_amc_surface_get_type ())
34 #define GST_AMC_SURFACE(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AMC_SURFACE, GstAmcSurface))
35 #define GST_IS_AMC_SURFACE(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AMC_SURFACE))
36 #define GST_AMC_SURFACE_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AMC_SURFACE, GstAmcSurfaceClass))
37 #define GST_IS_AMC_SURFACE_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AMC_SURFACE))
38 #define GST_AMC_SURFACE_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AMC_SURFACE, GstAmcSurfaceClass))
39 
40 typedef struct _GstAmcSurface        GstAmcSurface;
41 typedef struct _GstAmcSurfaceClass   GstAmcSurfaceClass;
42 
43 struct _GstAmcSurface
44 {
45   GObject parent_instance;
46 
47   /* instance members */
48   jobject jobject;
49   GstAmcSurfaceTextureJNI *texture;
50 };
51 
52 struct _GstAmcSurfaceClass
53 {
54   GObjectClass parent_class;
55 
56   /* class members */
57   jclass jklass;
58   jmethodID constructor;
59   jmethodID is_valid;
60   jmethodID release;
61   jmethodID describe_contents;
62 };
63 
64 GType gst_amc_surface_get_type (void);
65 
66 GstAmcSurface * gst_amc_surface_new           (GstAmcSurfaceTextureJNI *texture,
67                                               GError ** err);
68 
69 gboolean gst_amc_surface_is_valid             (GstAmcSurface *surface,
70                                               gboolean * result,
71                                               GError ** err);
72 
73 gboolean gst_amc_surface_release              (GstAmcSurface *surface,
74                                               GError ** err);
75 
76 gboolean gst_amc_surface_describe_contents    (GstAmcSurface *surface,
77                                               gint * result,
78                                               GError ** err);
79 
80 G_END_DECLS
81 #endif
82