Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Media
is an opaque structure whose members cannot be directly
accessed
Since: 0.2
Synopsis
- newtype Media = Media (ManagedPtr Media)
- class (GObject o, IsDescendantOf Media o) => IsMedia o
- toMedia :: (MonadIO m, IsMedia o) => o -> m Media
- mediaGetAudioVolume :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Double
- mediaGetBufferFill :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Double
- mediaGetCanSeek :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Bool
- mediaGetDuration :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Double
- mediaGetPlaying :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Bool
- mediaGetProgress :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Double
- mediaGetSubtitleFontName :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Text
- mediaGetSubtitleUri :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Text
- mediaGetUri :: (HasCallStack, MonadIO m, IsMedia a) => a -> m Text
- mediaSetAudioVolume :: (HasCallStack, MonadIO m, IsMedia a) => a -> Double -> m ()
- mediaSetFilename :: (HasCallStack, MonadIO m, IsMedia a) => a -> Text -> m ()
- mediaSetPlaying :: (HasCallStack, MonadIO m, IsMedia a) => a -> Bool -> m ()
- mediaSetProgress :: (HasCallStack, MonadIO m, IsMedia a) => a -> Double -> m ()
- mediaSetSubtitleFontName :: (HasCallStack, MonadIO m, IsMedia a) => a -> Text -> m ()
- mediaSetSubtitleUri :: (HasCallStack, MonadIO m, IsMedia a) => a -> Text -> m ()
- mediaSetUri :: (HasCallStack, MonadIO m, IsMedia a) => a -> Text -> m ()
- constructMediaAudioVolume :: (IsMedia o, MonadIO m) => Double -> m (GValueConstruct o)
- getMediaAudioVolume :: (MonadIO m, IsMedia o) => o -> m Double
- setMediaAudioVolume :: (MonadIO m, IsMedia o) => o -> Double -> m ()
- getMediaBufferFill :: (MonadIO m, IsMedia o) => o -> m Double
- getMediaCanSeek :: (MonadIO m, IsMedia o) => o -> m Bool
- getMediaDuration :: (MonadIO m, IsMedia o) => o -> m Double
- constructMediaPlaying :: (IsMedia o, MonadIO m) => Bool -> m (GValueConstruct o)
- getMediaPlaying :: (MonadIO m, IsMedia o) => o -> m Bool
- setMediaPlaying :: (MonadIO m, IsMedia o) => o -> Bool -> m ()
- constructMediaProgress :: (IsMedia o, MonadIO m) => Double -> m (GValueConstruct o)
- getMediaProgress :: (MonadIO m, IsMedia o) => o -> m Double
- setMediaProgress :: (MonadIO m, IsMedia o) => o -> Double -> m ()
- constructMediaSubtitleFontName :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o)
- getMediaSubtitleFontName :: (MonadIO m, IsMedia o) => o -> m (Maybe Text)
- setMediaSubtitleFontName :: (MonadIO m, IsMedia o) => o -> Text -> m ()
- constructMediaSubtitleUri :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o)
- getMediaSubtitleUri :: (MonadIO m, IsMedia o) => o -> m (Maybe Text)
- setMediaSubtitleUri :: (MonadIO m, IsMedia o) => o -> Text -> m ()
- constructMediaUri :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o)
- getMediaUri :: (MonadIO m, IsMedia o) => o -> m (Maybe Text)
- setMediaUri :: (MonadIO m, IsMedia o) => o -> Text -> m ()
- type MediaEosCallback = IO ()
- afterMediaEos :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaEosCallback) -> m SignalHandlerId
- onMediaEos :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaEosCallback) -> m SignalHandlerId
- type MediaErrorCallback = GError -> IO ()
- afterMediaError :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaErrorCallback) -> m SignalHandlerId
- onMediaError :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaErrorCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Media Source # | |
GObject Media Source # | |
Defined in GI.Clutter.Interfaces.Media | |
ManagedPtrNewtype Media Source # | |
Defined in GI.Clutter.Interfaces.Media toManagedPtr :: Media -> ManagedPtr Media | |
TypedObject Media Source # | |
Defined in GI.Clutter.Interfaces.Media | |
HasParentTypes Media Source # | |
Defined in GI.Clutter.Interfaces.Media | |
IsGValue (Maybe Media) Source # | Convert |
Defined in GI.Clutter.Interfaces.Media gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Media -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Media) | |
type ParentTypes Media Source # | |
Defined in GI.Clutter.Interfaces.Media type ParentTypes Media = '[Object] |
class (GObject o, IsDescendantOf Media o) => IsMedia o Source #
Instances
(GObject o, IsDescendantOf Media o) => IsMedia o Source # | |
Defined in GI.Clutter.Interfaces.Media |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAudioVolume, getBufferFill, getCanSeek, getData, getDuration, getPlaying, getProgress, getProperty, getQdata, getSubtitleFontName, getSubtitleUri, getUri.
Setters
setAudioVolume, setData, setDataFull, setFilename, setPlaying, setProgress, setProperty, setSubtitleFontName, setSubtitleUri, setUri.
getAudioVolume
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Double | Returns: The playback volume between 0.0 and 1.0 |
Deprecated: (Since version 1.12)
Retrieves the playback volume of media
.
Since: 1.0
getBufferFill
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Double | Returns: the fill level, between 0.0 and 1.0 |
Deprecated: (Since version 1.12)
Retrieves the amount of the stream that is buffered.
Since: 1.0
getCanSeek
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Bool |
Deprecated: (Since version 1.12)
Retrieves whether media
is seekable or not.
Since: 0.2
getDuration
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Double | Returns: the duration of the media stream, in seconds |
Deprecated: (Since version 1.12)
Retrieves the duration of the media stream that media
represents.
Since: 0.2
getPlaying
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Bool |
Deprecated: (Since version 1.12)
Retrieves the playing status of media
.
Since: 0.2
getProgress
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Double | Returns: the playback progress, between 0.0 and 1.0 |
Deprecated: (Since version 1.12)
Retrieves the playback progress of media
.
Since: 1.0
getSubtitleFontName
mediaGetSubtitleFontName Source #
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Text | Returns: a string containing the font name. Use |
Deprecated: (Since version 1.12)
Retrieves the font name currently used.
Since: 1.2
getSubtitleUri
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Text | Returns: the URI of the subtitle file. Use |
Deprecated: (Since version 1.12)
Retrieves the URI of the subtitle file in use.
Since: 1.2
getUri
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> m Text | Returns: the URI of the media stream. Use |
Deprecated: (Since version 1.12)
Retrieves the URI from media
.
Since: 0.2
setAudioVolume
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Double |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the playback volume of media
to volume
.
Since: 1.0
setFilename
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the source of media
using a file path.
Since: 0.2
setPlaying
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 1.12)
Starts or stops playing of media
.
The implementation might be asynchronous, so the way to know whether
the actual playing state of the media
is to use the Object::notify
signal on the Media
:playing
property and then retrieve the
current state with mediaGetPlaying
. ClutterGstVideoTexture
in clutter-gst is an example of such an asynchronous implementation.
Since: 0.2
setProgress
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Double |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the playback progress of media
. The progress
is
a normalized value between 0.0 (begin) and 1.0 (end).
Since: 1.0
setSubtitleFontName
mediaSetSubtitleFontName Source #
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the font used by the subtitle renderer. The fontName
string must be
either Nothing
, which means that the default font name of the underlying
implementation will be used; or must follow the grammar recognized by
fontDescriptionFromString
like:
clutter_media_set_subtitle_font_name (media, "Sans 24pt");
Since: 1.2
setSubtitleUri
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the location of a subtitle file to display while playing media
.
Since: 1.2
setUri
:: (HasCallStack, MonadIO m, IsMedia a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 1.12)
Sets the URI of media
to uri
.
Since: 0.2
Properties
audioVolume
The volume of the audio, as a normalized value between 0.0 and 1.0.
Since: 1.0
constructMediaAudioVolume :: (IsMedia o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “audio-volume
” property. This is rarely needed directly, but it is used by new
.
getMediaAudioVolume :: (MonadIO m, IsMedia o) => o -> m Double Source #
Get the value of the “audio-volume
” property.
When overloading is enabled, this is equivalent to
get
media #audioVolume
setMediaAudioVolume :: (MonadIO m, IsMedia o) => o -> Double -> m () Source #
Set the value of the “audio-volume
” property.
When overloading is enabled, this is equivalent to
set
media [ #audioVolume:=
value ]
bufferFill
The fill level of the buffer for the current stream, as a value between 0.0 and 1.0.
Since: 1.0
getMediaBufferFill :: (MonadIO m, IsMedia o) => o -> m Double Source #
Get the value of the “buffer-fill
” property.
When overloading is enabled, this is equivalent to
get
media #bufferFill
canSeek
Whether the current stream is seekable.
Since: 0.2
getMediaCanSeek :: (MonadIO m, IsMedia o) => o -> m Bool Source #
Get the value of the “can-seek
” property.
When overloading is enabled, this is equivalent to
get
media #canSeek
duration
The duration of the current stream, in seconds
Since: 0.2
getMediaDuration :: (MonadIO m, IsMedia o) => o -> m Double Source #
Get the value of the “duration
” property.
When overloading is enabled, this is equivalent to
get
media #duration
playing
Whether the Media
actor is playing.
Since: 0.2
constructMediaPlaying :: (IsMedia o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “playing
” property. This is rarely needed directly, but it is used by new
.
getMediaPlaying :: (MonadIO m, IsMedia o) => o -> m Bool Source #
Get the value of the “playing
” property.
When overloading is enabled, this is equivalent to
get
media #playing
setMediaPlaying :: (MonadIO m, IsMedia o) => o -> Bool -> m () Source #
Set the value of the “playing
” property.
When overloading is enabled, this is equivalent to
set
media [ #playing:=
value ]
progress
The current progress of the playback, as a normalized value between 0.0 and 1.0.
Since: 1.0
constructMediaProgress :: (IsMedia o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “progress
” property. This is rarely needed directly, but it is used by new
.
getMediaProgress :: (MonadIO m, IsMedia o) => o -> m Double Source #
Get the value of the “progress
” property.
When overloading is enabled, this is equivalent to
get
media #progress
setMediaProgress :: (MonadIO m, IsMedia o) => o -> Double -> m () Source #
Set the value of the “progress
” property.
When overloading is enabled, this is equivalent to
set
media [ #progress:=
value ]
subtitleFontName
The font used to display subtitles. The font description has to
follow the same grammar as the one recognized by
fontDescriptionFromString
.
Since: 1.2
constructMediaSubtitleFontName :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “subtitle-font-name
” property. This is rarely needed directly, but it is used by new
.
getMediaSubtitleFontName :: (MonadIO m, IsMedia o) => o -> m (Maybe Text) Source #
Get the value of the “subtitle-font-name
” property.
When overloading is enabled, this is equivalent to
get
media #subtitleFontName
setMediaSubtitleFontName :: (MonadIO m, IsMedia o) => o -> Text -> m () Source #
Set the value of the “subtitle-font-name
” property.
When overloading is enabled, this is equivalent to
set
media [ #subtitleFontName:=
value ]
subtitleUri
The location of a subtitle file, expressed as a valid URI.
Since: 1.2
constructMediaSubtitleUri :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “subtitle-uri
” property. This is rarely needed directly, but it is used by new
.
getMediaSubtitleUri :: (MonadIO m, IsMedia o) => o -> m (Maybe Text) Source #
Get the value of the “subtitle-uri
” property.
When overloading is enabled, this is equivalent to
get
media #subtitleUri
setMediaSubtitleUri :: (MonadIO m, IsMedia o) => o -> Text -> m () Source #
Set the value of the “subtitle-uri
” property.
When overloading is enabled, this is equivalent to
set
media [ #subtitleUri:=
value ]
uri
The location of a media file, expressed as a valid URI.
Since: 0.2
constructMediaUri :: (IsMedia o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “uri
” property. This is rarely needed directly, but it is used by new
.
getMediaUri :: (MonadIO m, IsMedia o) => o -> m (Maybe Text) Source #
Get the value of the “uri
” property.
When overloading is enabled, this is equivalent to
get
media #uri
setMediaUri :: (MonadIO m, IsMedia o) => o -> Text -> m () Source #
Set the value of the “uri
” property.
When overloading is enabled, this is equivalent to
set
media [ #uri:=
value ]
Signals
eos
type MediaEosCallback = IO () Source #
Deprecated: (Since version 1.12)
The eos signal is emitted each time the media stream ends.
Since: 0.2
afterMediaEos :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaEosCallback) -> m SignalHandlerId Source #
Connect a signal handler for the eos signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
media #eos callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMediaEos :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaEosCallback) -> m SignalHandlerId Source #
Connect a signal handler for the eos signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
media #eos callback
error
type MediaErrorCallback Source #
= GError |
|
-> IO () |
afterMediaError :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaErrorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the error signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
media #error callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMediaError :: (IsMedia a, MonadIO m) => a -> ((?self :: a) => MediaErrorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the error signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
media #error callback