#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GstVideo.Structs.VideoVBIParser
(
VideoVBIParser(..) ,
noVideoVBIParser ,
#if ENABLE_OVERLOADING
VideoVBIParserAddLineMethodInfo ,
#endif
videoVBIParserAddLine ,
#if ENABLE_OVERLOADING
VideoVBIParserCopyMethodInfo ,
#endif
videoVBIParserCopy ,
#if ENABLE_OVERLOADING
VideoVBIParserFreeMethodInfo ,
#endif
videoVBIParserFree ,
#if ENABLE_OVERLOADING
VideoVBIParserGetAncillaryMethodInfo ,
#endif
videoVBIParserGetAncillary ,
videoVBIParserNew ,
) 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
import {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoAncillary as GstVideo.VideoAncillary
newtype VideoVBIParser = VideoVBIParser (ManagedPtr VideoVBIParser)
foreign import ccall "gst_video_vbi_parser_get_type" c_gst_video_vbi_parser_get_type ::
IO GType
instance BoxedObject VideoVBIParser where
boxedType _ = c_gst_video_vbi_parser_get_type
noVideoVBIParser :: Maybe VideoVBIParser
noVideoVBIParser = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList VideoVBIParser
type instance O.AttributeList VideoVBIParser = VideoVBIParserAttributeList
type VideoVBIParserAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gst_video_vbi_parser_new" gst_video_vbi_parser_new ::
CUInt ->
Word32 ->
IO (Ptr VideoVBIParser)
videoVBIParserNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.Enums.VideoFormat
-> Word32
-> m VideoVBIParser
videoVBIParserNew format pixelWidth = liftIO $ do
let format' = (fromIntegral . fromEnum) format
result <- gst_video_vbi_parser_new format' pixelWidth
checkUnexpectedReturnNULL "videoVBIParserNew" result
result' <- (wrapBoxed VideoVBIParser) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_video_vbi_parser_add_line" gst_video_vbi_parser_add_line ::
Ptr VideoVBIParser ->
Ptr Word8 ->
IO ()
videoVBIParserAddLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoVBIParser
-> Ptr Word8
-> m ()
videoVBIParserAddLine parser data_ = liftIO $ do
parser' <- unsafeManagedPtrGetPtr parser
gst_video_vbi_parser_add_line parser' data_
touchManagedPtr parser
return ()
#if ENABLE_OVERLOADING
data VideoVBIParserAddLineMethodInfo
instance (signature ~ (Ptr Word8 -> m ()), MonadIO m) => O.MethodInfo VideoVBIParserAddLineMethodInfo VideoVBIParser signature where
overloadedMethod _ = videoVBIParserAddLine
#endif
foreign import ccall "gst_video_vbi_parser_copy" gst_video_vbi_parser_copy ::
Ptr VideoVBIParser ->
IO (Ptr VideoVBIParser)
videoVBIParserCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoVBIParser
-> m VideoVBIParser
videoVBIParserCopy parser = liftIO $ do
parser' <- unsafeManagedPtrGetPtr parser
result <- gst_video_vbi_parser_copy parser'
checkUnexpectedReturnNULL "videoVBIParserCopy" result
result' <- (wrapBoxed VideoVBIParser) result
touchManagedPtr parser
return result'
#if ENABLE_OVERLOADING
data VideoVBIParserCopyMethodInfo
instance (signature ~ (m VideoVBIParser), MonadIO m) => O.MethodInfo VideoVBIParserCopyMethodInfo VideoVBIParser signature where
overloadedMethod _ = videoVBIParserCopy
#endif
foreign import ccall "gst_video_vbi_parser_free" gst_video_vbi_parser_free ::
Ptr VideoVBIParser ->
IO ()
videoVBIParserFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoVBIParser
-> m ()
videoVBIParserFree parser = liftIO $ do
parser' <- unsafeManagedPtrGetPtr parser
gst_video_vbi_parser_free parser'
touchManagedPtr parser
return ()
#if ENABLE_OVERLOADING
data VideoVBIParserFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoVBIParserFreeMethodInfo VideoVBIParser signature where
overloadedMethod _ = videoVBIParserFree
#endif
foreign import ccall "gst_video_vbi_parser_get_ancillary" gst_video_vbi_parser_get_ancillary ::
Ptr VideoVBIParser ->
Ptr GstVideo.VideoAncillary.VideoAncillary ->
IO CUInt
videoVBIParserGetAncillary ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoVBIParser
-> m ((GstVideo.Enums.VideoVBIParserResult, GstVideo.VideoAncillary.VideoAncillary))
videoVBIParserGetAncillary parser = liftIO $ do
parser' <- unsafeManagedPtrGetPtr parser
anc <- callocBytes 48 :: IO (Ptr GstVideo.VideoAncillary.VideoAncillary)
result <- gst_video_vbi_parser_get_ancillary parser' anc
let result' = (toEnum . fromIntegral) result
anc' <- (wrapPtr GstVideo.VideoAncillary.VideoAncillary) anc
touchManagedPtr parser
return (result', anc')
#if ENABLE_OVERLOADING
data VideoVBIParserGetAncillaryMethodInfo
instance (signature ~ (m ((GstVideo.Enums.VideoVBIParserResult, GstVideo.VideoAncillary.VideoAncillary))), MonadIO m) => O.MethodInfo VideoVBIParserGetAncillaryMethodInfo VideoVBIParser signature where
overloadedMethod _ = videoVBIParserGetAncillary
#endif
#if ENABLE_OVERLOADING
type family ResolveVideoVBIParserMethod (t :: Symbol) (o :: *) :: * where
ResolveVideoVBIParserMethod "addLine" o = VideoVBIParserAddLineMethodInfo
ResolveVideoVBIParserMethod "copy" o = VideoVBIParserCopyMethodInfo
ResolveVideoVBIParserMethod "free" o = VideoVBIParserFreeMethodInfo
ResolveVideoVBIParserMethod "getAncillary" o = VideoVBIParserGetAncillaryMethodInfo
ResolveVideoVBIParserMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoVBIParserMethod t VideoVBIParser, O.MethodInfo info VideoVBIParser p) => OL.IsLabel t (VideoVBIParser -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif