-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

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.GI.Base.Signals as B.Signals
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.
    -- t'GI.GstBase.Flags.CollectPadsStateFlags' indicate private state of a collectdata(\'s pad).
    | AnotherCollectPadsStateFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CollectPadsStateFlags -> ShowS
[CollectPadsStateFlags] -> ShowS
CollectPadsStateFlags -> String
(Int -> CollectPadsStateFlags -> ShowS)
-> (CollectPadsStateFlags -> String)
-> ([CollectPadsStateFlags] -> ShowS)
-> Show CollectPadsStateFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CollectPadsStateFlags] -> ShowS
$cshowList :: [CollectPadsStateFlags] -> ShowS
show :: CollectPadsStateFlags -> String
$cshow :: CollectPadsStateFlags -> String
showsPrec :: Int -> CollectPadsStateFlags -> ShowS
$cshowsPrec :: Int -> CollectPadsStateFlags -> ShowS
Show, CollectPadsStateFlags -> CollectPadsStateFlags -> Bool
(CollectPadsStateFlags -> CollectPadsStateFlags -> Bool)
-> (CollectPadsStateFlags -> CollectPadsStateFlags -> Bool)
-> Eq CollectPadsStateFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectPadsStateFlags -> CollectPadsStateFlags -> Bool
$c/= :: CollectPadsStateFlags -> CollectPadsStateFlags -> Bool
== :: CollectPadsStateFlags -> CollectPadsStateFlags -> Bool
$c== :: CollectPadsStateFlags -> CollectPadsStateFlags -> Bool
Eq)

instance P.Enum CollectPadsStateFlags where
    fromEnum :: CollectPadsStateFlags -> Int
fromEnum CollectPadsStateFlagsEos = 1
    fromEnum CollectPadsStateFlagsFlushing = 2
    fromEnum CollectPadsStateFlagsNewSegment = 4
    fromEnum CollectPadsStateFlagsWaiting = 8
    fromEnum CollectPadsStateFlagsLocked = 16
    fromEnum (AnotherCollectPadsStateFlags k :: Int
k) = Int
k

    toEnum :: Int -> CollectPadsStateFlags
toEnum 1 = CollectPadsStateFlags
CollectPadsStateFlagsEos
    toEnum 2 = CollectPadsStateFlags
CollectPadsStateFlagsFlushing
    toEnum 4 = CollectPadsStateFlags
CollectPadsStateFlagsNewSegment
    toEnum 8 = CollectPadsStateFlags
CollectPadsStateFlagsWaiting
    toEnum 16 = CollectPadsStateFlags
CollectPadsStateFlagsLocked
    toEnum k :: Int
k = Int -> CollectPadsStateFlags
AnotherCollectPadsStateFlags Int
k

instance P.Ord CollectPadsStateFlags where
    compare :: CollectPadsStateFlags -> CollectPadsStateFlags -> Ordering
compare a :: CollectPadsStateFlags
a b :: CollectPadsStateFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CollectPadsStateFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum CollectPadsStateFlags
a) (CollectPadsStateFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum CollectPadsStateFlags
b)

instance IsGFlag CollectPadsStateFlags

-- Flags BaseSrcFlags
-- | The t'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 (Int -> BaseSrcFlags -> ShowS
[BaseSrcFlags] -> ShowS
BaseSrcFlags -> String
(Int -> BaseSrcFlags -> ShowS)
-> (BaseSrcFlags -> String)
-> ([BaseSrcFlags] -> ShowS)
-> Show BaseSrcFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BaseSrcFlags] -> ShowS
$cshowList :: [BaseSrcFlags] -> ShowS
show :: BaseSrcFlags -> String
$cshow :: BaseSrcFlags -> String
showsPrec :: Int -> BaseSrcFlags -> ShowS
$cshowsPrec :: Int -> BaseSrcFlags -> ShowS
Show, BaseSrcFlags -> BaseSrcFlags -> Bool
(BaseSrcFlags -> BaseSrcFlags -> Bool)
-> (BaseSrcFlags -> BaseSrcFlags -> Bool) -> Eq BaseSrcFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaseSrcFlags -> BaseSrcFlags -> Bool
$c/= :: BaseSrcFlags -> BaseSrcFlags -> Bool
== :: BaseSrcFlags -> BaseSrcFlags -> Bool
$c== :: BaseSrcFlags -> BaseSrcFlags -> Bool
Eq)

