2010-08-13 15:27:52 +00:00
|
|
|
/* GStreamer encoding profile registry
|
|
|
|
* Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
|
|
* (C) 2010 Nokia Corporation
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2010-08-13 15:27:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_PROFILE_REGISTRY_H__
|
|
|
|
#define __GST_PROFILE_REGISTRY_H__
|
|
|
|
|
|
|
|
#include <gst/pbutils/encoding-profile.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
/* FIXME/UNKNOWNS
|
|
|
|
*
|
|
|
|
* Should encoding categories be well-known strings/quarks ?
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-03 12:21:26 +00:00
|
|
|
/**
|
|
|
|
* GST_ENCODING_CATEGORY_DEVICE:
|
2011-01-03 17:51:22 +00:00
|
|
|
*
|
2011-01-03 12:21:26 +00:00
|
|
|
* #GstEncodingTarget category for device-specific targets.
|
2011-09-13 19:10:43 +00:00
|
|
|
* The name of the target will usually be the constructor and model of the device,
|
2011-01-03 12:21:26 +00:00
|
|
|
* and that target will contain #GstEncodingProfiles suitable for that device.
|
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_CATEGORY_DEVICE "device"
|
2011-01-03 12:21:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ENCODING_CATEGORY_ONLINE_SERVICE:
|
2011-01-03 17:51:22 +00:00
|
|
|
*
|
2011-01-03 12:21:26 +00:00
|
|
|
* #GstEncodingTarget category for online-services.
|
|
|
|
* The name of the target will usually be the name of the online service
|
|
|
|
* and that target will contain #GstEncodingProfiles suitable for that online
|
|
|
|
* service.
|
|
|
|
*/
|
|
|
|
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_CATEGORY_ONLINE_SERVICE "online-service"
|
2011-01-03 12:21:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ENCODING_CATEGORY_STORAGE_EDITING:
|
2011-01-03 17:51:22 +00:00
|
|
|
*
|
2011-01-03 12:21:26 +00:00
|
|
|
* #GstEncodingTarget category for storage, archiving and editing targets.
|
|
|
|
* Those targets can be lossless and/or provide very fast random access content.
|
|
|
|
* The name of the target will usually be the container type or editing target,
|
|
|
|
* and that target will contain #GstEncodingProfiles suitable for editing or
|
|
|
|
* storage.
|
|
|
|
*/
|
2010-08-13 15:27:52 +00:00
|
|
|
#define GST_ENCODING_CATEGORY_STORAGE_EDITING "storage-editing"
|
2011-01-03 12:21:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ENCODING_CATEGORY_CAPTURE:
|
2011-01-03 17:51:22 +00:00
|
|
|
*
|
2011-01-03 12:21:26 +00:00
|
|
|
* #GstEncodingTarget category for recording and capture.
|
|
|
|
* Targets within this category are optimized for low latency encoding.
|
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_CATEGORY_CAPTURE "capture"
|
2010-08-13 15:27:52 +00:00
|
|
|
|
2016-12-21 15:13:38 +00:00
|
|
|
/**
|
|
|
|
* GST_ENCODING_CATEGORY_FILE_EXTENSION:
|
|
|
|
*
|
|
|
|
* #GstEncodingTarget category for file extensions.
|
|
|
|
* The name of the target will be the name of the file extensions possible
|
|
|
|
* for a particular target. Those targets are defining like 'default' formats
|
|
|
|
* usually used for a particular file extension.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define GST_ENCODING_CATEGORY_FILE_EXTENSION "file-extension"
|
|
|
|
|
2010-08-13 15:27:52 +00:00
|
|
|
/**
|
|
|
|
* GstEncodingTarget:
|
|
|
|
*
|
|
|
|
* Collection of #GstEncodingProfile for a specific target or use-case.
|
|
|
|
*
|
2011-01-03 12:21:26 +00:00
|
|
|
* When being stored/loaded, targets come from a specific category, like
|
|
|
|
* #GST_ENCODING_CATEGORY_DEVICE.
|
2010-08-13 15:27:52 +00:00
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_TYPE_ENCODING_TARGET \
|
2010-08-13 15:27:52 +00:00
|
|
|
(gst_encoding_target_get_type ())
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_TARGET(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_TARGET, GstEncodingTarget))
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_IS_ENCODING_TARGET(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_TARGET))
|
|
|
|
|
|
|
|
typedef struct _GstEncodingTarget GstEncodingTarget;
|
2011-02-23 13:12:22 +00:00
|
|
|
typedef GObjectClass GstEncodingTargetClass;
|
2010-08-13 15:27:52 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GType gst_encoding_target_get_type (void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_encoding_target_unref:
|
|
|
|
* @target: a #GstEncodingTarget
|
|
|
|
*
|
|
|
|
* Decreases the reference count of the @target, possibly freeing it.
|
|
|
|
*/
|
|
|
|
#define gst_encoding_target_unref(target) \
|
2011-02-23 13:12:22 +00:00
|
|
|
(g_object_unref ((GObject*) target))
|
2010-08-13 15:27:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_encoding_target_ref:
|
|
|
|
* @target: a #GstEncodingTarget
|
|
|
|
*
|
|
|
|
* Increases the reference count of the @target.
|
|
|
|
*/
|
|
|
|
#define gst_encoding_target_ref(target) \
|
2011-02-23 13:12:22 +00:00
|
|
|
(g_object_ref ((GObject*) target))
|
2010-08-13 15:27:52 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GstEncodingTarget * gst_encoding_target_new (const gchar *name,
|
|
|
|
const gchar *category,
|
|
|
|
const gchar *description,
|
|
|
|
const GList *profiles);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar * gst_encoding_target_get_name (GstEncodingTarget *target);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar * gst_encoding_target_get_category (GstEncodingTarget *target);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar * gst_encoding_target_get_description (GstEncodingTarget *target);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
const GList * gst_encoding_target_get_profiles (GstEncodingTarget *target);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GstEncodingProfile * gst_encoding_target_get_profile (GstEncodingTarget *target,
|
|
|
|
const gchar *name);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
gboolean gst_encoding_target_add_profile (GstEncodingTarget *target,
|
|
|
|
GstEncodingProfile *profile);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
gboolean gst_encoding_target_save (GstEncodingTarget *target,
|
|
|
|
GError **error);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
gboolean gst_encoding_target_save_to_file (GstEncodingTarget *target,
|
|
|
|
const gchar *filepath,
|
|
|
|
GError **error);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GstEncodingTarget * gst_encoding_target_load (const gchar *name,
|
|
|
|
const gchar *category,
|
|
|
|
GError **error);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GstEncodingTarget * gst_encoding_target_load_from_file (const gchar *filepath,
|
|
|
|
GError **error);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GList * gst_encoding_list_available_categories (void);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
GList * gst_encoding_list_all_targets (const gchar * categoryname);
|
2011-01-03 12:20:19 +00:00
|
|
|
|
2015-11-10 17:54:23 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingTarget, gst_object_unref)
|
|
|
|
|
2010-08-13 15:27:52 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2011-11-11 18:01:56 +00:00
|
|
|
#endif /* __GST_PROFILE_REGISTRY_H__ */
|