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 |
A Pipeline
can take an audio-video Timeline
and conveniently
link its Track
-s to an internal playsink
element, for
preview/playback, and an internal encodebin
element, for rendering.
You can switch between these modes using pipelineSetMode
.
You can choose the specific audio and video sinks used for previewing the timeline by setting the Pipeline:audioSink and Pipeline:videoSink properties.
You can set the encoding and save location used in rendering by calling
pipelineSetRenderSettings
.
Synopsis
- newtype Pipeline = Pipeline (ManagedPtr Pipeline)
- class (GObject o, IsDescendantOf Pipeline o) => IsPipeline o
- toPipeline :: (MonadIO m, IsPipeline o) => o -> m Pipeline
- pipelineGetMode :: (HasCallStack, MonadIO m, IsPipeline a) => a -> m [PipelineFlags]
- pipelineGetThumbnail :: (HasCallStack, MonadIO m, IsPipeline a) => a -> Caps -> m (Maybe Sample)
- pipelineGetThumbnailRgb24 :: (HasCallStack, MonadIO m, IsPipeline a) => a -> Int32 -> Int32 -> m (Maybe Sample)
- pipelineNew :: (HasCallStack, MonadIO m) => m Pipeline
- pipelinePreviewGetAudioSink :: (HasCallStack, MonadIO m, IsPipeline a) => a -> m (Maybe Element)
- pipelinePreviewGetVideoSink :: (HasCallStack, MonadIO m, IsPipeline a) => a -> m (Maybe Element)
- pipelinePreviewSetAudioSink :: (HasCallStack, MonadIO m, IsPipeline a, IsElement b) => a -> Maybe b -> m ()
- pipelinePreviewSetVideoSink :: (HasCallStack, MonadIO m, IsPipeline a, IsElement b) => a -> Maybe b -> m ()
- pipelineSaveThumbnail :: (HasCallStack, MonadIO m, IsPipeline a) => a -> Int32 -> Int32 -> Text -> Text -> m ()
- pipelineSetMode :: (HasCallStack, MonadIO m, IsPipeline a) => a -> [PipelineFlags] -> m Bool
- pipelineSetRenderSettings :: (HasCallStack, MonadIO m, IsPipeline a, IsEncodingProfile b) => a -> Text -> b -> m Bool
- pipelineSetTimeline :: (HasCallStack, MonadIO m, IsPipeline a, IsTimeline b) => a -> b -> m Bool
- clearPipelineAudioFilter :: (MonadIO m, IsPipeline o) => o -> m ()
- constructPipelineAudioFilter :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o)
- getPipelineAudioFilter :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element)
- setPipelineAudioFilter :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m ()
- clearPipelineAudioSink :: (MonadIO m, IsPipeline o) => o -> m ()
- constructPipelineAudioSink :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o)
- getPipelineAudioSink :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element)
- setPipelineAudioSink :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m ()
- constructPipelineMode :: (IsPipeline o, MonadIO m) => [PipelineFlags] -> m (GValueConstruct o)
- getPipelineMode :: (MonadIO m, IsPipeline o) => o -> m [PipelineFlags]
- setPipelineMode :: (MonadIO m, IsPipeline o) => o -> [PipelineFlags] -> m ()
- clearPipelineTimeline :: (MonadIO m, IsPipeline o) => o -> m ()
- constructPipelineTimeline :: (IsPipeline o, MonadIO m, IsTimeline a) => a -> m (GValueConstruct o)
- getPipelineTimeline :: (MonadIO m, IsPipeline o) => o -> m (Maybe Timeline)
- setPipelineTimeline :: (MonadIO m, IsPipeline o, IsTimeline a) => o -> a -> m ()
- clearPipelineVideoFilter :: (MonadIO m, IsPipeline o) => o -> m ()
- constructPipelineVideoFilter :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o)
- getPipelineVideoFilter :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element)
- setPipelineVideoFilter :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m ()
- clearPipelineVideoSink :: (MonadIO m, IsPipeline o) => o -> m ()
- constructPipelineVideoSink :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o)
- getPipelineVideoSink :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element)
- setPipelineVideoSink :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Pipeline Source # | |
GObject Pipeline Source # | |
Defined in GI.GES.Objects.Pipeline | |
ManagedPtrNewtype Pipeline Source # | |
Defined in GI.GES.Objects.Pipeline toManagedPtr :: Pipeline -> ManagedPtr Pipeline | |
TypedObject Pipeline Source # | |
Defined in GI.GES.Objects.Pipeline | |
HasParentTypes Pipeline Source # | |
Defined in GI.GES.Objects.Pipeline | |
IsGValue (Maybe Pipeline) Source # | Convert |
Defined in GI.GES.Objects.Pipeline gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Pipeline -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Pipeline) | |
type ParentTypes Pipeline Source # | |
Defined in GI.GES.Objects.Pipeline type ParentTypes Pipeline = '[Pipeline, Bin, Element, Object, Object, ChildProxy, VideoOverlay] |
class (GObject o, IsDescendantOf Pipeline o) => IsPipeline o Source #
Type class for types which can be safely cast to Pipeline
, for instance with toPipeline
.
Instances
(GObject o, IsDescendantOf Pipeline o) => IsPipeline o Source # | |
Defined in GI.GES.Objects.Pipeline |
toPipeline :: (MonadIO m, IsPipeline o) => o -> m Pipeline Source #
Methods
Click to display all available methods, including inherited ones
Methods
abortState, add, addControlBinding, addPad, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, autoClock, bindProperty, bindPropertyFull, callAsync, changeState, childAdded, childRemoved, continueState, createAllPads, defaultError, expose, findUnlinkedPad, forceFloating, foreachPad, foreachSinkPad, foreachSrcPad, freezeNotify, getv, gotWindowHandle, handleEvents, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isFloating, isLockedState, iterateAllByElementFactoryName, iterateAllByInterface, iterateElements, iteratePads, iterateRecurse, iterateSinkPads, iterateSinks, iterateSorted, iterateSources, iterateSrcPads, link, linkFiltered, linkPads, linkPadsFiltered, linkPadsFull, lookup, lostState, messageFull, messageFullWithDetails, noMorePads, notify, notifyByPspec, postMessage, prepareWindowHandle, previewGetAudioSink, previewGetVideoSink, previewSetAudioSink, previewSetVideoSink, provideClock, query, queryConvert, queryDuration, queryPosition, recalculateLatency, ref, refSink, releaseRequestPad, remove, removeControlBinding, removePad, removePropertyNotifyWatch, requestPad, requestPadSimple, runDispose, saveThumbnail, seek, seekSimple, sendEvent, stealData, stealQdata, suggestNextSync, syncChildrenStates, syncStateWithParent, syncValues, thawNotify, unlink, unlinkPads, unparent, unref, useClock, watchClosure.
Getters
getAutoFlushBus, getBaseTime, getBus, getByInterface, getByName, getByNameRecurseUp, getChildByIndex, getChildByName, getChildByNameRecurse, getChildrenCount, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContextUnlocked, getContexts, getControlBinding, getControlRate, getCurrentClockTime, getCurrentRunningTime, getData, getDelay, getFactory, getGValueArray, getLatency, getMetadata, getMode, getName, getPadTemplate, getPadTemplateList, getParent, getPathString, getPipelineClock, getProperty, getQdata, getRequestPad, getStartTime, getState, getStaticPad, getSuppressedFlags, getThumbnail, getThumbnailRgb24, getValue.
Setters
setAutoFlushBus, setBaseTime, setBus, setClock, setContext, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setDelay, setLatency, setLockedState, setMode, setName, setParent, setProperty, setRenderRectangle, setRenderSettings, setStartTime, setState, setSuppressedFlags, setTimeline, setWindowHandle.
getMode
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> m [PipelineFlags] | Returns: The current mode of |
Gets the Pipeline:mode of the pipeline.
getThumbnail
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> Caps |
|
-> m (Maybe Sample) | Returns: A sample of |
Gets a sample from the pipeline of the currently displayed image in preview, in the specified format.
Note that if you use "ANY" caps for caps
, then the current format of
the image is used. You can retrieve these caps from the returned sample
with sampleGetCaps
.
getThumbnailRgb24
pipelineGetThumbnailRgb24 Source #
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m (Maybe Sample) | Returns: A sample of |
Gets a sample from the pipeline of the currently displayed image in preview, in the 24-bit "RGB" format and of the desired width and height.
See pipelineGetThumbnail
.
new
:: (HasCallStack, MonadIO m) | |
=> m Pipeline | Returns: The newly created pipeline. |
Creates a new pipeline.
previewGetAudioSink
pipelinePreviewGetAudioSink Source #
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> m (Maybe Element) | Returns: The audio sink used by |
Gets the Pipeline:audioSink of the pipeline.
previewGetVideoSink
pipelinePreviewGetVideoSink Source #
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> m (Maybe Element) | Returns: The video sink used by |
Gets the Pipeline:videoSink of the pipeline.
previewSetAudioSink
pipelinePreviewSetAudioSink Source #
:: (HasCallStack, MonadIO m, IsPipeline a, IsElement b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the Pipeline:audioSink of the pipeline.
previewSetVideoSink
pipelinePreviewSetVideoSink Source #
:: (HasCallStack, MonadIO m, IsPipeline a, IsElement b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the Pipeline:videoSink of the pipeline.
saveThumbnail
pipelineSaveThumbnail Source #
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Saves the currently displayed image of the pipeline in preview to the given location, in the specified dimensions and format.
setMode
:: (HasCallStack, MonadIO m, IsPipeline a) | |
=> a |
|
-> [PipelineFlags] |
|
-> m Bool | Returns: |
Sets the Pipeline:mode of the pipeline.
Note that the pipeline will be set to GST_STATE_NULL
during this call to
perform the necessary changes. You will need to set the state again yourself
after calling this.
**NOTE**: <http://developer.gnome.org/ges/stable/ges_pipeline_set_render_settings Rendering settings> need to be set before setting /@mode@/ to @/GES_PIPELINE_MODE_RENDER/@ or @/GES_PIPELINE_MODE_SMART_RENDER/@, the call to this method will fail otherwise.
setRenderSettings
pipelineSetRenderSettings Source #
:: (HasCallStack, MonadIO m, IsPipeline a, IsEncodingProfile b) | |
=> a |
|
-> Text |
|
-> b |
|
-> m Bool | Returns: |
Specifies encoding setting to be used by the pipeline to render its Pipeline:timeline, and where the result should be written to.
This method **must** be called before setting the pipeline mode to
GES_PIPELINE_MODE_RENDER
.
setTimeline
:: (HasCallStack, MonadIO m, IsPipeline a, IsTimeline b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Takes the given timeline and sets it as the Pipeline:timeline for the pipeline.
Note that you should only call this method once on a given pipeline because a pipeline can not have its Pipeline:timeline changed after it has been set.
Properties
audioFilter
The audio filter(s) to apply during playback in preview mode,
immediately before the Pipeline:audioSink. This exposes the
playsink:audio-filter
property of the internal playsink
.
Since: 1.6.0
clearPipelineAudioFilter :: (MonadIO m, IsPipeline o) => o -> m () Source #
Set the value of the “audio-filter
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#audioFilter
constructPipelineAudioFilter :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “audio-filter
” property. This is rarely needed directly, but it is used by new
.
getPipelineAudioFilter :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element) Source #
Get the value of the “audio-filter
” property.
When overloading is enabled, this is equivalent to
get
pipeline #audioFilter
setPipelineAudioFilter :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m () Source #
Set the value of the “audio-filter
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #audioFilter:=
value ]
audioSink
The audio sink used for preview. This exposes the
playsink:audio-sink
property of the internal playsink
.
clearPipelineAudioSink :: (MonadIO m, IsPipeline o) => o -> m () Source #
Set the value of the “audio-sink
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#audioSink
constructPipelineAudioSink :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “audio-sink
” property. This is rarely needed directly, but it is used by new
.
getPipelineAudioSink :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element) Source #
Get the value of the “audio-sink
” property.
When overloading is enabled, this is equivalent to
get
pipeline #audioSink
setPipelineAudioSink :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m () Source #
Set the value of the “audio-sink
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #audioSink:=
value ]
mode
The pipeline's mode. In preview mode (for audio or video, or both) the pipeline can display the timeline's content to an end user. In rendering mode the pipeline can encode the timeline's content and save it to a file.
constructPipelineMode :: (IsPipeline o, MonadIO m) => [PipelineFlags] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “mode
” property. This is rarely needed directly, but it is used by new
.
getPipelineMode :: (MonadIO m, IsPipeline o) => o -> m [PipelineFlags] Source #
Get the value of the “mode
” property.
When overloading is enabled, this is equivalent to
get
pipeline #mode
setPipelineMode :: (MonadIO m, IsPipeline o) => o -> [PipelineFlags] -> m () Source #
Set the value of the “mode
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #mode:=
value ]
timeline
The timeline used by this pipeline, whose content it will play and
render, or Nothing
if the pipeline does not yet have a timeline.
Note that after you set the timeline for the first time, subsequent calls to change the timeline will fail.
clearPipelineTimeline :: (MonadIO m, IsPipeline o) => o -> m () Source #
Set the value of the “timeline
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#timeline
constructPipelineTimeline :: (IsPipeline o, MonadIO m, IsTimeline a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “timeline
” property. This is rarely needed directly, but it is used by new
.
getPipelineTimeline :: (MonadIO m, IsPipeline o) => o -> m (Maybe Timeline) Source #
Get the value of the “timeline
” property.
When overloading is enabled, this is equivalent to
get
pipeline #timeline
setPipelineTimeline :: (MonadIO m, IsPipeline o, IsTimeline a) => o -> a -> m () Source #
Set the value of the “timeline
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #timeline:=
value ]
videoFilter
The video filter(s) to apply during playback in preview mode,
immediately before the Pipeline:videoSink. This exposes the
playsink:video-filter
property of the internal playsink
.
Since: 1.6.0
clearPipelineVideoFilter :: (MonadIO m, IsPipeline o) => o -> m () Source #
Set the value of the “video-filter
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#videoFilter
constructPipelineVideoFilter :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “video-filter
” property. This is rarely needed directly, but it is used by new
.
getPipelineVideoFilter :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element) Source #
Get the value of the “video-filter
” property.
When overloading is enabled, this is equivalent to
get
pipeline #videoFilter
setPipelineVideoFilter :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m () Source #
Set the value of the “video-filter
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #videoFilter:=
value ]
videoSink
The video sink used for preview. This exposes the
playsink:video-sink
property of the internal playsink
.
clearPipelineVideoSink :: (MonadIO m, IsPipeline o) => o -> m () Source #
Set the value of the “video-sink
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#videoSink
constructPipelineVideoSink :: (IsPipeline o, MonadIO m, IsElement a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “video-sink
” property. This is rarely needed directly, but it is used by new
.
getPipelineVideoSink :: (MonadIO m, IsPipeline o) => o -> m (Maybe Element) Source #
Get the value of the “video-sink
” property.
When overloading is enabled, this is equivalent to
get
pipeline #videoSink
setPipelineVideoSink :: (MonadIO m, IsPipeline o, IsElement a) => o -> a -> m () Source #
Set the value of the “video-sink
” property.
When overloading is enabled, this is equivalent to
set
pipeline [ #videoSink:=
value ]