{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstBase.Flags ( -- * Flags -- ** BaseParseFrameFlags #flag:BaseParseFrameFlags# BaseParseFrameFlags(..) , -- ** BaseSrcFlags #flag:BaseSrcFlags# BaseSrcFlags(..) , -- ** CollectPadsStateFlags #flag:CollectPadsStateFlags# CollectPadsStateFlags(..) , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL -- Flags CollectPadsStateFlags {- | /No description available in the introspection data./ -} data CollectPadsStateFlags = CollectPadsStateFlagsEos {- ^ Set if collectdata\'s pad is EOS. -} | CollectPadsStateFlagsFlushing {- ^ Set if collectdata\'s pad is flushing. -} | CollectPadsStateFlagsNewSegment {- ^ Set if collectdata\'s pad received a new_segment event. -} | CollectPadsStateFlagsWaiting {- ^ Set if collectdata\'s pad must be waited for when collecting. -} | CollectPadsStateFlagsLocked {- ^ Set collectdata\'s pad WAITING state must not be changed. 'GI.GstBase.Flags.CollectPadsStateFlags' indicate private state of a collectdata(\'s pad). -} | AnotherCollectPadsStateFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum CollectPadsStateFlags where fromEnum CollectPadsStateFlagsEos = 1 fromEnum CollectPadsStateFlagsFlushing = 2 fromEnum CollectPadsStateFlagsNewSegment = 4 fromEnum CollectPadsStateFlagsWaiting = 8 fromEnum CollectPadsStateFlagsLocked = 16 fromEnum (AnotherCollectPadsStateFlags k) = k toEnum 1 = CollectPadsStateFlagsEos toEnum 2 = CollectPadsStateFlagsFlushing toEnum 4 = CollectPadsStateFlagsNewSegment toEnum 8 = CollectPadsStateFlagsWaiting toEnum 16 = CollectPadsStateFlagsLocked toEnum k = AnotherCollectPadsStateFlags k instance P.Ord CollectPadsStateFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) instance IsGFlag CollectPadsStateFlags -- Flags BaseSrcFlags {- | The 'GI.Gst.Objects.Element.Element' flags that a basesrc element may have. -} data BaseSrcFlags = BaseSrcFlagsStarting {- ^ has source is starting -} | BaseSrcFlagsStarted {- ^ has source been started -} | BaseSrcFlagsLast {- ^ offset to define more flags -} | AnotherBaseSrcFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum BaseSrcFlags where fromEnum BaseSrcFlagsStarting = 16384 fromEnum BaseSrcFlagsStarted = 32768 fromEnum BaseSrcFlagsLast = 1048576 fromEnum (AnotherBaseSrcFlags k) = k toEnum 16384 = BaseSrcFlagsStarting toEnum 32768 = BaseSrcFlagsStarted toEnum 1048576 = BaseSrcFlagsLast toEnum k = AnotherBaseSrcFlags k instance P.Ord BaseSrcFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) instance IsGFlag BaseSrcFlags -- Flags BaseParseFrameFlags {- | Flags to be used in a 'GI.GstBase.Structs.BaseParseFrame.BaseParseFrame'. -} data BaseParseFrameFlags = BaseParseFrameFlagsNone {- ^ no flag -} | BaseParseFrameFlagsNewFrame {- ^ set by baseclass if current frame is passed for processing to the subclass for the first time (and not set on subsequent calls with same data). -} | BaseParseFrameFlagsNoFrame {- ^ set to indicate this buffer should not be counted as frame, e.g. if this frame is dependent on a previous one. As it is not counted as a frame, bitrate increases but frame to time conversions are maintained. -} | BaseParseFrameFlagsClip {- ^ /@prePushFrame@/ can set this to indicate that regular segment clipping can still be performed (as opposed to any custom one having been done). -} | BaseParseFrameFlagsDrop {- ^ indicates to /@finishFrame@/ that the the frame should be dropped (and might be handled internally by subclass) -} | BaseParseFrameFlagsQueue {- ^ indicates to /@finishFrame@/ that the the frame should be queued for now and processed fully later when the first non-queued frame is finished -} | AnotherBaseParseFrameFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum BaseParseFrameFlags where fromEnum BaseParseFrameFlagsNone = 0 fromEnum BaseParseFrameFlagsNewFrame = 1 fromEnum BaseParseFrameFlagsNoFrame = 2 fromEnum BaseParseFrameFlagsClip = 4 fromEnum BaseParseFrameFlagsDrop = 8 fromEnum BaseParseFrameFlagsQueue = 16 fromEnum (AnotherBaseParseFrameFlags k) = k toEnum 0 = BaseParseFrameFlagsNone toEnum 1 = BaseParseFrameFlagsNewFrame toEnum 2 = BaseParseFrameFlagsNoFrame toEnum 4 = BaseParseFrameFlagsClip toEnum 8 = BaseParseFrameFlagsDrop toEnum 16 = BaseParseFrameFlagsQueue toEnum k = AnotherBaseParseFrameFlags k instance P.Ord BaseParseFrameFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) instance IsGFlag BaseParseFrameFlags