GESTimelinePipeline

GESTimelinePipeline — Convenience GstPipeline for editing.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GstObject
        ╰── GstElement
            ╰── GstBin
                ╰── GstPipeline
                    ╰── GESTimelinePipeline

Implemented Interfaces

GESTimelinePipeline implements GstChildProxy.

Includes

#include <ges/ges.h>

Description

GESTimelinePipeline allows developers to view and render GESTimeline in a simple fashion. Its usage is inspired by the 'playbin' element from gst-plugins-base.

Functions

ges_timeline_pipeline_new ()

GESTimelinePipeline *
ges_timeline_pipeline_new (void);

Creates a new conveninence GESTimelinePipeline.

Returns

the new GESTimelinePipeline.


ges_timeline_pipeline_add_timeline ()

gboolean
ges_timeline_pipeline_add_timeline (GESTimelinePipeline *pipeline,
                                    GESTimeline *timeline);

Sets the timeline to use in this pipeline.

The reference to the timeline will be stolen by the pipeline .

Parameters

pipeline

a GESTimelinePipeline

 

timeline

the GESTimeline to set on the pipeline .

 

Returns

TRUE if the timeline could be successfully set on the pipeline , else FALSE.


ges_timeline_pipeline_set_mode ()

gboolean
ges_timeline_pipeline_set_mode (GESTimelinePipeline *pipeline,
                                GESPipelineFlags mode);

switches the pipeline to the specified mode . The default mode when creating a GESTimelinePipeline is TIMELINE_MODE_PREVIEW.

Note: The pipeline will be set to GST_STATE_NULL during this call due to the internal changes that happen. The caller will therefore have to set the pipeline to the requested state after calling this method.

Parameters

pipeline

a GESTimelinePipeline

 

mode

the GESPipelineFlags to use

 

Returns

TRUE if the mode was properly set, else FALSE.


ges_timeline_pipeline_set_render_settings ()

gboolean
ges_timeline_pipeline_set_render_settings
                               (GESTimelinePipeline *pipeline,
                                gchar *output_uri,
                                GstEncodingProfile *profile);

Specify where the pipeline shall be rendered and with what settings.

A copy of profile and output_uri will be done internally, the caller can safely free those values afterwards.

This method must be called before setting the pipeline mode to TIMELINE_MODE_RENDER

Parameters

pipeline

a GESTimelinePipeline

 

output_uri

the URI to which the timeline will be rendered

 

profile

the GstEncodingProfile to use to render the timeline.

 

Returns

TRUE if the settings were aknowledged properly, else FALSE


ges_timeline_pipeline_get_thumbnail_buffer ()

GstBuffer *
ges_timeline_pipeline_get_thumbnail_buffer
                               (GESTimelinePipeline *self,
                                GstCaps *caps);

Returns a GstBuffer with the currently playing in the format specified by caps. The caller should unref the gst_buffer_unref when finished. If ANY caps are specified, the information will be returned in the whatever format is currently used by the sink. This information can be retrieve from caps associated with the buffer.

Parameters

self

a GESTimelinePipeline in GST_STATE_PLAYING or GST_STATE_PAUSED

 

caps

caps specifying current format. Use GST_CAPS_ANY for native size.

[transfer none]

Returns

a GstBuffer or NULL.

[transfer full]


ges_timeline_pipeline_get_thumbnail_rgb24 ()

GstBuffer *
ges_timeline_pipeline_get_thumbnail_rgb24
                               (GESTimelinePipeline *self,
                                gint width,
                                gint height);

A convenience method for ges_timeline_pipeline_get_thumbnail_raw which returns a buffer in 24-bit RGB, optionally scaled to the specified width and height. If -1 is specified for either dimension, it will be left at native size. You can retreive this information from the caps associated with the buffer.

The caller is responsible for unreffing the returned buffer with gst_buffer_unref.

Parameters

self

a GESTimelinePipeline in GST_STATE_PLAYING or GST_STATE_PAUSED

 

width

the requested width or -1 for native size

 

height

the requested height or -1 for native size

 

Returns

a GstBuffer or NULL.

[transfer full]


ges_timeline_pipeline_save_thumbnail ()

gboolean
ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline *self,
                                      int width,
                                      int height,
                                      const gchar *format,
                                      const gchar *location);

Saves the current frame to the specified location .

Parameters

self

a GESTimelinePipeline in GST_STATE_PLAYING or GST_STATE_PAUSED

 

width

the requested width or -1 for native size

 

height

the requested height or -1 for native size

 

format

a string specifying the desired mime type (for example, image/jpeg)

 

location

the path to save the thumbnail

 

Returns

TRUE if the thumbnail was properly save, else FALSE.

Types and Values

GESTimelinePipeline

typedef struct _GESTimelinePipeline GESTimelinePipeline;

enum GESPipelineFlags

The various modes the GESTimelinePipeline can be configured to.

Members

TIMELINE_MODE_PREVIEW_AUDIO

output audio to the soundcard

 

TIMELINE_MODE_PREVIEW_VIDEO

output video to the screen

 

TIMELINE_MODE_PREVIEW

output audio/video to soundcard/screen (default)

 

TIMELINE_MODE_RENDER

render timeline (forces decoding)

 

TIMELINE_MODE_SMART_RENDER

render timeline (tries to avoid decoding/reencoding)