Clapper.Marker¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co/en |
|||
r/w/co/en |
|||
r/w/co/en |
|||
r/w/co/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Clapper.Marker(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
marker_type (
Clapper.MarkerType
) – aClapper.MarkerType
start (
float
) – a start position of the markerend (
float
) – an end position of the marker or [const`Clapper`.MARKER_NO_END] if none
- Returns:
a new
Clapper.Marker
.- Return type:
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_marker_type()¶
- Returns:
type of marker.
- Return type:
Get the
Clapper.MarkerType
of self.
Property Details¶
- Clapper.Marker.props.end¶
- Name:
end
- Type:
- Default Value:
-1.0
- Flags:
Ending time of marker.
- Clapper.Marker.props.marker_type¶
- Name:
marker-type
- Type:
- Default Value:
- Flags:
Type of stream.
- Clapper.Marker.props.start¶
- Name:
start
- Type:
- Default Value:
0.0
- Flags:
Starting time of marker.
- Clapper.Marker.props.title¶
- Name:
title
- Type:
- Default Value:
- Flags:
Title of marker.