gi-gst-0.1.6.13: Gst bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.Segment

Contents

Description

This helper structure holds the relevant values for tracking the region of interest in a media file, called a segment.

The structure can be used for two purposes: itemizedlist listitemparaperforming seeks (handling seek events)/para/listitem listitemparatracking playback regions (handling newsegment events)/para/listitem /itemizedlist

The segment is usually configured by the application with a seek event which is propagated upstream and eventually handled by an element that performs the seek.

The configured segment is then propagated back downstream with a newsegment event. This information is then used to clip media to the segment boundaries.

A segment structure is initialized with gst_segment_init(), which takes a #GstFormat that will be used as the format of the segment values. The segment will be configured with a start value of 0 and a stop/duration of -1, which is undefined. The default rate and applied_rate is 1.0.

The public duration field contains the duration of the segment. When using the segment for seeking, the start and time members should normally be left to their default 0 value. The stop position is left to -1 unless explicitly configured to a different value after a seek event.

The current position in the segment should be set by changing the position member in the structure.

For elements that perform seeks, the current segment should be updated with the gst_segment_do_seek() and the values from the seek event. This method will update all the segment fields. The position field will contain the new playback position. If the start_type was different from GST_SEEK_TYPE_NONE, playback continues from the position position, possibly with updated flags or rate.

For elements that want to use #GstSegment to track the playback region, update the segment fields with the information from the newsegment event. The gst_segment_clip() method can be used to check and clip the media data to the segment boundaries.

For elements that want to synchronize to the pipeline clock, gst_segment_to_running_time() can be used to convert a timestamp to a value that can be used to synchronize to the clock. This function takes into account the base as well as any rate or applied_rate conversions.

For elements that need to perform operations on media data in stream_time, gst_segment_to_stream_time() can be used to convert a timestamp and the segment info to stream time (which is always between 0 and the duration of the stream).

Synopsis

Exported types

newtype Segment Source

Constructors

Segment (ForeignPtr Segment) 

Instances

BoxedObject Segment Source 

Methods

boxedType :: Segment -> IO GType

((~) * info (ResolveSegmentMethod t Segment), MethodInfo * info Segment p) => IsLabel t (Segment -> p) Source 

Methods

fromLabel :: Proxy# Symbol t -> Segment -> p

((~) * info (ResolveSegmentMethod t Segment), MethodInfo * info Segment p) => IsLabelProxy t (Segment -> p) Source 

Methods

fromLabelProxy :: Proxy Symbol t -> Segment -> p

((~) (TYPE Lifted) signature (Format -> Word64 -> m Word64), MonadIO m) => MethodInfo (TYPE Lifted) SegmentToStreamTimeMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Word64 -> Word64 -> m Int32), MonadIO m) => MethodInfo (TYPE Lifted) SegmentToRunningTimeFullMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Word64 -> m Word64), MonadIO m) => MethodInfo (TYPE Lifted) SegmentToRunningTimeMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Word64 -> m Word64), MonadIO m) => MethodInfo (TYPE Lifted) SegmentToPositionMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Word64 -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) SegmentSetRunningTimeMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Int64 -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) SegmentOffsetRunningTimeMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Segment -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) SegmentIsEqualMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) SegmentInitMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) SegmentFreeMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Double -> Format -> [SeekFlags] -> SeekType -> Word64 -> SeekType -> Word64 -> Bool -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) SegmentDoSeekMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Segment -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) SegmentCopyIntoMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (m Segment), MonadIO m) => MethodInfo (TYPE Lifted) SegmentCopyMethodInfo Segment signature Source 
((~) (TYPE Lifted) signature (Format -> Word64 -> Word64 -> m (Bool, Word64, Word64)), MonadIO m) => MethodInfo (TYPE Lifted) SegmentClipMethodInfo Segment signature Source 

newZeroSegment :: MonadIO m => m Segment Source

Construct a Segment struct initialized to zero.

Methods

segmentClip

segmentCopy

segmentCopyInto

segmentDoSeek

segmentFree

segmentInit

segmentIsEqual

segmentNew

segmentOffsetRunningTime

segmentSetRunningTime

segmentToPosition

segmentToRunningTime

segmentToRunningTimeFull

segmentToStreamTime

Properties

AppliedRate

Base

Duration

Flags

Format

Offset

Position

Rate

Start

Stop

Time