Top | ![]() |
![]() |
![]() |
![]() |
GstTranscoderGstTranscoder — High level API to transcode media files from one format to any other format using the GStreamer framework. |
GstTranscoder * | gst_transcoder_new () |
GstTranscoder * | gst_transcoder_new_full () |
gboolean | gst_transcoder_run () |
void | gst_transcoder_set_cpu_usage () |
void | gst_transcoder_run_async () |
void | gst_transcoder_set_position_update_interval () |
gchar * | gst_transcoder_get_source_uri () |
gchar * | gst_transcoder_get_dest_uri () |
guint | gst_transcoder_get_position_update_interval () |
GstClockTime | gst_transcoder_get_position () |
GstClockTime | gst_transcoder_get_duration () |
GstElement * | gst_transcoder_get_pipeline () |
gboolean | gst_transcoder_get_avoid_reencoding () |
void | gst_transcoder_set_avoid_reencoding () |
gboolean | avoid-reencoding | Read / Write |
char * | dest-uri | Read / Write / Construct Only |
guint64 | duration | Read |
GstElement * | pipeline | Read |
guint64 | position | Read |
guint | position-update-interval | Read / Write |
GstEncodingProfile * | profile | Read / Write / Construct Only |
GstTranscoderSignalDispatcher * | signal-dispatcher | Write / Construct Only |
char * | src-uri | Read / Write / Construct Only |
GstTranscoder * gst_transcoder_new (const gchar *source_uri
,const gchar *dest_uri
,const gchar *encoding_profile
);
GstTranscoder * gst_transcoder_new_full (const gchar *source_uri
,const gchar *dest_uri
,GstEncodingProfile *profile
,GstTranscoderSignalDispatcher *signal_dispatcher
);
source_uri |
The URI of the media stream to transcode |
|
dest_uri |
The URI of the destination of the transcoded stream |
|
profile |
The GstEncodingProfile defining the output format have a look at the GstEncodingProfile documentation to find more about the serialization format. |
|
signal_dispatcher |
The GstTranscoderSignalDispatcher to be used to dispatch the various signals. |
gboolean gst_transcoder_run (GstTranscoder *self
,GError **error
);
Run the transcoder task synchonously. You can connect to the 'position' signal to get information about the progress of the transcoding.
void gst_transcoder_set_cpu_usage (GstTranscoder *self
,gint cpu_usage
);
Sets cpu_usage
as target percentage CPU usage of the process running the
transcoding task. It will modulate the transcoding speed to reach that target
usage.
void
gst_transcoder_run_async (GstTranscoder *self
);
Run the transcoder task asynchonously. You should connect to the 'done' signal to be notified about when the transcoding is done, and to the 'error' signal to be notified about any error.
void gst_transcoder_set_position_update_interval (GstTranscoder *self
,guint interval
);
Set interval in milliseconds between two position-updated signals. Pass 0 to stop updating the position.
gchar *
gst_transcoder_get_source_uri (GstTranscoder *self
);
Gets the URI of the currently-transcoding stream.
gchar *
gst_transcoder_get_dest_uri (GstTranscoder *self
);
Gets the URI of the destination of the transcoded stream.
guint
gst_transcoder_get_position_update_interval
(GstTranscoder *self
);
GstClockTime
gst_transcoder_get_duration (GstTranscoder *self
);
Retrieves the duration of the media stream that self represents.
gboolean
gst_transcoder_get_avoid_reencoding (GstTranscoder *self
);
void gst_transcoder_set_avoid_reencoding (GstTranscoder *self
,gboolean avoid_reencoding
);
self |
The GstTranscoder to set whether reencoding should be avoided or not. |
|
avoid_reencoding |
|
“avoid-reencoding”
property “avoid-reencoding” gboolean
Whether to re-encode portions of compatible video streams that lay on segment boundaries.
Owner: GstTranscoder
Flags: Read / Write
Default value: FALSE
“dest-uri”
property “dest-uri” char *
Source URI.
Owner: GstTranscoder
Flags: Read / Write / Construct Only
Default value: NULL
“duration”
property “duration” guint64
Duration.
Owner: GstTranscoder
Flags: Read
Default value: 18446744073709551615
“pipeline”
property “pipeline” GstElement *
GStreamer pipeline that is used.
Owner: GstTranscoder
Flags: Read
“position”
property “position” guint64
Current Position.
Owner: GstTranscoder
Flags: Read
Default value: 18446744073709551615
“position-update-interval”
property “position-update-interval” guint
Interval in milliseconds between two position-updated signals.Pass 0 to stop updating the position.
Owner: GstTranscoder
Flags: Read / Write
Allowed values: <= 10000
Default value: 100
“profile”
property “profile” GstEncodingProfile *
The GstEncodingProfile to use.
Owner: GstTranscoder
Flags: Read / Write / Construct Only
“signal-dispatcher”
property“signal-dispatcher” GstTranscoderSignalDispatcher *
Dispatcher for the signals to e.g. event loops.
Owner: GstTranscoder
Flags: Write / Construct Only
“done”
signalvoid user_function (GstTranscoder *gsttranscoder, gpointer user_data)
Flags: No Hooks
“duration-changed”
signalvoid user_function (GstTranscoder *gsttranscoder, guint64 arg1, gpointer user_data)
Flags: No Hooks
“position-updated”
signalvoid user_function (GstTranscoder *gsttranscoder, guint64 arg1, gpointer user_data)
Flags: No Hooks