Gst::EncodingProfile Class Reference

Gst::EncodingProfile can be provided to the 'encodebin' element, which will take care of selecting and setting up the required elements to produce an output stream conforming to the specifications of the profile. More...

`#include <gstreamermm/encodingprofile.h>`

Inheritance diagram for Gst::EncodingProfile:
[legend]

## Public Member Functions

| EncodingProfile (EncodingProfile&& src) noexcept
EncodingProfile& | operator= (EncodingProfile&& src) noexcept
| ~EncodingProfile () noexcept override
GstEncodingProfile* | gobj ()
| Provides access to the underlying C GObject. More...
const GstEncodingProfile* | gobj () const
| Provides access to the underlying C GObject. More...
GstEncodingProfile* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::ustring | get_name () const
Glib::ustring | get_description () const
Glib::RefPtr< Gst::Caps > | get_format ()
Glib::RefPtr< const Gst::Caps > | get_format () const
Glib::ustring | get_preset () const
Glib::ustring | get_preset_name () const
guint | get_presence () const
Glib::RefPtr< Gst::Caps > | get_restriction ()
Glib::RefPtr< const Gst::Caps > | get_restriction () const
Glib::ustring | get_file_extension () const
void | set_name (const Glib::ustring& name)
| Set name as the given name for the profile. More...
void | set_description (const Glib::ustring& name)
| Set name as the given description for the profile. More...
void | set_enabled (bool enabled)
| Set whether the profile should be used or not. More...
void | set_format (const Glib::RefPtr< Gst::Caps >& format)
| Sets the media format used in the profile. More...
void | set_preset (const Glib::ustring& preset)
| Sets the name of the Gst::Element that implements the Gst::Preset interface to use for the profile. More...
void | set_preset_name (const Glib::ustring& preset_name)
| Sets the name of the Gst::Preset's factory to be used in the profile. More...
void | set_restriction (const Glib::RefPtr< Gst::Caps >& restriction)
| Set the restriction Gst::Caps to apply before the encoder that will be used in the profile. More...
void | set_presence (guint presence)
| Set the number of time the profile is used in its parent container profile. More...
bool | is_equal (const Glib::RefPtr< Gst::EncodingProfile >& profile2) const
| Checks whether the two Gst::EncodingProfile are equal. More...
bool | is_enabled () const
Glib::RefPtr< Gst::Caps > | get_input_caps () const
| Computes the full output caps that this profile will be able to consume. More...
Glib::ustring | get_type_nick () const
bool | get_allow_dynamic_output () const
| Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding. More...
void | set_allow_dynamic_output (bool allow_dynamic_output)
| Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding. More...
Public Member Functions inherited from Gst::Object
| Object (Object&& src) noexcept
Object& | operator= (Object&& src) noexcept
| ~Object () noexcept override
GstObject* | gobj ()
| Provides access to the underlying C GObject. More...
const GstObject* | gobj () const
| Provides access to the underlying C GObject. More...
GstObject* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | is_element () const
bool | is_element_factory () const
bool | is_pad () const
bool | is_pad_template () const
bool | is_bin () const
guint32 | get_flags () const
| Returns the entire set of flags for the object. More...
bool | set_name (const Glib::ustring& name)
| Sets the name of object, or gives object a guaranteed unique name (if name is `nullptr`). More...
Glib::ustring | get_name () const
| Returns a copy of the name of object. More...
bool | set_parent (const Glib::RefPtr< Gst::Object >& parent)
| Sets the parent of object to parent. More...
Glib::RefPtr< Gst::Object > | get_parent ()
| Returns the parent of object. More...
Glib::RefPtr< const Gst::Object > | get_parent () const
| Returns the parent of object. More...
void | unparent ()
| Clear the parent of object, removing the associated reference. More...
void | set_control_rate (Gst::ClockTime control_rate)
| Change the control-rate for this object. More...
Gst::ClockTime | get_control_rate () const
| Obtain the control-rate for this object. More...
Gst::ClockTime | suggest_next_sync () const
| Returns a suggestion for timestamps where buffers should be split to get best controller results. More...
bool | sync_values (Gst::ClockTime timestamp)
| Sets the properties of the object, according to the Gst::ControlSources that (maybe) handle them and for the given timestamp. More...
void | set_control_bindings_disabled (bool disabled)
| This function is used to disable all controlled properties of the object for some time, i.e. sync_values() will do nothing. More...
bool | has_asctive_control_bindings () const
| Check if the object has an active controlled properties. More...
bool | has_ancestor (const Glib::RefPtr< const Gst::Object >& ancestor) const
| Check if object has an ancestor ancestor somewhere up in the hierarchy. More...
bool | has_as_ancestor (const Glib::RefPtr< Gst::Object >& ancestor) const
| Check if object has an ancestor ancestor somewhere up in the hierarchy. More...
bool | has_as_parent (const Glib::RefPtr< Gst::Object >& parent) const
| Check if parent is the parent of object. More...
Glib::ustring | get_path_string ()
| Generates a string describing the path of object in the object hierarchy. More...
Glib::PropertyProxy< Glib::ustring > | property_name ()
| The name of the object. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| The name of the object. More...
Glib::PropertyProxy< Glib::RefPtr< Gst::Object > > | property_parent ()
| The parent of the object. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gst::Object > > | property_parent () const
| The parent of the object. More...
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Object >&, GParamSpec*> | signal_deep_notify ()
int | get_refcount () const

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
Static Public Member Functions inherited from Gst::Object
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static bool | check_uniqueness (const Glib::ListHandle< const Gst::Object >& list, const Glib::ustring& name)
| Checks to see if there is any object named name in list. More...

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gst::EncodingProfile > | wrap (GstEncodingProfile* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gst::Object
Glib::RefPtr< Gst::Object > | wrap (GstObject* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members

Protected Member Functions inherited from Gst::Object
virtual void | on_deep_notify (const Glib::RefPtr< Gst::Object >& prop_object, GParamSpec* prop)
| This is a default handler for the signal signal_deep_notify(). More...

## Detailed Description

Gst::EncodingProfile can be provided to the 'encodebin' element, which will take care of selecting and setting up the required elements to produce an output stream conforming to the specifications of the profile.

TODO update example

Last reviewed on 2016-05-21 (1.8.0).

## Constructor & Destructor Documentation

## EncodingProfile()

Gst::EncodingProfile::EncodingProfile | ( | EncodingProfile&& | src | ) |

noexcept

## ~EncodingProfile()

Gst::EncodingProfile::~EncodingProfile | ( |  | ) |

override noexcept

## Member Function Documentation

## get_allow_dynamic_output()

bool Gst::EncodingProfile::get_allow_dynamic_output | ( |  | ) | const

Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding.

## get_description()

Glib::ustring Gst::EncodingProfile::get_description | ( |  | ) | const

Returns
  The description of the profile, can be `nullptr`.

## get_file_extension()

Glib::ustring Gst::EncodingProfile::get_file_extension | ( |  | ) | const

Returns
  A suitable file extension for profile, or `nullptr`.

## get_format() [1/2]

Glib::RefPtr<Gst::Caps> Gst::EncodingProfile::get_format | ( |  | ) |

Returns
  The Gst::Caps corresponding to the media format used in the profile. Unref after usage.

## get_format() [2/2]

Glib::RefPtr<const Gst::Caps> Gst::EncodingProfile::get_format | ( |  | ) | const

Returns
  The Gst::Caps corresponding to the media format used in the profile. Unref after usage.

## get_input_caps()

Glib::RefPtr<Gst::Caps> Gst::EncodingProfile::get_input_caps | ( |  | ) | const

Computes the full output caps that this profile will be able to consume.

Returns
  The full caps the given profile can consume. Call Gst::Caps::unref() when you are done with the caps.

## get_name()

Glib::ustring Gst::EncodingProfile::get_name | ( |  | ) | const

Returns
  The name of the profile, can be `nullptr`.

## get_presence()

guint Gst::EncodingProfile::get_presence | ( |  | ) | const

Returns
  The number of times the profile is used in its parent container profile. If 0, it is not a mandatory stream.

## get_preset()

Glib::ustring Gst::EncodingProfile::get_preset | ( |  | ) | const

Returns
  The name of the Gst::Preset to be used in the profile. This is the name that has been set when saving the preset.

## get_preset_name()

Glib::ustring Gst::EncodingProfile::get_preset_name | ( |  | ) | const

Returns
  The name of the Gst::Preset factory to be used in the profile.

## get_restriction() [1/2]

Glib::RefPtr<Gst::Caps> Gst::EncodingProfile::get_restriction | ( |  | ) |

Returns
  The restriction Gst::Caps to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply to Gst::EncodingContainerProfile (since there is no corresponding raw stream). Can be `nullptr`. Unref after usage.

## get_restriction() [2/2]

Glib::RefPtr<const Gst::Caps> Gst::EncodingProfile::get_restriction | ( |  | ) | const

Returns
  The restriction Gst::Caps to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply to Gst::EncodingContainerProfile (since there is no corresponding raw stream). Can be `nullptr`. Unref after usage.

## get_type()

static GType Gst::EncodingProfile::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

## get_type_nick()

Glib::ustring Gst::EncodingProfile::get_type_nick | ( |  | ) | const

Returns
  The human-readable name of the type of profile.

## gobj() [1/2]

GstEncodingProfile* Gst::EncodingProfile::gobj | ( |  | ) |

inline

Provides access to the underlying C GObject.

## gobj() [2/2]

const GstEncodingProfile* Gst::EncodingProfile::gobj | ( |  | ) | const

inline

Provides access to the underlying C GObject.

## gobj_copy()

GstEncodingProfile* Gst::EncodingProfile::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## is_enabled()

bool Gst::EncodingProfile::is_enabled | ( |  | ) | const

## is_equal()

bool Gst::EncodingProfile::is_equal | ( | const Glib::RefPtr< Gst::EncodingProfile >& | profile2 | ) | const

Checks whether the two Gst::EncodingProfile are equal.

Parameters

  profile2 | A Gst::EncodingProfile.

Returns
  `true` if a and profile2 are equal, else `false`.

## operator=()

EncodingProfile& Gst::EncodingProfile::operator= | ( | EncodingProfile&& | src | ) |

noexcept

## set_allow_dynamic_output()

void Gst::EncodingProfile::set_allow_dynamic_output | ( | bool | allow_dynamic_output | ) |

Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding.

Parameters

  allow_dynamic_output | Whether the format that has been negotiated first can be renegotiated during the encoding.

## set_description()

void Gst::EncodingProfile::set_description | ( | const Glib::ustring & | name | ) |

Set name as the given description for the profile.

A copy of name will be made internally.

Parameters

  name | The description to set on the profile.

## set_enabled()

void Gst::EncodingProfile::set_enabled | ( | bool | enabled | ) |

Set whether the profile should be used or not.

Parameters

  enabled | `false` to disable #profile, `true` to enable it.

## set_format()

void Gst::EncodingProfile::set_format | ( | const Glib::RefPtr< Gst::Caps >& | format | ) |

Sets the media format used in the profile.

Parameters

  format | The media format to use in the profile.

## set_name()

void Gst::EncodingProfile::set_name | ( | const Glib::ustring & | name | ) |

Set name as the given name for the profile.

A copy of name will be made internally.

Parameters

  name | The name to set on the profile.

## set_presence()

void Gst::EncodingProfile::set_presence | ( | guint | presence | ) |

Set the number of time the profile is used in its parent container profile.

If 0, it is not a mandatory stream

Parameters

  presence | The number of time the profile can be used.

## set_preset()

void Gst::EncodingProfile::set_preset | ( | const Glib::ustring & | preset | ) |

Sets the name of the Gst::Element that implements the Gst::Preset interface to use for the profile.

This is the name that has been set when saving the preset.

Parameters

  preset | The element preset to use.

## set_preset_name()

void Gst::EncodingProfile::set_preset_name | ( | const Glib::ustring & | preset_name | ) |

Sets the name of the Gst::Preset's factory to be used in the profile.

Parameters

  preset_name | The name of the preset to use in this profile.

## set_restriction()

void Gst::EncodingProfile::set_restriction | ( | const Glib::RefPtr< Gst::Caps >& | restriction | ) |

Set the restriction Gst::Caps to apply before the encoder that will be used in the profile.

See gst_encoding_profile_get_restriction() for more about restrictions. Does not apply to Gst::EncodingContainerProfile.

Parameters

  restriction | The restriction to apply.

## Friends And Related Function Documentation

## wrap()

Glib::RefPtr< Gst::EncodingProfile > wrap | ( | GstEncodingProfile * | object,
|  | bool | take_copy = `false`
| ) |  |

related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.