encoding target
On top of the notion of profiles, we implement the notion of EncodingTarget. Encoding Targets are basically a higher level of abstraction to define formats for specific target types. Those can define several GstEncodingProfiles with different names, for example one for transcoding in full HD, another one for low res, etc.. which are defined in the same encoding target.
Basically if you want to encode a stream to send it to, say, youtube you should have a Youtube encoding target defined in the "online-service" category.
Encoding target serialization format
Encoding targets are serialized in a KeyFile like files.
[GStreamer Encoding Target]
name : <name>
category : <category>
\description : <description> #translatable
[profile-<profile1name>]
name : <name>
\description : <description> #optional
format : <format>
preset : <preset>
[streamprofile-<id>]
parent : <encodingprofile.name>[,<encodingprofile.name>..]
\type : <type> # "audio", "video", "text"
format : <format>
preset : <preset>
restriction : <restriction>
presence : <presence>
pass : <pass>
variableframerate : <variableframerate>
Location of encoding target files
$GST_DATADIR/gstreamer-GST_API_VERSION/encoding-profile $HOME/gstreamer-GST_API_VERSION/encoding-profile
There also is a GST_ENCODING_TARGET_PATH environment variable defining a list of folder containing encoding target files.
Naming convention
$(target.category)/$(target.name).gep
Naming restrictions:
- lowercase ASCII letter for the first character
- Same for all other characters + numerics + hyphens
GstEncodingTarget
GObject ╰──GstEncodingTarget
Collection of GstEncodingProfile for a specific target or use-case.
When being stored/loaded, targets come from a specific category, like GST_ENCODING_CATEGORY_DEVICE.
GstPbutils.EncodingTarget
GObject.Object ╰──GstPbutils.EncodingTarget
Collection of GstPbutils.EncodingProfile for a specific target or use-case.
When being stored/loaded, targets come from a specific category, like GstPbutils.ENCODING_CATEGORY_DEVICE.
GstPbutils.EncodingTarget
GObject.Object ╰──GstPbutils.EncodingTarget
Collection of GstPbutils.EncodingProfile for a specific target or use-case.
When being stored/loaded, targets come from a specific category, like GstPbutils.ENCODING_CATEGORY_DEVICE.
Constructors
gst_encoding_target_new
GstEncodingTarget * gst_encoding_target_new (const gchar * name, const gchar * category, const gchar * description, const GList * profiles)
Creates a new GstEncodingTarget.
The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').
The category should be one of the existing well-defined categories, like GST_ENCODING_CATEGORY_DEVICE, but it can be a application or user specific category if needed.
Parameters:
name
–
The name of the target.
category
(
[transfer: none])
–
The name of the category to which this target belongs. For example: GST_ENCODING_CATEGORY_DEVICE.
description
(
[transfer: none])
–
A description of GstEncodingTarget in the current locale.
profiles
(
[transfer: none][element-typeGstPbutils.EncodingProfile])
–
A GList of GstEncodingProfile.
The newly created GstEncodingTarget or NULL if there was an error.
GstPbutils.EncodingTarget.prototype.new
function GstPbutils.EncodingTarget.prototype.new(name: String, category: String, description: String, profiles: [ GstPbutils.EncodingProfile ]): {
// javascript wrapper for 'gst_encoding_target_new'
}
Creates a new GstPbutils.EncodingTarget.
The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').
The category should be one of the existing well-defined categories, like GstPbutils.ENCODING_CATEGORY_DEVICE, but it can be a application or user specific category if needed.
Parameters:
The name of the target.
The name of the category to which this target belongs. For example: GstPbutils.ENCODING_CATEGORY_DEVICE.
A description of GstPbutils.EncodingTarget in the current locale.
The newly created GstPbutils.EncodingTarget or null if there was an error.
GstPbutils.EncodingTarget.new
def GstPbutils.EncodingTarget.new (name, category, description, profiles):
#python wrapper for 'gst_encoding_target_new'
Creates a new GstPbutils.EncodingTarget.
The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').
The category should be one of the existing well-defined categories, like GstPbutils.ENCODING_CATEGORY_DEVICE, but it can be a application or user specific category if needed.
Parameters:
The name of the target.
The name of the category to which this target belongs. For example: GstPbutils.ENCODING_CATEGORY_DEVICE.
A description of GstPbutils.EncodingTarget in the current locale.
The newly created GstPbutils.EncodingTarget or None if there was an error.
Methods
gst_encoding_target_add_profile
gboolean gst_encoding_target_add_profile (GstEncodingTarget * target, GstEncodingProfile * profile)
Adds the given profile to the target. Each added profile must have a unique name within the profile.
The target will steal a reference to the profile. If you wish to use the profile after calling this method, you should increase its reference count.
Parameters:
target
–
the GstEncodingTarget to add a profile to
profile
(
[transfer: full])
–
the GstEncodingProfile to add
GstPbutils.EncodingTarget.prototype.add_profile
function GstPbutils.EncodingTarget.prototype.add_profile(profile: GstPbutils.EncodingProfile): {
// javascript wrapper for 'gst_encoding_target_add_profile'
}
Adds the given profile to the target. Each added profile must have a unique name within the profile.
The target will steal a reference to the profile. If you wish to use the profile after calling this method, you should increase its reference count.
GstPbutils.EncodingTarget.add_profile
def GstPbutils.EncodingTarget.add_profile (self, profile):
#python wrapper for 'gst_encoding_target_add_profile'
Adds the given profile to the target. Each added profile must have a unique name within the profile.
The target will steal a reference to the profile. If you wish to use the profile after calling this method, you should increase its reference count.
gst_encoding_target_get_category
const gchar * gst_encoding_target_get_category (GstEncodingTarget * target)
Parameters:
target
–
The category of the target. For example: GST_ENCODING_CATEGORY_DEVICE.
GstPbutils.EncodingTarget.prototype.get_category
function GstPbutils.EncodingTarget.prototype.get_category(): {
// javascript wrapper for 'gst_encoding_target_get_category'
}
Parameters:
The category of the target. For example: GstPbutils.ENCODING_CATEGORY_DEVICE.
GstPbutils.EncodingTarget.get_category
def GstPbutils.EncodingTarget.get_category (self):
#python wrapper for 'gst_encoding_target_get_category'
Parameters:
The category of the target. For example: GstPbutils.ENCODING_CATEGORY_DEVICE.
gst_encoding_target_get_description
const gchar * gst_encoding_target_get_description (GstEncodingTarget * target)
Parameters:
target
–
The description of the target.
GstPbutils.EncodingTarget.prototype.get_description
function GstPbutils.EncodingTarget.prototype.get_description(): {
// javascript wrapper for 'gst_encoding_target_get_description'
}
Parameters:
The description of the target.
GstPbutils.EncodingTarget.get_description
def GstPbutils.EncodingTarget.get_description (self):
#python wrapper for 'gst_encoding_target_get_description'
Parameters:
The description of the target.
gst_encoding_target_get_name
const gchar * gst_encoding_target_get_name (GstEncodingTarget * target)
Parameters:
target
–
The name of the target.
GstPbutils.EncodingTarget.prototype.get_name
function GstPbutils.EncodingTarget.prototype.get_name(): {
// javascript wrapper for 'gst_encoding_target_get_name'
}
Parameters:
The name of the target.
GstPbutils.EncodingTarget.get_name
def GstPbutils.EncodingTarget.get_name (self):
#python wrapper for 'gst_encoding_target_get_name'
Parameters:
The name of the target.
gst_encoding_target_get_path
const gchar * gst_encoding_target_get_path (GstEncodingTarget * target)
Parameters:
target
–
The path to the target file.
Since : 1.18
GstPbutils.EncodingTarget.prototype.get_path
function GstPbutils.EncodingTarget.prototype.get_path(): {
// javascript wrapper for 'gst_encoding_target_get_path'
}
Parameters:
The path to the target file.
Since : 1.18
GstPbutils.EncodingTarget.get_path
def GstPbutils.EncodingTarget.get_path (self):
#python wrapper for 'gst_encoding_target_get_path'
Parameters:
The path to the target file.
Since : 1.18
gst_encoding_target_get_profile
GstEncodingProfile * gst_encoding_target_get_profile (GstEncodingTarget * target, const gchar * name)
The matching GstEncodingProfile, or NULL.
GstPbutils.EncodingTarget.prototype.get_profile
function GstPbutils.EncodingTarget.prototype.get_profile(name: String): {
// javascript wrapper for 'gst_encoding_target_get_profile'
}
Parameters:
the name of the profile to retrieve
The matching GstPbutils.EncodingProfile, or null.
GstPbutils.EncodingTarget.get_profile
def GstPbutils.EncodingTarget.get_profile (self, name):
#python wrapper for 'gst_encoding_target_get_profile'
Parameters:
the name of the profile to retrieve
The matching GstPbutils.EncodingProfile, or None.
gst_encoding_target_get_profiles
const GList * gst_encoding_target_get_profiles (GstEncodingTarget * target)
Parameters:
target
–
A list of GstEncodingProfile(s) this target handles.
GstPbutils.EncodingTarget.prototype.get_profiles
function GstPbutils.EncodingTarget.prototype.get_profiles(): {
// javascript wrapper for 'gst_encoding_target_get_profiles'
}
Parameters:
A list of GstPbutils.EncodingProfile(s) this target handles.
GstPbutils.EncodingTarget.get_profiles
def GstPbutils.EncodingTarget.get_profiles (self):
#python wrapper for 'gst_encoding_target_get_profiles'
Parameters:
A list of GstPbutils.EncodingProfile(s) this target handles.
gst_encoding_target_save
gboolean gst_encoding_target_save (GstEncodingTarget * target, GError ** error)
Saves the target to a default user-local directory.
Parameters:
target
–
error
–
If an error occurred, this field will be filled in.
GstPbutils.EncodingTarget.prototype.save
function GstPbutils.EncodingTarget.prototype.save(): {
// javascript wrapper for 'gst_encoding_target_save'
}
Saves the target to a default user-local directory.
Parameters:
GstPbutils.EncodingTarget.save
@raises(GLib.GError)
def GstPbutils.EncodingTarget.save (self):
#python wrapper for 'gst_encoding_target_save'
Saves the target to a default user-local directory.
Parameters:
gst_encoding_target_save_to_file
gboolean gst_encoding_target_save_to_file (GstEncodingTarget * target, const gchar * filepath, GError ** error)
Saves the target to the provided file location.
Parameters:
target
–
filepath
(
[typefilename])
–
the location to store the target at.
error
–
If an error occurred, this field will be filled in.
GstPbutils.EncodingTarget.prototype.save_to_file
function GstPbutils.EncodingTarget.prototype.save_to_file(filepath: filename): {
// javascript wrapper for 'gst_encoding_target_save_to_file'
}
Saves the target to the provided file location.
Parameters:
filepath
(filename)
–
the location to store the target at.
GstPbutils.EncodingTarget.save_to_file
@raises(GLib.GError)
def GstPbutils.EncodingTarget.save_to_file (self, filepath):
#python wrapper for 'gst_encoding_target_save_to_file'
Saves the target to the provided file location.
Parameters:
the location to store the target at.
Functions
gst_encoding_target_load
GstEncodingTarget * gst_encoding_target_load (const gchar * name, const gchar * category, GError ** error)
Searches for the GstEncodingTarget with the given name, loads it and returns it.
If the category name is specified only targets from that category will be searched for.
Parameters:
name
–
the name of the GstEncodingTarget to load (automatically converted to lower case internally as capital letters are not valid for target names).
category
(
[nullable])
–
the name of the target category, like GST_ENCODING_CATEGORY_DEVICE. Can be NULL
error
–
If an error occurred, this field will be filled in.
The GstEncodingTarget if available, else NULL.
GstPbutils.EncodingTarget.prototype.load
function GstPbutils.EncodingTarget.prototype.load(name: String, category: String): {
// javascript wrapper for 'gst_encoding_target_load'
}
Searches for the GstPbutils.EncodingTarget with the given name, loads it and returns it.
If the category name is specified only targets from that category will be searched for.
Parameters:
the name of the GstPbutils.EncodingTarget to load (automatically converted to lower case internally as capital letters are not valid for target names).
the name of the target category, like GstPbutils.ENCODING_CATEGORY_DEVICE. Can be null
The GstPbutils.EncodingTarget if available, else null.
GstPbutils.EncodingTarget.load
@raises(GLib.GError)
def GstPbutils.EncodingTarget.load (name, category):
#python wrapper for 'gst_encoding_target_load'
Searches for the GstPbutils.EncodingTarget with the given name, loads it and returns it.
If the category name is specified only targets from that category will be searched for.
Parameters:
the name of the GstPbutils.EncodingTarget to load (automatically converted to lower case internally as capital letters are not valid for target names).
the name of the target category, like GstPbutils.ENCODING_CATEGORY_DEVICE. Can be None
The GstPbutils.EncodingTarget if available, else None.
gst_encoding_target_load_from_file
GstEncodingTarget * gst_encoding_target_load_from_file (const gchar * filepath, GError ** error)
Opens the provided file and returns the contained GstEncodingTarget.
Parameters:
filepath
(
[typefilename])
–
The file location to load the GstEncodingTarget from
error
–
If an error occurred, this field will be filled in.
The GstEncodingTarget contained in the file, else NULL
GstPbutils.EncodingTarget.prototype.load_from_file
function GstPbutils.EncodingTarget.prototype.load_from_file(filepath: filename): {
// javascript wrapper for 'gst_encoding_target_load_from_file'
}
Opens the provided file and returns the contained GstPbutils.EncodingTarget.
Parameters:
filepath
(filename)
–
The file location to load the GstPbutils.EncodingTarget from
The GstPbutils.EncodingTarget contained in the file, else null
GstPbutils.EncodingTarget.load_from_file
@raises(GLib.GError)
def GstPbutils.EncodingTarget.load_from_file (filepath):
#python wrapper for 'gst_encoding_target_load_from_file'
Opens the provided file and returns the contained GstPbutils.EncodingTarget.
Parameters:
The file location to load the GstPbutils.EncodingTarget from
The GstPbutils.EncodingTarget contained in the file, else None
Functions
gst_encoding_list_all_targets
GList * gst_encoding_list_all_targets (const gchar * categoryname)
List all available GstEncodingTarget for the specified category, or all categories if categoryname is NULL.
Parameters:
categoryname
(
[nullable])
–
The category, for ex: GST_ENCODING_CATEGORY_DEVICE. Can be NULL.
The list of GstEncodingTarget
GstPbutils.prototype.encoding_list_all_targets
function GstPbutils.prototype.encoding_list_all_targets(categoryname: String): {
// javascript wrapper for 'gst_encoding_list_all_targets'
}
List all available GstPbutils.EncodingTarget for the specified category, or all categories if categoryname is null.
Parameters:
The category, for ex: GstPbutils.ENCODING_CATEGORY_DEVICE. Can be null.
The list of GstPbutils.EncodingTarget
GstPbutils.encoding_list_all_targets
def GstPbutils.encoding_list_all_targets (categoryname):
#python wrapper for 'gst_encoding_list_all_targets'
List all available GstPbutils.EncodingTarget for the specified category, or all categories if categoryname is None.
Parameters:
The category, for ex: GstPbutils.ENCODING_CATEGORY_DEVICE. Can be None.
The list of GstPbutils.EncodingTarget
gst_encoding_list_available_categories
GList * gst_encoding_list_available_categories ()
Lists all GstEncodingTarget categories present on disk.
A list of GstEncodingTarget categories.
GstPbutils.prototype.encoding_list_available_categories
function GstPbutils.prototype.encoding_list_available_categories(): {
// javascript wrapper for 'gst_encoding_list_available_categories'
}
Lists all GstPbutils.EncodingTarget categories present on disk.
A list of GstPbutils.EncodingTarget categories.
GstPbutils.encoding_list_available_categories
def GstPbutils.encoding_list_available_categories ():
#python wrapper for 'gst_encoding_list_available_categories'
Lists all GstPbutils.EncodingTarget categories present on disk.
A list of GstPbutils.EncodingTarget categories.
Function Macros
gst_encoding_target_ref
#define gst_encoding_target_ref(target) \ (g_object_ref ((GObject*) target))
Increases the reference count of the target.
Parameters:
target
–
gst_encoding_target_unref
#define gst_encoding_target_unref(target) \ (g_object_unref ((GObject*) target))
Decreases the reference count of the target, possibly freeing it.
Parameters:
target
–
Constants
GST_ENCODING_CATEGORY_CAPTURE
#define GST_ENCODING_CATEGORY_CAPTURE "capture"
GstEncodingTarget category for recording and capture. Targets within this category are optimized for low latency encoding.
GstPbutils.ENCODING_CATEGORY_CAPTURE
GstPbutils.EncodingTarget category for recording and capture. Targets within this category are optimized for low latency encoding.
GstPbutils.ENCODING_CATEGORY_CAPTURE
GstPbutils.EncodingTarget category for recording and capture. Targets within this category are optimized for low latency encoding.
GST_ENCODING_CATEGORY_DEVICE
#define GST_ENCODING_CATEGORY_DEVICE "device"
GstEncodingTarget category for device-specific targets. The name of the target will usually be the constructor and model of the device, and that target will contain GstEncodingProfile suitable for that device.
GstPbutils.ENCODING_CATEGORY_DEVICE
GstPbutils.EncodingTarget category for device-specific targets. The name of the target will usually be the constructor and model of the device, and that target will contain GstPbutils.EncodingProfile suitable for that device.
GstPbutils.ENCODING_CATEGORY_DEVICE
GstPbutils.EncodingTarget category for device-specific targets. The name of the target will usually be the constructor and model of the device, and that target will contain GstPbutils.EncodingProfile suitable for that device.
GST_ENCODING_CATEGORY_FILE_EXTENSION
#define GST_ENCODING_CATEGORY_FILE_EXTENSION "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.
GstPbutils.ENCODING_CATEGORY_FILE_EXTENSION
GstPbutils.EncodingTarget 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.
GstPbutils.ENCODING_CATEGORY_FILE_EXTENSION
GstPbutils.EncodingTarget 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.
GST_ENCODING_CATEGORY_ONLINE_SERVICE
#define GST_ENCODING_CATEGORY_ONLINE_SERVICE "online-service"
GstEncodingTarget category for online-services. The name of the target will usually be the name of the online service and that target will contain GstEncodingProfile suitable for that online service.
GstPbutils.ENCODING_CATEGORY_ONLINE_SERVICE
GstPbutils.EncodingTarget category for online-services. The name of the target will usually be the name of the online service and that target will contain GstPbutils.EncodingProfile suitable for that online service.
GstPbutils.ENCODING_CATEGORY_ONLINE_SERVICE
GstPbutils.EncodingTarget category for online-services. The name of the target will usually be the name of the online service and that target will contain GstPbutils.EncodingProfile suitable for that online service.
GST_ENCODING_CATEGORY_STORAGE_EDITING
#define GST_ENCODING_CATEGORY_STORAGE_EDITING "storage-editing"
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 GstEncodingProfile suitable for editing or storage.
GstPbutils.ENCODING_CATEGORY_STORAGE_EDITING
GstPbutils.EncodingTarget 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 GstPbutils.EncodingProfile suitable for editing or storage.
GstPbutils.ENCODING_CATEGORY_STORAGE_EDITING
GstPbutils.EncodingTarget 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 GstPbutils.EncodingProfile suitable for editing or storage.
GST_TYPE_ENCODING_TARGET
#define GST_TYPE_ENCODING_TARGET \ (gst_encoding_target_get_type ())
Aliases
GstEncodingTargetClass
typedef GObjectClass GstEncodingTargetClass
The results of the search are