2010-08-13 15:27:52 +00:00
|
|
|
/* GStreamer encoding profiles library
|
|
|
|
* Copyright (C) 2009-2010 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
|
|
* (C) 2009-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_H__
|
|
|
|
#define __GST_PROFILE_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
#include <gst/pbutils/pbutils-enumtypes.h>
|
2011-02-18 11:48:37 +00:00
|
|
|
#include <gst/pbutils/gstdiscoverer.h>
|
2010-08-13 15:27:52 +00:00
|
|
|
|
2016-04-25 12:05:36 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2010-08-13 15:27:52 +00:00
|
|
|
/**
|
|
|
|
* GstEncodingProfile:
|
|
|
|
*
|
|
|
|
* The opaque base class object for all encoding profiles. This contains generic
|
|
|
|
* information like name, description, format and preset.
|
|
|
|
*/
|
|
|
|
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_TYPE_ENCODING_PROFILE \
|
2010-08-13 15:27:52 +00:00
|
|
|
(gst_encoding_profile_get_type ())
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_PROFILE, GstEncodingProfile))
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_IS_ENCODING_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_PROFILE))
|
|
|
|
typedef struct _GstEncodingProfile GstEncodingProfile;
|
2012-03-14 14:51:22 +00:00
|
|
|
typedef struct _GstEncodingProfileClass GstEncodingProfileClass;
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GType gst_encoding_profile_get_type (void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstEncodingContainerProfile:
|
|
|
|
*
|
|
|
|
* Encoding profiles for containers. Keeps track of a list of #GstEncodingProfile
|
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_TYPE_ENCODING_CONTAINER_PROFILE \
|
2010-08-13 15:27:52 +00:00
|
|
|
(gst_encoding_container_profile_get_type ())
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_CONTAINER_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_CONTAINER_PROFILE, GstEncodingContainerProfile))
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_IS_ENCODING_CONTAINER_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_CONTAINER_PROFILE))
|
|
|
|
typedef struct _GstEncodingContainerProfile GstEncodingContainerProfile;
|
2012-03-14 14:51:22 +00:00
|
|
|
typedef struct _GstEncodingContainerProfileClass GstEncodingContainerProfileClass;
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GType gst_encoding_container_profile_get_type (void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstEncodingVideoProfile:
|
|
|
|
*
|
|
|
|
* Variant of #GstEncodingProfile for video streams, allows specifying the @pass.
|
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_TYPE_ENCODING_VIDEO_PROFILE \
|
2010-08-13 15:27:52 +00:00
|
|
|
(gst_encoding_video_profile_get_type ())
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_VIDEO_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_VIDEO_PROFILE, GstEncodingVideoProfile))
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_IS_ENCODING_VIDEO_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_VIDEO_PROFILE))
|
|
|
|
typedef struct _GstEncodingVideoProfile GstEncodingVideoProfile;
|
2012-03-14 14:51:22 +00:00
|
|
|
typedef struct _GstEncodingVideoProfileClass GstEncodingVideoProfileClass;
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GType gst_encoding_video_profile_get_type (void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstEncodingAudioProfile:
|
|
|
|
*
|
|
|
|
* Variant of #GstEncodingProfile for audio streams.
|
|
|
|
*/
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_TYPE_ENCODING_AUDIO_PROFILE \
|
2010-08-13 15:27:52 +00:00
|
|
|
(gst_encoding_audio_profile_get_type ())
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_ENCODING_AUDIO_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ENCODING_AUDIO_PROFILE, GstEncodingAudioProfile))
|
2011-11-11 18:01:56 +00:00
|
|
|
#define GST_IS_ENCODING_AUDIO_PROFILE(obj) \
|
2010-08-13 15:27:52 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ENCODING_AUDIO_PROFILE))
|
|
|
|
typedef struct _GstEncodingAudioProfile GstEncodingAudioProfile;
|
2012-03-14 14:51:22 +00:00
|
|
|
typedef struct _GstEncodingAudioProfileClass GstEncodingAudioProfileClass;
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GType gst_encoding_audio_profile_get_type (void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GstEncodingProfile API */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_encoding_profile_unref:
|
|
|
|
* @profile: a #GstEncodingProfile
|
|
|
|
*
|
|
|
|
* Decreases the reference count of the @profile, possibly freeing the @profile.
|
|
|
|
*/
|
2011-02-23 13:12:22 +00:00
|
|
|
#define gst_encoding_profile_unref(profile) (g_object_unref ((GObject*) profile))
|
2010-08-13 15:27:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_encoding_profile_ref:
|
|
|
|
* @profile: a #GstEncodingProfile
|
|
|
|
*
|
|
|
|
* Increases the reference count of the @profile.
|
|
|
|
*/
|
2011-02-23 13:12:22 +00:00
|
|
|
#define gst_encoding_profile_ref(profile) (g_object_ref ((GObject*) profile))
|
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
|
|
|
const gchar * gst_encoding_profile_get_name (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_name (GstEncodingProfile *profile,
|
|
|
|
const gchar *name);
|
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_profile_get_description (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_description (GstEncodingProfile *profile,
|
|
|
|
const gchar *description);
|
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
|
|
|
GstCaps * gst_encoding_profile_get_format (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_format (GstEncodingProfile *profile,
|
|
|
|
GstCaps *format);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2014-11-16 14:54:56 +00:00
|
|
|
gboolean gst_encoding_profile_get_allow_dynamic_output (GstEncodingProfile *profile);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2014-11-16 14:54:56 +00:00
|
|
|
void gst_encoding_profile_set_allow_dynamic_output (GstEncodingProfile *profile,
|
|
|
|
gboolean allow_dynamic_output);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2019-08-30 21:16:35 +00:00
|
|
|
GST_PBUTILS_API
|
|
|
|
gboolean gst_encoding_profile_get_single_segment (GstEncodingProfile *profile);
|
|
|
|
|
|
|
|
GST_PBUTILS_API
|
|
|
|
void gst_encoding_profile_set_single_segment (GstEncodingProfile *profile,
|
|
|
|
gboolean single_segment);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar * gst_encoding_profile_get_preset (GstEncodingProfile *profile);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2012-12-05 18:21:43 +00:00
|
|
|
const gchar * gst_encoding_profile_get_preset_name (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_preset (GstEncodingProfile *profile,
|
|
|
|
const gchar *preset);
|
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
|
|
|
guint gst_encoding_profile_get_presence (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_presence (GstEncodingProfile *profile,
|
|
|
|
guint presence);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2012-12-05 18:21:43 +00:00
|
|
|
void gst_encoding_profile_set_preset_name (GstEncodingProfile * profile,
|
|
|
|
const gchar * preset_name);
|
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
|
|
|
GstCaps * gst_encoding_profile_get_restriction (GstEncodingProfile *profile);
|
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
|
|
|
void gst_encoding_profile_set_restriction (GstEncodingProfile *profile,
|
|
|
|
GstCaps *restriction);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-11-11 18:01:56 +00:00
|
|
|
gboolean gst_encoding_profile_is_equal (GstEncodingProfile *a,
|
|
|
|
GstEncodingProfile *b);
|
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
|
|
|
GstCaps * gst_encoding_profile_get_input_caps (GstEncodingProfile *profile);
|
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_profile_get_type_nick (GstEncodingProfile *profile);
|
2010-08-13 15:27:52 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2012-12-23 15:26:59 +00:00
|
|
|
const gchar * gst_encoding_profile_get_file_extension (GstEncodingProfile * profile);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-12-22 17:18:00 +00:00
|
|
|
GstEncodingProfile * gst_encoding_profile_find (const gchar *targetname,
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar *profilename,
|
|
|
|
const gchar *category);
|
2010-12-22 17:18:00 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2015-05-07 08:26:47 +00:00
|
|
|
gboolean gst_encoding_profile_is_enabled (GstEncodingProfile *profile);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2015-05-07 08:26:47 +00:00
|
|
|
void gst_encoding_profile_set_enabled (GstEncodingProfile *profile,
|
|
|
|
gboolean enabled);
|
2010-08-13 15:27:52 +00:00
|
|
|
/* GstEncodingContainerProfile API */
|
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_container_profile_add_profile (GstEncodingContainerProfile *container,
|
|
|
|
GstEncodingProfile *profile);
|
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_container_profile_contains_profile (GstEncodingContainerProfile * container,
|
|
|
|
GstEncodingProfile *profile);
|
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_container_profile_get_profiles (GstEncodingContainerProfile *profile);
|
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
|
|
|
GstEncodingContainerProfile * gst_encoding_container_profile_new (const gchar *name,
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar *description,
|
|
|
|
GstCaps *format,
|
|
|
|
const gchar *preset);
|
2010-08-13 15:27:52 +00:00
|
|
|
|
|
|
|
|
2019-08-29 17:42:39 +00:00
|
|
|
/* Individual stream encodingprofile API */
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GstEncodingVideoProfile * gst_encoding_video_profile_new (GstCaps *format,
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar *preset,
|
|
|
|
GstCaps *restriction,
|
|
|
|
guint presence);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
GstEncodingAudioProfile * gst_encoding_audio_profile_new (GstCaps *format,
|
2011-11-11 18:01:56 +00:00
|
|
|
const gchar *preset,
|
|
|
|
GstCaps *restriction,
|
|
|
|
guint presence);
|
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
|
|
|
guint gst_encoding_video_profile_get_pass (GstEncodingVideoProfile *prof);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
gboolean gst_encoding_video_profile_get_variableframerate (GstEncodingVideoProfile *prof);
|
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
void gst_encoding_video_profile_set_pass (GstEncodingVideoProfile *prof,
|
2011-11-11 18:01:56 +00:00
|
|
|
guint pass);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2010-08-13 15:27:52 +00:00
|
|
|
void gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfile *prof,
|
2011-11-11 18:01:56 +00:00
|
|
|
gboolean variableframerate);
|
2011-02-18 11:48:37 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2011-02-18 11:48:37 +00:00
|
|
|
GstEncodingProfile * gst_encoding_profile_from_discoverer (GstDiscovererInfo *info);
|
2017-05-15 23:55:25 +00:00
|
|
|
|
2018-03-13 11:08:34 +00:00
|
|
|
GST_PBUTILS_API
|
2017-01-04 17:27:40 +00:00
|
|
|
GstEncodingProfile * gst_encoding_profile_copy (GstEncodingProfile *self);
|
2011-02-18 11:48:37 +00:00
|
|
|
|
2015-11-10 17:54:23 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingAudioProfile, gst_object_unref)
|
|
|
|
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingContainerProfile, gst_object_unref)
|
|
|
|
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingProfile, gst_object_unref)
|
|
|
|
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingVideoProfile, gst_object_unref)
|
|
|
|
|
2010-08-13 15:27:52 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_PROFILE_H__ */
|