Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Element interface that allows setting of the TOC.
Elements that support some kind of chapters or editions (or tracks like in the FLAC cue sheet) will implement this interface.
If you just want to retrieve the TOC in your application then all you
need to do is watch for TOC messages on your pipeline's bus (or you can
perform TOC query). This interface is only for setting TOC data, not for
extracting it. To set TOC from the application, find proper tocsetter element
and set TOC using tocSetterSetToc
.
Elements implementing the TocSetter
interface can extend existing TOC
by getting extend UID for that (you can use tocFindEntry
to retrieve it)
with any TOC entries received from downstream.
Synopsis
- newtype TocSetter = TocSetter (ManagedPtr TocSetter)
- noTocSetter :: Maybe TocSetter
- class (GObject o, IsDescendantOf TocSetter o) => IsTocSetter o
- toTocSetter :: (MonadIO m, IsTocSetter o) => o -> m TocSetter
- tocSetterGetToc :: (HasCallStack, MonadIO m, IsTocSetter a) => a -> m (Maybe Toc)
- tocSetterReset :: (HasCallStack, MonadIO m, IsTocSetter a) => a -> m ()
- tocSetterSetToc :: (HasCallStack, MonadIO m, IsTocSetter a) => a -> Maybe Toc -> m ()
Exported types
Memory-managed wrapper type.
Instances
GObject TocSetter Source # | |
Defined in GI.Gst.Interfaces.TocSetter gobjectType :: IO GType # | |
HasParentTypes TocSetter Source # | |
Defined in GI.Gst.Interfaces.TocSetter | |
type ParentTypes TocSetter Source # | |
Defined in GI.Gst.Interfaces.TocSetter |
class (GObject o, IsDescendantOf TocSetter o) => IsTocSetter o Source #
Type class for types which can be safely cast to TocSetter
, for instance with toTocSetter
.
Instances
(GObject o, IsDescendantOf TocSetter o) => IsTocSetter o Source # | |
Defined in GI.Gst.Interfaces.TocSetter |
toTocSetter :: (MonadIO m, IsTocSetter o) => o -> m TocSetter Source #
Methods
getToc
:: (HasCallStack, MonadIO m, IsTocSetter a) | |
=> a |
|
-> m (Maybe Toc) | Returns: TOC set, or |
Return current TOC the setter uses. The TOC should not be modified without making it writable first.
reset
:: (HasCallStack, MonadIO m, IsTocSetter a) | |
=> a |
|
-> m () |
Reset the internal TOC. Elements should call this from within the state-change handler.
setToc
:: (HasCallStack, MonadIO m, IsTocSetter a) | |
=> a |
|
-> Maybe Toc |
|
-> m () |
Set the given TOC on the setter. Previously set TOC will be unreffed before setting a new one.