1 /* GStreamer encoding profile registry
2 * Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
3 * (C) 2010 Nokia Corporation
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.
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.
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.
21 #ifndef __GST_PROFILE_REGISTRY_H__
22 #define __GST_PROFILE_REGISTRY_H__
24 #include <gst/pbutils/encoding-profile.h>
31 * Should encoding categories be well-known strings/quarks ?
36 * GST_ENCODING_CATEGORY_DEVICE:
38 * #GstEncodingTarget category for device-specific targets.
39 * The name of the target will usually be the constructor and model of the device,
40 * and that target will contain #GstEncodingProfiles suitable for that device.
42 #define GST_ENCODING_CATEGORY_DEVICE "device"
45 * GST_ENCODING_CATEGORY_ONLINE_SERVICE:
47 * #GstEncodingTarget category for online-services.
48 * The name of the target will usually be the name of the online service
49 * and that target will contain #GstEncodingProfiles suitable for that online
53 #define GST_ENCODING_CATEGORY_ONLINE_SERVICE "online-service"
56 * GST_ENCODING_CATEGORY_STORAGE_EDITING:
58 * #GstEncodingTarget category for storage, archiving and editing targets.
59 * Those targets can be lossless and/or provide very fast random access content.
60 * The name of the target will usually be the container type or editing target,
61 * and that target will contain #GstEncodingProfiles suitable for editing or
64 #define GST_ENCODING_CATEGORY_STORAGE_EDITING "storage-editing"
67 * GST_ENCODING_CATEGORY_CAPTURE:
69 * #GstEncodingTarget category for recording and capture.
70 * Targets within this category are optimized for low latency encoding.
72 #define GST_ENCODING_CATEGORY_CAPTURE "capture"
77 * Collection of #GstEncodingProfile for a specific target or use-case.
79 * When being stored/loaded, targets come from a specific category, like
80 * #GST_ENCODING_CATEGORY_DEVICE.
84 #define GST_TYPE_ENCODING_TARGET \
85 (gst_encoding_target_get_type ())
86 #define GST_ENCODING_TARGET(obj) \
87 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_TARGET, GstEncodingTarget))
88 #define GST_IS_ENCODING_TARGET(obj) \
89 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_TARGET))
91 typedef struct _GstEncodingTarget GstEncodingTarget;
92 typedef GstMiniObjectClass GstEncodingTargetClass;
94 GType gst_encoding_target_get_type (void);
97 * gst_encoding_target_unref:
98 * @target: a #GstEncodingTarget
100 * Decreases the reference count of the @target, possibly freeing it.
104 #define gst_encoding_target_unref(target) \
105 (gst_mini_object_unref ((GstMiniObject*) target))
108 * gst_encoding_target_ref:
109 * @target: a #GstEncodingTarget
111 * Increases the reference count of the @target.
115 #define gst_encoding_target_ref(target) \
116 (gst_mini_object_ref ((GstMiniObject*) target))
119 gst_encoding_target_new (const gchar *name, const gchar *category,
120 const gchar *description, const GList *profiles);
121 const gchar *gst_encoding_target_get_name (GstEncodingTarget *target);
122 const gchar *gst_encoding_target_get_category (GstEncodingTarget *target);
123 const gchar *gst_encoding_target_get_description (GstEncodingTarget *target);
124 const GList *gst_encoding_target_get_profiles (GstEncodingTarget *target);
125 GstEncodingProfile *gst_encoding_target_get_profile (GstEncodingTarget *target,
129 gst_encoding_target_add_profile (GstEncodingTarget *target, GstEncodingProfile *profile);
131 gboolean gst_encoding_target_save (GstEncodingTarget *target,
133 gboolean gst_encoding_target_save_to_file (GstEncodingTarget *target,
134 const gchar *filepath,
136 GstEncodingTarget *gst_encoding_target_load (const gchar *name,
137 const gchar *category,
139 GstEncodingTarget *gst_encoding_target_load_from_file (const gchar *filepath,
142 GList *gst_encoding_list_available_categories (void);
143 GList *gst_encoding_list_all_targets (const gchar * categoryname);
147 #endif /* __GST_PROFILE_REGISTRY_H__ */