gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Interfaces.Media

Description

Media is an opaque structure whose members cannot be directly accessed

Since: 0.2

Synopsis

Exported types

newtype Media Source #

Memory-managed wrapper type.

Constructors

Media (ManagedPtr Media) 

Instances

Instances details
Eq Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

Methods

(==) :: Media -> Media -> Bool #

(/=) :: Media -> Media -> Bool #

GObject Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

ManagedPtrNewtype Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

Methods

toManagedPtr :: Media -> ManagedPtr Media

TypedObject Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

Methods

glibType :: IO GType

HasParentTypes Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

IsGValue (Maybe Media) Source #

Convert Media to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Interfaces.Media

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Media -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Media)

type ParentTypes Media Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

type ParentTypes Media = '[Object]

class (GObject o, IsDescendantOf Media o) => IsMedia o Source #

Type class for types which can be safely cast to Media, for instance with toMedia.

Instances

Instances details
(GObject o, IsDescendantOf Media o) => IsMedia o Source # 
Instance details

Defined in GI.Clutter.Interfaces.Media

toMedia :: (MonadIO m, IsMedia o) => o -> m Media Source #

Cast to Media, for types for which this is known to be safe. For general casts, use castTo.

Methods

getAudioVolume

mediaGetAudioVolume Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> 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

mediaGetBufferFill Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> 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

mediaGetCanSeek Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> m Bool

Returns: True if media can seek, False otherwise.

Deprecated: (Since version 1.12)

Retrieves whether media is seekable or not.

Since: 0.2

getDuration

mediaGetDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> 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

mediaGetPlaying Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: A Media object

-> m Bool

Returns: True if playing, False if stopped.

Deprecated: (Since version 1.12)

Retrieves the playing status of media.

Since: 0.2

getProgress

mediaGetProgress Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> m Text

Returns: a string containing the font name. Use free to free the returned string

Deprecated: (Since version 1.12)

Retrieves the font name currently used.

Since: 1.2

getSubtitleUri

mediaGetSubtitleUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> m Text

Returns: the URI of the subtitle file. Use free to free the returned string

Deprecated: (Since version 1.12)

Retrieves the URI of the subtitle file in use.

Since: 1.2

getUri

mediaGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> m Text

Returns: the URI of the media stream. Use free to free the returned string

Deprecated: (Since version 1.12)

Retrieves the URI from media.

Since: 0.2

setAudioVolume

mediaSetAudioVolume Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Double

volume: the volume as a double between 0.0 and 1.0

-> m () 

Deprecated: (Since version 1.12)

Sets the playback volume of media to volume.

Since: 1.0

setFilename

mediaSetFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Text

filename: A filename

-> m () 

Deprecated: (Since version 1.12)

Sets the source of media using a file path.

Since: 0.2

setPlaying

mediaSetPlaying Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Bool

playing: True to start playing

-> 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

mediaSetProgress Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Double

progress: the progress of the playback, between 0.0 and 1.0

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Text

fontName: a font name, or Nothing to set the default font name

-> 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

mediaSetSubtitleUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Text

uri: the URI of a subtitle file

-> m () 

Deprecated: (Since version 1.12)

Sets the location of a subtitle file to display while playing media.

Since: 1.2

setUri

mediaSetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsMedia a) 
=> a

media: a Media

-> Text

uri: the URI of the media stream

-> 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 #

Arguments

 = GError

error: the GError

-> IO () 

Deprecated: (Since version 1.12)

The error signal is emitted each time an error occurred.

Since: 0.2

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