instance P.Enum BaseSrcFlags where
    fromEnum :: BaseSrcFlags -> Int
fromEnum BaseSrcFlagsStarting = 16384
    fromEnum BaseSrcFlagsStarted = 32768
    fromEnum BaseSrcFlagsLast = 1048576
    fromEnum (AnotherBaseSrcFlags k :: Int
k) = Int
k

    toEnum :: Int -> BaseSrcFlags
toEnum 16384 = BaseSrcFlags
BaseSrcFlagsStarting
    toEnum 32768 = BaseSrcFlags
BaseSrcFlagsStarted
    toEnum 1048576 = BaseSrcFlags
BaseSrcFlagsLast
    toEnum k :: Int
k = Int -> BaseSrcFlags
AnotherBaseSrcFlags Int
k

instance P.Ord BaseSrcFlags where
    compare :: BaseSrcFlags -> BaseSrcFlags -> Ordering
compare a :: BaseSrcFlags
a b :: BaseSrcFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BaseSrcFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum BaseSrcFlags
a) (BaseSrcFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum BaseSrcFlags
b)

instance IsGFlag BaseSrcFlags

-- Flags BaseParseFrameFlags
-- | Flags to be used in a t'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 (Int -> BaseParseFrameFlags -> ShowS
[BaseParseFrameFlags] -> ShowS
BaseParseFrameFlags -> String
(Int -> BaseParseFrameFlags -> ShowS)
-> (BaseParseFrameFlags -> String)
-> ([BaseParseFrameFlags] -> ShowS)
-> Show BaseParseFrameFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BaseParseFrameFlags] -> ShowS
$cshowList :: [BaseParseFrameFlags] -> ShowS
show :: BaseParseFrameFlags -> String
$cshow :: BaseParseFrameFlags -> String
showsPrec :: Int -> BaseParseFrameFlags -> ShowS
$cshowsPrec :: Int -> BaseParseFrameFlags -> ShowS
Show, BaseParseFrameFlags -> BaseParseFrameFlags -> Bool
(BaseParseFrameFlags -> BaseParseFrameFlags -> Bool)
-> (BaseParseFrameFlags -> BaseParseFrameFlags -> Bool)
-> Eq BaseParseFrameFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaseParseFrameFlags -> BaseParseFrameFlags -> Bool
$c/= :: BaseParseFrameFlags -> BaseParseFrameFlags -> Bool
== :: BaseParseFrameFlags -> BaseParseFrameFlags -> Bool
$c== :: BaseParseFrameFlags -> BaseParseFrameFlags -> Bool
Eq)

instance P.Enum BaseParseFrameFlags where
    fromEnum :: BaseParseFrameFlags -> Int
fromEnum BaseParseFrameFlagsNone = 0
    fromEnum BaseParseFrameFlagsNewFrame = 1
    fromEnum BaseParseFrameFlagsNoFrame = 2
    fromEnum BaseParseFrameFlagsClip = 4
    fromEnum BaseParseFrameFlagsDrop = 8
    fromEnum BaseParseFrameFlagsQueue = 16
    fromEnum (AnotherBaseParseFrameFlags k :: Int
k) = Int
k

    toEnum :: Int -> BaseParseFrameFlags
toEnum 0 = BaseParseFrameFlags
BaseParseFrameFlagsNone
    toEnum 1 = BaseParseFrameFlags
BaseParseFrameFlagsNewFrame
    toEnum 2 = BaseParseFrameFlags
BaseParseFrameFlagsNoFrame
    toEnum 4 = BaseParseFrameFlags
BaseParseFrameFlagsClip
    toEnum 8 = BaseParseFrameFlags
BaseParseFrameFlagsDrop
    toEnum 16 = BaseParseFrameFlags
BaseParseFrameFlagsQueue
    toEnum k :: Int
k = Int -> BaseParseFrameFlags
AnotherBaseParseFrameFlags Int
k

instance P.Ord BaseParseFrameFlags where
    compare :: BaseParseFrameFlags -> BaseParseFrameFlags -> Ordering
compare a :: BaseParseFrameFlags
a b :: BaseParseFrameFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BaseParseFrameFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum BaseParseFrameFlags
a) (BaseParseFrameFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum BaseParseFrameFlags
b)

instance IsGFlag BaseParseFrameFlags