Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
#GstContext is a container object used to store contexts like a device context, a display server connection and similar concepts that should be shared between multiple elements.
Applications can set a context on a complete pipeline by using gst_element_set_context(), which will then be propagated to all child elements. Elements can handle these in #GstElementClass.set_context() and merge them with the context information they already have.
When an element needs a context it will do the following actions in this order until one step succeeds: 1. Check if the element already has a context 2. Query downstream with GST_QUERY_CONTEXT for the context 3. Query upstream with GST_QUERY_CONTEXT for the context 4. Post a GST_MESSAGE_NEED_CONTEXT message on the bus with the required context types and afterwards check if a usable context was set now 5. Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT message on the bus.
Bins will catch GST_MESSAGE_NEED_CONTEXT messages and will set any previously known context on the element that asks for it if possible. Otherwise the application should provide one if it can.
- newtype Context = Context (ForeignPtr Context)
- noContext :: Maybe Context
- data ContextGetContextTypeMethodInfo
- contextGetContextType :: MonadIO m => Context -> m Text
- data ContextGetStructureMethodInfo
- contextGetStructure :: MonadIO m => Context -> m Structure
- data ContextHasContextTypeMethodInfo
- contextHasContextType :: MonadIO m => Context -> Text -> m Bool
- data ContextIsPersistentMethodInfo
- contextIsPersistent :: MonadIO m => Context -> m Bool
- contextNew :: MonadIO m => Text -> Bool -> m Context
- data ContextWritableStructureMethodInfo
- contextWritableStructure :: MonadIO m => Context -> m Structure
Exported types
BoxedObject Context Source | |
((~) * info (ResolveContextMethod t Context), MethodInfo * info Context p) => IsLabel t (Context -> p) Source | |
((~) * info (ResolveContextMethod t Context), MethodInfo * info Context p) => IsLabelProxy t (Context -> p) Source | |
((~) (TYPE Lifted) signature (m Structure), MonadIO m) => MethodInfo (TYPE Lifted) ContextWritableStructureMethodInfo Context signature Source | |
((~) (TYPE Lifted) signature (m Bool), MonadIO m) => MethodInfo (TYPE Lifted) ContextIsPersistentMethodInfo Context signature Source | |
((~) (TYPE Lifted) signature (Text -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) ContextHasContextTypeMethodInfo Context signature Source | |
((~) (TYPE Lifted) signature (m Structure), MonadIO m) => MethodInfo (TYPE Lifted) ContextGetStructureMethodInfo Context signature Source | |
((~) (TYPE Lifted) signature (m Text), MonadIO m) => MethodInfo (TYPE Lifted) ContextGetContextTypeMethodInfo Context signature Source | |
Methods
contextGetContextType
data ContextGetContextTypeMethodInfo Source
((~) (TYPE Lifted) signature (m Text), MonadIO m) => MethodInfo (TYPE Lifted) ContextGetContextTypeMethodInfo Context signature Source | |
contextGetContextType :: MonadIO m => Context -> m Text Source
contextGetStructure
data ContextGetStructureMethodInfo Source
((~) (TYPE Lifted) signature (m Structure), MonadIO m) => MethodInfo (TYPE Lifted) ContextGetStructureMethodInfo Context signature Source | |
contextGetStructure :: MonadIO m => Context -> m Structure Source
contextHasContextType
contextIsPersistent
data ContextIsPersistentMethodInfo Source
((~) (TYPE Lifted) signature (m Bool), MonadIO m) => MethodInfo (TYPE Lifted) ContextIsPersistentMethodInfo Context signature Source | |
contextIsPersistent :: MonadIO m => Context -> m Bool Source
contextNew
contextWritableStructure
data ContextWritableStructureMethodInfo Source
((~) (TYPE Lifted) signature (m Structure), MonadIO m) => MethodInfo (TYPE Lifted) ContextWritableStructureMethodInfo Context signature Source | |
contextWritableStructure :: MonadIO m => Context -> m Structure Source