Clapper.Marker

g Clapper.Marker Clapper.Marker GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Object->Clapper.Marker

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (marker_type, title, start, end)

get_end ()

get_marker_type ()

get_start ()

get_title ()

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

end

float

r/w/co/en

marker-type

Clapper.MarkerType

r/w/co/en

start

float

r/w/co/en

title

str

r/w/co/en

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Class Details

class Clapper.Marker(**kwargs)
Bases:

Gst.Object

Abstract:

No

Structure:

Clapper.MarkerClass

Represents a point in timeline.

Markers are a convienient way of marking points of interest within a [class`Clapper`.Timeline] of [class`Clapper`.MediaItem]. Use them to indicate certain areas on the timeline.

Markers are reference counted immutable objects. Once a marker is created it can only be inserted into a single [class`Clapper`.Timeline] at a time.

Please note that markers are independent of [property`Clapper`.MediaItem:duration] and applications should not assume that all markers must have start/end times lower or equal the item duration. This is not the case in e.g. live streams where duration is unknown, but markers are still allowed to mark entries (like EPG titles for example).

Remember that [class`Clapper`.Player] will also automatically insert certain markers extracted from media such as video chapters. Clapper will never “touch” the ones created by the application. If you want to differentiate your own markers, applications can define and create markers with one of the custom types from [enum`Clapper`.MarkerType] enum.

Example:

```c #define MY_APP_MARKER (Clapper.MarkerType.CUSTOM_1)

Clapper.Marker *marker = Clapper.Marker.new (MY_APP_MARKER, title, start, end); ```

```c Clapper.MarkerType marker_type = Clapper.Marker.get_marker_type (marker);

if (marker_type == MY_APP_MARKER) { // Do something with your custom marker } ```

classmethod new(marker_type, title, start, end)
Parameters:
Returns:

a new Clapper.Marker.

Return type:

Clapper.Marker

Creates a new Clapper.Marker with given params.

It is considered a programmer error trying to set an ending point that is before the starting one. If end is unknown or not defined a special [const`Clapper`.MARKER_NO_END] value should be used.

get_end()
Returns:

marker end.

Return type:

float

Get the end position (in seconds) of self.

get_marker_type()
Returns:

type of marker.

Return type:

Clapper.MarkerType

Get the Clapper.MarkerType of self.

get_start()
Returns:

marker start.

Return type:

float

Get the start position (in seconds) of self.

get_title()
Returns:

the marker title.

Return type:

str or None

Get the title of self.

Property Details

Clapper.Marker.props.end
Name:

end

Type:

float

Default Value:

-1.0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

Ending time of marker.

Clapper.Marker.props.marker_type
Name:

marker-type

Type:

Clapper.MarkerType

Default Value:

Clapper.MarkerType.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

Type of stream.

Clapper.Marker.props.start
Name:

start

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

Starting time of marker.

Clapper.Marker.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

Title of marker.