86beccaf86a1143a80b345794bc061e5919c23e6
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst-libs / gst / pbutils / encoding-profile.h
1 /* GStreamer encoding profiles library
2  * Copyright (C) 2009-2010 Edward Hervey <edward.hervey@collabora.co.uk>
3  *           (C) 2009-2010 Nokia Corporation
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __GST_PROFILE_H__
22 #define __GST_PROFILE_H__
23
24 #include <gst/gst.h>
25
26 G_BEGIN_DECLS
27
28 #include <gst/pbutils/pbutils-enumtypes.h>
29
30 /**
31  * GstEncodingProfile:
32  *
33  * The opaque base class object for all encoding profiles. This contains generic
34  * information like name, description, format and preset.
35  *
36  * Since: 0.10.32
37  */
38
39 #define GST_TYPE_ENCODING_PROFILE                       \
40   (gst_encoding_profile_get_type ())
41 #define GST_ENCODING_PROFILE(obj)                       \
42   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_PROFILE, GstEncodingProfile))
43 #define GST_IS_ENCODING_PROFILE(obj)                    \
44   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_PROFILE))
45 typedef struct _GstEncodingProfile GstEncodingProfile;
46 typedef GstMiniObjectClass GstEncodingProfileClass;
47 GType gst_encoding_profile_get_type (void);
48
49
50
51 /**
52  * GstEncodingContainerProfile:
53  *
54  * Encoding profiles for containers. Keeps track of a list of #GstEncodingProfile
55  *
56  * Since: 0.10.32
57  */
58 #define GST_TYPE_ENCODING_CONTAINER_PROFILE                     \
59   (gst_encoding_container_profile_get_type ())
60 #define GST_ENCODING_CONTAINER_PROFILE(obj)                     \
61   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_CONTAINER_PROFILE, GstEncodingContainerProfile))
62 #define GST_IS_ENCODING_CONTAINER_PROFILE(obj)                  \
63   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_CONTAINER_PROFILE))
64 typedef struct _GstEncodingContainerProfile GstEncodingContainerProfile;
65 typedef GstEncodingProfileClass GstEncodingContainerProfileClass;
66 GType gst_encoding_container_profile_get_type (void);
67
68
69
70 /**
71  * GstEncodingVideoProfile:
72  *
73  * Variant of #GstEncodingProfile for video streams, allows specifying the @pass.
74  *
75  * Since: 0.10.32
76  */
77 #define GST_TYPE_ENCODING_VIDEO_PROFILE                 \
78   (gst_encoding_video_profile_get_type ())
79 #define GST_ENCODING_VIDEO_PROFILE(obj)                 \
80   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_VIDEO_PROFILE, GstEncodingVideoProfile))
81 #define GST_IS_ENCODING_VIDEO_PROFILE(obj)                      \
82   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_VIDEO_PROFILE))
83 typedef struct _GstEncodingVideoProfile GstEncodingVideoProfile;
84 typedef GstEncodingProfileClass GstEncodingVideoProfileClass;
85 GType gst_encoding_video_profile_get_type (void);
86
87
88
89 /**
90  * GstEncodingAudioProfile:
91  *
92  * Variant of #GstEncodingProfile for audio streams.
93  *
94  * Since: 0.10.32
95  */
96 #define GST_TYPE_ENCODING_AUDIO_PROFILE                 \
97   (gst_encoding_audio_profile_get_type ())
98 #define GST_ENCODING_AUDIO_PROFILE(obj)                 \
99   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_AUDIO_PROFILE, GstEncodingAudioProfile))
100 #define GST_IS_ENCODING_AUDIO_PROFILE(obj)                      \
101   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_AUDIO_PROFILE))
102 typedef struct _GstEncodingAudioProfile GstEncodingAudioProfile;
103 typedef GstEncodingProfileClass GstEncodingAudioProfileClass;
104 GType gst_encoding_audio_profile_get_type (void);
105
106
107
108 /* GstEncodingProfile API */
109
110 /**
111  * gst_encoding_profile_unref:
112  * @profile: a #GstEncodingProfile
113  *
114  * Decreases the reference count of the @profile, possibly freeing the @profile.
115  *
116  * Since: 0.10.32
117  */
118 #define gst_encoding_profile_unref(profile) (gst_mini_object_unref ((GstMiniObject*) profile))
119
120 /**
121  * gst_encoding_profile_ref:
122  * @profile: a #GstEncodingProfile
123  *
124  * Increases the reference count of the @profile.
125  *
126  * Since: 0.10.32
127  */
128 #define gst_encoding_profile_ref(profile) (gst_mini_object_ref ((GstMiniObject*) profile))
129
130 const gchar *   gst_encoding_profile_get_name(GstEncodingProfile *profile);
131 const gchar *   gst_encoding_profile_get_description(GstEncodingProfile *profile);
132 const GstCaps * gst_encoding_profile_get_format(GstEncodingProfile *profile);
133 const gchar *   gst_encoding_profile_get_preset(GstEncodingProfile *profile);
134 guint   gst_encoding_profile_get_presence(GstEncodingProfile *profile);
135 const GstCaps * gst_encoding_profile_get_restriction(GstEncodingProfile *profile);
136
137 void    gst_encoding_profile_set_name(GstEncodingProfile *profile, const gchar *name);
138 void    gst_encoding_profile_set_description(GstEncodingProfile *profile, const gchar *description);
139 void    gst_encoding_profile_set_format(GstEncodingProfile *profile, GstCaps *format);
140 void    gst_encoding_profile_set_preset(GstEncodingProfile *profile, const gchar *preset);
141 void    gst_encoding_profile_set_restriction(GstEncodingProfile *profile, GstCaps *restriction);
142 void    gst_encoding_profile_set_presence(GstEncodingProfile *profile, guint presence);
143
144 gboolean gst_encoding_profile_is_equal (GstEncodingProfile *a,
145                                         GstEncodingProfile *b);
146 GstCaps * gst_encoding_profile_get_input_caps (GstEncodingProfile *profile);
147
148 const gchar *gst_encoding_profile_get_type_nick (GstEncodingProfile *profile);
149
150 GstEncodingProfile * gst_encoding_profile_find (const gchar *targetname,
151                                                 const gchar *profilename,
152                                                 const gchar *category);
153
154 /* GstEncodingContainerProfile API */
155 gboolean  gst_encoding_container_profile_add_profile       (GstEncodingContainerProfile *container,
156                                                             GstEncodingProfile *profile);
157 gboolean  gst_encoding_container_profile_contains_profile  (GstEncodingContainerProfile * container,
158                                                             GstEncodingProfile *profile);
159 const GList *gst_encoding_container_profile_get_profiles   (GstEncodingContainerProfile *profile);
160
161
162 GstEncodingContainerProfile *  gst_encoding_container_profile_new (const gchar *name,
163                                                                    const gchar *description,
164                                                                    GstCaps *format,
165                                                                    const gchar *preset);
166
167
168 /* Invidual stream encodingprofile API */
169 GstEncodingVideoProfile * gst_encoding_video_profile_new (GstCaps *format,
170                                                           const gchar *preset,
171                                                           GstCaps *restriction,
172                                                           guint presence);
173 GstEncodingAudioProfile * gst_encoding_audio_profile_new (GstCaps *format,
174                                                           const gchar *preset,
175                                                           GstCaps *restriction,
176                                                           guint presence);
177
178 guint    gst_encoding_video_profile_get_pass              (GstEncodingVideoProfile *prof);
179 gboolean gst_encoding_video_profile_get_variableframerate (GstEncodingVideoProfile *prof);
180
181 void     gst_encoding_video_profile_set_pass              (GstEncodingVideoProfile *prof,
182                                                            guint pass);
183 void     gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfile *prof,
184                                                            gboolean variableframerate);
185 G_END_DECLS
186
187 #endif /* __GST_PROFILE_H__ */