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.
82 #define GST_TYPE_ENCODING_TARGET \
83 (gst_encoding_target_get_type ())
84 #define GST_ENCODING_TARGET(obj) \
85 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_TARGET, GstEncodingTarget))
86 #define GST_IS_ENCODING_TARGET(obj) \
87 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_TARGET))
89 typedef struct _GstEncodingTarget GstEncodingTarget;
90 typedef GObjectClass GstEncodingTargetClass;
92 GType gst_encoding_target_get_type (void);
95 * gst_encoding_target_unref:
96 * @target: a #GstEncodingTarget
98 * Decreases the reference count of the @target, possibly freeing it.
100 #define gst_encoding_target_unref(target) \
101 (g_object_unref ((GObject*) target))
104 * gst_encoding_target_ref:
105 * @target: a #GstEncodingTarget
107 * Increases the reference count of the @target.
109 #define gst_encoding_target_ref(target) \
110 (g_object_ref ((GObject*) target))
112 GstEncodingTarget * gst_encoding_target_new (const gchar *name,
113 const gchar *category,
114 const gchar *description,
115 const GList *profiles);
117 const gchar * gst_encoding_target_get_name (GstEncodingTarget *target);
118 const gchar * gst_encoding_target_get_category (GstEncodingTarget *target);
119 const gchar * gst_encoding_target_get_description (GstEncodingTarget *target);
120 const GList * gst_encoding_target_get_profiles (GstEncodingTarget *target);
121 GstEncodingProfile * gst_encoding_target_get_profile (GstEncodingTarget *target,
124 gboolean gst_encoding_target_add_profile (GstEncodingTarget *target,
125 GstEncodingProfile *profile);
127 gboolean gst_encoding_target_save (GstEncodingTarget *target,
129 gboolean gst_encoding_target_save_to_file (GstEncodingTarget *target,
130 const gchar *filepath,
132 GstEncodingTarget * gst_encoding_target_load (const gchar *name,
133 const gchar *category,
135 GstEncodingTarget * gst_encoding_target_load_from_file (const gchar *filepath,
138 GList * gst_encoding_list_available_categories (void);
139 GList * gst_encoding_list_all_targets (const gchar * categoryname);
143 #endif /* __GST_PROFILE_REGISTRY_H__ */