#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstVideo.Functions
(
bufferAddVideoAfdMeta ,
bufferAddVideoAffineTransformationMeta ,
bufferAddVideoBarMeta ,
bufferAddVideoCaptionMeta ,
bufferAddVideoCodecAlphaMeta ,
bufferAddVideoGlTextureUploadMeta ,
bufferAddVideoMeta ,
bufferAddVideoMetaFull ,
bufferAddVideoOverlayCompositionMeta ,
bufferAddVideoRegionOfInterestMeta ,
bufferAddVideoRegionOfInterestMetaId ,
bufferAddVideoSeiUserDataUnregisteredMeta,
bufferAddVideoTimeCodeMeta ,
bufferAddVideoTimeCodeMetaFull ,
bufferGetVideoMeta ,
bufferGetVideoMetaId ,
bufferGetVideoRegionOfInterestMetaId ,
bufferPoolConfigGetVideoAlignment ,
bufferPoolConfigSetVideoAlignment ,
isVideoOverlayPrepareWindowHandleMessage,
videoAfdMetaApiGetType ,
videoAffineTransformationMetaApiGetType ,
videoBarMetaApiGetType ,
videoBlend ,
videoBlendScaleLinearRGBA ,
videoCalculateDisplayRatio ,
videoCaptionMetaApiGetType ,
videoCenterRect ,
videoChromaFromString ,
videoChromaResample ,
videoChromaToString ,
videoCodecAlphaMetaApiGetType ,
videoColorTransferDecode ,
videoColorTransferEncode ,
videoConvertSample ,
videoConvertSampleAsync ,
videoCropMetaApiGetType ,
videoEventIsForceKeyUnit ,
videoEventNewDownstreamForceKeyUnit ,
videoEventNewStillFrame ,
videoEventNewUpstreamForceKeyUnit ,
videoEventParseDownstreamForceKeyUnit ,
videoEventParseStillFrame ,
videoEventParseUpstreamForceKeyUnit ,
videoFormatsRaw ,
videoGlTextureUploadMetaApiGetType ,
videoGuessFramerate ,
videoIsCommonAspectRatio ,
videoMakeRawCaps ,
videoMakeRawCapsWithFeatures ,
videoMetaApiGetType ,
videoMultiviewGetDoubledHeightModes ,
videoMultiviewGetDoubledSizeModes ,
videoMultiviewGetDoubledWidthModes ,
videoMultiviewGetMonoModes ,
videoMultiviewGetUnpackedModes ,
videoMultiviewGuessHalfAspect ,
videoMultiviewVideoInfoChangeMode ,
videoOverlayCompositionMetaApiGetType ,
videoRegionOfInterestMetaApiGetType ,
videoSeiUserDataUnregisteredMetaApiGetType,
videoSeiUserDataUnregisteredParsePrecisionTimeStamp,
videoTileGetIndex ,
videoTimeCodeMetaApiGetType ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 qualified GHC.Records as R
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.Gst.Structs.Buffer as Gst.Buffer
import qualified GI.Gst.Structs.Caps as Gst.Caps
import qualified GI.Gst.Structs.CapsFeatures as Gst.CapsFeatures
import qualified GI.Gst.Structs.Event as Gst.Event
import qualified GI.Gst.Structs.Message as Gst.Message
import qualified GI.Gst.Structs.Sample as Gst.Sample
import qualified GI.Gst.Structs.Structure as Gst.Structure
import qualified GI.GstVideo.Callbacks as GstVideo.Callbacks
import {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums
import {-# SOURCE #-} qualified GI.GstVideo.Flags as GstVideo.Flags
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoAFDMeta as GstVideo.VideoAFDMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoAffineTransformationMeta as GstVideo.VideoAffineTransformationMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoAlignment as GstVideo.VideoAlignment
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoBarMeta as GstVideo.VideoBarMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoCaptionMeta as GstVideo.VideoCaptionMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoChromaResample as GstVideo.VideoChromaResample
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoCodecAlphaMeta as GstVideo.VideoCodecAlphaMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoFrame as GstVideo.VideoFrame
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoGLTextureUploadMeta as GstVideo.VideoGLTextureUploadMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoInfo as GstVideo.VideoInfo
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoMeta as GstVideo.VideoMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoOverlayComposition as GstVideo.VideoOverlayComposition
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoOverlayCompositionMeta as GstVideo.VideoOverlayCompositionMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoRectangle as GstVideo.VideoRectangle
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoRegionOfInterestMeta as GstVideo.VideoRegionOfInterestMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoSEIUserDataUnregisteredMeta as GstVideo.VideoSEIUserDataUnregisteredMeta
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoTimeCode as GstVideo.VideoTimeCode
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoTimeCodeMeta as GstVideo.VideoTimeCodeMeta
foreign import ccall "gst_video_time_code_meta_api_get_type" gst_video_time_code_meta_api_get_type ::
IO CGType
videoTimeCodeMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoTimeCodeMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoTimeCodeMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_time_code_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_tile_get_index" gst_video_tile_get_index ::
CUInt ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO Word32
videoTileGetIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.Enums.VideoTileMode
-> Int32
-> Int32
-> Int32
-> Int32
-> m Word32
videoTileGetIndex :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoTileMode -> Int32 -> Int32 -> Int32 -> Int32 -> m Word32
videoTileGetIndex VideoTileMode
mode Int32
x Int32
y Int32
xTiles Int32
yTiles = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoTileMode -> Int) -> VideoTileMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoTileMode -> Int
forall a. Enum a => a -> Int
fromEnum) VideoTileMode
mode
Word32
result <- CUInt -> Int32 -> Int32 -> Int32 -> Int32 -> IO Word32
gst_video_tile_get_index CUInt
mode' Int32
x Int32
y Int32
xTiles Int32
yTiles
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "gst_video_sei_user_data_unregistered_parse_precision_time_stamp" gst_video_sei_user_data_unregistered_parse_precision_time_stamp ::
Ptr GstVideo.VideoSEIUserDataUnregisteredMeta.VideoSEIUserDataUnregisteredMeta ->
Ptr Word8 ->
Ptr Word64 ->
IO CInt
videoSeiUserDataUnregisteredParsePrecisionTimeStamp ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoSEIUserDataUnregisteredMeta.VideoSEIUserDataUnregisteredMeta
-> m ((Bool, Word8, Word64))
videoSeiUserDataUnregisteredParsePrecisionTimeStamp :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoSEIUserDataUnregisteredMeta -> m (Bool, Word8, CGType)
videoSeiUserDataUnregisteredParsePrecisionTimeStamp VideoSEIUserDataUnregisteredMeta
userData = IO (Bool, Word8, CGType) -> m (Bool, Word8, CGType)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word8, CGType) -> m (Bool, Word8, CGType))
-> IO (Bool, Word8, CGType) -> m (Bool, Word8, CGType)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoSEIUserDataUnregisteredMeta
userData' <- VideoSEIUserDataUnregisteredMeta
-> IO (Ptr VideoSEIUserDataUnregisteredMeta)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoSEIUserDataUnregisteredMeta
userData
Ptr Word8
status <- IO (Ptr Word8)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word8)
Ptr CGType
precisionTimeStamp <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
CInt
result <- Ptr VideoSEIUserDataUnregisteredMeta
-> Ptr Word8 -> Ptr CGType -> IO CInt
gst_video_sei_user_data_unregistered_parse_precision_time_stamp Ptr VideoSEIUserDataUnregisteredMeta
userData' Ptr Word8
status Ptr CGType
precisionTimeStamp
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word8
status' <- Ptr Word8 -> IO Word8
forall a. Storable a => Ptr a -> IO a
peek Ptr Word8
status
CGType
precisionTimeStamp' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
precisionTimeStamp
VideoSEIUserDataUnregisteredMeta -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoSEIUserDataUnregisteredMeta
userData
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
status
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
precisionTimeStamp
(Bool, Word8, CGType) -> IO (Bool, Word8, CGType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word8
status', CGType
precisionTimeStamp')
foreign import ccall "gst_video_sei_user_data_unregistered_meta_api_get_type" gst_video_sei_user_data_unregistered_meta_api_get_type ::
IO CGType
videoSeiUserDataUnregisteredMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoSeiUserDataUnregisteredMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoSeiUserDataUnregisteredMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_sei_user_data_unregistered_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_region_of_interest_meta_api_get_type" gst_video_region_of_interest_meta_api_get_type ::
IO CGType
videoRegionOfInterestMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoRegionOfInterestMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoRegionOfInterestMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_region_of_interest_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_overlay_composition_meta_api_get_type" gst_video_overlay_composition_meta_api_get_type ::
IO CGType
videoOverlayCompositionMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoOverlayCompositionMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoOverlayCompositionMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_overlay_composition_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_multiview_video_info_change_mode" gst_video_multiview_video_info_change_mode ::
Ptr GstVideo.VideoInfo.VideoInfo ->
CInt ->
CUInt ->
IO ()
videoMultiviewVideoInfoChangeMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoInfo.VideoInfo
-> GstVideo.Enums.VideoMultiviewMode
-> [GstVideo.Flags.VideoMultiviewFlags]
-> m ()
videoMultiviewVideoInfoChangeMode :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoInfo -> VideoMultiviewMode -> [VideoMultiviewFlags] -> m ()
videoMultiviewVideoInfoChangeMode VideoInfo
info VideoMultiviewMode
outMviewMode [VideoMultiviewFlags]
outMviewFlags = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoInfo
info' <- VideoInfo -> IO (Ptr VideoInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoInfo
info
let outMviewMode' :: CInt
outMviewMode' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (VideoMultiviewMode -> Int) -> VideoMultiviewMode -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoMultiviewMode -> Int
forall a. Enum a => a -> Int
fromEnum) VideoMultiviewMode
outMviewMode
let outMviewFlags' :: CUInt
outMviewFlags' = [VideoMultiviewFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [VideoMultiviewFlags]
outMviewFlags
Ptr VideoInfo -> CInt -> CUInt -> IO ()
gst_video_multiview_video_info_change_mode Ptr VideoInfo
info' CInt
outMviewMode' CUInt
outMviewFlags'
VideoInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoInfo
info
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "gst_video_multiview_guess_half_aspect" gst_video_multiview_guess_half_aspect ::
CInt ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
IO CInt
videoMultiviewGuessHalfAspect ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.Enums.VideoMultiviewMode
-> Word32
-> Word32
-> Word32
-> Word32
-> m Bool
videoMultiviewGuessHalfAspect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoMultiviewMode
-> Word32 -> Word32 -> Word32 -> Word32 -> m Bool
videoMultiviewGuessHalfAspect VideoMultiviewMode
mvMode Word32
width Word32
height Word32
parN Word32
parD = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let mvMode' :: CInt
mvMode' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (VideoMultiviewMode -> Int) -> VideoMultiviewMode -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoMultiviewMode -> Int
forall a. Enum a => a -> Int
fromEnum) VideoMultiviewMode
mvMode
CInt
result <- CInt -> Word32 -> Word32 -> Word32 -> Word32 -> IO CInt
gst_video_multiview_guess_half_aspect CInt
mvMode' Word32
width Word32
height Word32
parN Word32
parD
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_video_multiview_get_unpacked_modes" gst_video_multiview_get_unpacked_modes ::
IO (Ptr GValue)
videoMultiviewGetUnpackedModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GValue
videoMultiviewGetUnpackedModes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GValue
videoMultiviewGetUnpackedModes = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
result <- IO (Ptr GValue)
gst_video_multiview_get_unpacked_modes
Text -> Ptr GValue -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMultiviewGetUnpackedModes" Ptr GValue
result
GValue
result' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result'
foreign import ccall "gst_video_multiview_get_mono_modes" gst_video_multiview_get_mono_modes ::
IO (Ptr GValue)
videoMultiviewGetMonoModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GValue
videoMultiviewGetMonoModes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GValue
videoMultiviewGetMonoModes = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
result <- IO (Ptr GValue)
gst_video_multiview_get_mono_modes
Text -> Ptr GValue -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMultiviewGetMonoModes" Ptr GValue
result
GValue
result' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result'
foreign import ccall "gst_video_multiview_get_doubled_width_modes" gst_video_multiview_get_doubled_width_modes ::
IO (Ptr GValue)
videoMultiviewGetDoubledWidthModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GValue
videoMultiviewGetDoubledWidthModes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GValue
videoMultiviewGetDoubledWidthModes = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
result <- IO (Ptr GValue)
gst_video_multiview_get_doubled_width_modes
Text -> Ptr GValue -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMultiviewGetDoubledWidthModes" Ptr GValue
result
GValue
result' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result'
foreign import ccall "gst_video_multiview_get_doubled_size_modes" gst_video_multiview_get_doubled_size_modes ::
IO (Ptr GValue)
videoMultiviewGetDoubledSizeModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GValue
videoMultiviewGetDoubledSizeModes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GValue
videoMultiviewGetDoubledSizeModes = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
result <- IO (Ptr GValue)
gst_video_multiview_get_doubled_size_modes
Text -> Ptr GValue -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMultiviewGetDoubledSizeModes" Ptr GValue
result
GValue
result' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result'
foreign import ccall "gst_video_multiview_get_doubled_height_modes" gst_video_multiview_get_doubled_height_modes ::
IO (Ptr GValue)
videoMultiviewGetDoubledHeightModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GValue
videoMultiviewGetDoubledHeightModes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GValue
videoMultiviewGetDoubledHeightModes = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
result <- IO (Ptr GValue)
gst_video_multiview_get_doubled_height_modes
Text -> Ptr GValue -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMultiviewGetDoubledHeightModes" Ptr GValue
result
GValue
result' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result'
foreign import ccall "gst_video_meta_api_get_type" gst_video_meta_api_get_type ::
IO CGType
videoMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_make_raw_caps_with_features" gst_video_make_raw_caps_with_features ::
Ptr CUInt ->
Word32 ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO (Ptr Gst.Caps.Caps)
videoMakeRawCapsWithFeatures ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe ([GstVideo.Enums.VideoFormat])
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m Gst.Caps.Caps
videoMakeRawCapsWithFeatures :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe [VideoFormat] -> Maybe CapsFeatures -> m Caps
videoMakeRawCapsWithFeatures Maybe [VideoFormat]
formats Maybe CapsFeatures
features = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
let len :: Word32
len = case Maybe [VideoFormat]
formats of
Maybe [VideoFormat]
Nothing -> Word32
0
Just [VideoFormat]
jFormats -> Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [VideoFormat] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [VideoFormat]
jFormats
Ptr CUInt
maybeFormats <- case Maybe [VideoFormat]
formats of
Maybe [VideoFormat]
Nothing -> Ptr CUInt -> IO (Ptr CUInt)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CUInt
forall a. Ptr a
nullPtr
Just [VideoFormat]
jFormats -> do
let jFormats' :: [CUInt]
jFormats' = (VideoFormat -> CUInt) -> [VideoFormat] -> [CUInt]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) [VideoFormat]
jFormats
Ptr CUInt
jFormats'' <- [CUInt] -> IO (Ptr CUInt)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [CUInt]
jFormats'
Ptr CUInt -> IO (Ptr CUInt)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CUInt
jFormats''
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
Ptr Caps
result <- Ptr CUInt -> Word32 -> Ptr CapsFeatures -> IO (Ptr Caps)
gst_video_make_raw_caps_with_features Ptr CUInt
maybeFormats Word32
len Ptr CapsFeatures
maybeFeatures
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMakeRawCapsWithFeatures" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
maybeFormats
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
foreign import ccall "gst_video_make_raw_caps" gst_video_make_raw_caps ::
Ptr CUInt ->
Word32 ->
IO (Ptr Gst.Caps.Caps)
videoMakeRawCaps ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe ([GstVideo.Enums.VideoFormat])
-> m Gst.Caps.Caps
videoMakeRawCaps :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe [VideoFormat] -> m Caps
videoMakeRawCaps Maybe [VideoFormat]
formats = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
let len :: Word32
len = case Maybe [VideoFormat]
formats of
Maybe [VideoFormat]
Nothing -> Word32
0
Just [VideoFormat]
jFormats -> Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [VideoFormat] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [VideoFormat]
jFormats
Ptr CUInt
maybeFormats <- case Maybe [VideoFormat]
formats of
Maybe [VideoFormat]
Nothing -> Ptr CUInt -> IO (Ptr CUInt)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CUInt
forall a. Ptr a
nullPtr
Just [VideoFormat]
jFormats -> do
let jFormats' :: [CUInt]
jFormats' = (VideoFormat -> CUInt) -> [VideoFormat] -> [CUInt]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) [VideoFormat]
jFormats
Ptr CUInt
jFormats'' <- [CUInt] -> IO (Ptr CUInt)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [CUInt]
jFormats'
Ptr CUInt -> IO (Ptr CUInt)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CUInt
jFormats''
Ptr Caps
result <- Ptr CUInt -> Word32 -> IO (Ptr Caps)
gst_video_make_raw_caps Ptr CUInt
maybeFormats Word32
len
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoMakeRawCaps" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
maybeFormats
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
foreign import ccall "gst_video_is_common_aspect_ratio" gst_video_is_common_aspect_ratio ::
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO CInt
videoIsCommonAspectRatio ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Int32
-> Int32
-> Int32
-> m Bool
videoIsCommonAspectRatio :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> Int32 -> Int32 -> m Bool
videoIsCommonAspectRatio Int32
width Int32
height Int32
parN Int32
parD = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- Int32 -> Int32 -> Int32 -> Int32 -> IO CInt
gst_video_is_common_aspect_ratio Int32
width Int32
height Int32
parN Int32
parD
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_video_guess_framerate" gst_video_guess_framerate ::
Word64 ->
Ptr Int32 ->
Ptr Int32 ->
IO CInt
videoGuessFramerate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word64
-> m ((Bool, Int32, Int32))
videoGuessFramerate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
CGType -> m (Bool, Int32, Int32)
videoGuessFramerate CGType
duration = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32))
-> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Int32
destN <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
destD <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- CGType -> Ptr Int32 -> Ptr Int32 -> IO CInt
gst_video_guess_framerate CGType
duration Ptr Int32
destN Ptr Int32
destD
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int32
destN' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
destN
Int32
destD' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
destD
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
destN
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
destD
(Bool, Int32, Int32) -> IO (Bool, Int32, Int32)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
destN', Int32
destD')
foreign import ccall "gst_video_gl_texture_upload_meta_api_get_type" gst_video_gl_texture_upload_meta_api_get_type ::
IO CGType
videoGlTextureUploadMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoGlTextureUploadMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoGlTextureUploadMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_gl_texture_upload_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_formats_raw" gst_video_formats_raw ::
Ptr Word32 ->
IO (Ptr CUInt)
videoFormatsRaw ::
(B.CallStack.HasCallStack, MonadIO m) =>
m [GstVideo.Enums.VideoFormat]
videoFormatsRaw :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [VideoFormat]
videoFormatsRaw = IO [VideoFormat] -> m [VideoFormat]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [VideoFormat] -> m [VideoFormat])
-> IO [VideoFormat] -> m [VideoFormat]
forall a b. (a -> b) -> a -> b
$ do
Ptr Word32
len <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr CUInt
result <- Ptr Word32 -> IO (Ptr CUInt)
gst_video_formats_raw Ptr Word32
len
Word32
len' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
len
Text -> Ptr CUInt -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoFormatsRaw" Ptr CUInt
result
[CUInt]
result' <- (Word32 -> Ptr CUInt -> IO [CUInt]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Word32
len') Ptr CUInt
result
let result'' :: [VideoFormat]
result'' = (CUInt -> VideoFormat) -> [CUInt] -> [VideoFormat]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> VideoFormat
forall a. Enum a => Int -> a
toEnum (Int -> VideoFormat) -> (CUInt -> Int) -> CUInt -> VideoFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) [CUInt]
result'
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
len
[VideoFormat] -> IO [VideoFormat]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [VideoFormat]
result''
foreign import ccall "gst_video_event_parse_upstream_force_key_unit" gst_video_event_parse_upstream_force_key_unit ::
Ptr Gst.Event.Event ->
Ptr Word64 ->
Ptr CInt ->
Ptr Word32 ->
IO CInt
videoEventParseUpstreamForceKeyUnit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Event.Event
-> m ((Bool, Word64, Bool, Word32))
videoEventParseUpstreamForceKeyUnit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Event -> m (Bool, CGType, Bool, Word32)
videoEventParseUpstreamForceKeyUnit Event
event = IO (Bool, CGType, Bool, Word32) -> m (Bool, CGType, Bool, Word32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, CGType, Bool, Word32) -> m (Bool, CGType, Bool, Word32))
-> IO (Bool, CGType, Bool, Word32)
-> m (Bool, CGType, Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CGType
runningTime <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CInt
allHeaders <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Word32
count <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Event -> Ptr CGType -> Ptr CInt -> Ptr Word32 -> IO CInt
gst_video_event_parse_upstream_force_key_unit Ptr Event
event' Ptr CGType
runningTime Ptr CInt
allHeaders Ptr Word32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CGType
runningTime' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
runningTime
CInt
allHeaders' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
allHeaders
let allHeaders'' :: Bool
allHeaders'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
allHeaders'
Word32
count' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
count
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
runningTime
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
allHeaders
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
(Bool, CGType, Bool, Word32) -> IO (Bool, CGType, Bool, Word32)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', CGType
runningTime', Bool
allHeaders'', Word32
count')
foreign import ccall "gst_video_event_parse_still_frame" gst_video_event_parse_still_frame ::
Ptr Gst.Event.Event ->
Ptr CInt ->
IO CInt
videoEventParseStillFrame ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Event.Event
-> m ((Bool, Bool))
videoEventParseStillFrame :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Event -> m (Bool, Bool)
videoEventParseStillFrame Event
event = IO (Bool, Bool) -> m (Bool, Bool)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool) -> m (Bool, Bool))
-> IO (Bool, Bool) -> m (Bool, Bool)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CInt
inStill <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
CInt
result <- Ptr Event -> Ptr CInt -> IO CInt
gst_video_event_parse_still_frame Ptr Event
event' Ptr CInt
inStill
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CInt
inStill' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
inStill
let inStill'' :: Bool
inStill'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
inStill'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
inStill
(Bool, Bool) -> IO (Bool, Bool)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
inStill'')
foreign import ccall "gst_video_event_parse_downstream_force_key_unit" gst_video_event_parse_downstream_force_key_unit ::
Ptr Gst.Event.Event ->
Ptr Word64 ->
Ptr Word64 ->
Ptr Word64 ->
Ptr CInt ->
Ptr Word32 ->
IO CInt
videoEventParseDownstreamForceKeyUnit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Event.Event
-> m ((Bool, Word64, Word64, Word64, Bool, Word32))
videoEventParseDownstreamForceKeyUnit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Event -> m (Bool, CGType, CGType, CGType, Bool, Word32)
videoEventParseDownstreamForceKeyUnit Event
event = IO (Bool, CGType, CGType, CGType, Bool, Word32)
-> m (Bool, CGType, CGType, CGType, Bool, Word32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, CGType, CGType, CGType, Bool, Word32)
-> m (Bool, CGType, CGType, CGType, Bool, Word32))
-> IO (Bool, CGType, CGType, CGType, Bool, Word32)
-> m (Bool, CGType, CGType, CGType, Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CGType
timestamp <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CGType
streamTime <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CGType
runningTime <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CInt
allHeaders <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Word32
count <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Event
-> Ptr CGType
-> Ptr CGType
-> Ptr CGType
-> Ptr CInt
-> Ptr Word32
-> IO CInt
gst_video_event_parse_downstream_force_key_unit Ptr Event
event' Ptr CGType
timestamp Ptr CGType
streamTime Ptr CGType
runningTime Ptr CInt
allHeaders Ptr Word32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CGType
timestamp' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
timestamp
CGType
streamTime' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
streamTime
CGType
runningTime' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
runningTime
CInt
allHeaders' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
allHeaders
let allHeaders'' :: Bool
allHeaders'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
allHeaders'
Word32
count' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
count
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
timestamp
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
streamTime
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
runningTime
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
allHeaders
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
(Bool, CGType, CGType, CGType, Bool, Word32)
-> IO (Bool, CGType, CGType, CGType, Bool, Word32)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', CGType
timestamp', CGType
streamTime', CGType
runningTime', Bool
allHeaders'', Word32
count')
foreign import ccall "gst_video_event_new_upstream_force_key_unit" gst_video_event_new_upstream_force_key_unit ::
Word64 ->
CInt ->
Word32 ->
IO (Ptr Gst.Event.Event)
videoEventNewUpstreamForceKeyUnit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word64
-> Bool
-> Word32
-> m Gst.Event.Event
videoEventNewUpstreamForceKeyUnit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
CGType -> Bool -> Word32 -> m Event
videoEventNewUpstreamForceKeyUnit CGType
runningTime Bool
allHeaders Word32
count = IO Event -> m Event
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ do
let allHeaders' :: CInt
allHeaders' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
allHeaders
Ptr Event
result <- CGType -> CInt -> Word32 -> IO (Ptr Event)
gst_video_event_new_upstream_force_key_unit CGType
runningTime CInt
allHeaders' Word32
count
Text -> Ptr Event -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoEventNewUpstreamForceKeyUnit" Ptr Event
result
Event
result' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Gst.Event.Event) Ptr Event
result
Event -> IO Event
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result'
foreign import ccall "gst_video_event_new_still_frame" gst_video_event_new_still_frame ::
CInt ->
IO (Ptr Gst.Event.Event)
videoEventNewStillFrame ::
(B.CallStack.HasCallStack, MonadIO m) =>
Bool
-> m Gst.Event.Event
videoEventNewStillFrame :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bool -> m Event
videoEventNewStillFrame Bool
inStill = IO Event -> m Event
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ do
let inStill' :: CInt
inStill' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
inStill
Ptr Event
result <- CInt -> IO (Ptr Event)
gst_video_event_new_still_frame CInt
inStill'
Text -> Ptr Event -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoEventNewStillFrame" Ptr Event
result
Event
result' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Gst.Event.Event) Ptr Event
result
Event -> IO Event
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result'
foreign import ccall "gst_video_event_new_downstream_force_key_unit" gst_video_event_new_downstream_force_key_unit ::
Word64 ->
Word64 ->
Word64 ->
CInt ->
Word32 ->
IO (Ptr Gst.Event.Event)
videoEventNewDownstreamForceKeyUnit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word64
-> Word64
-> Word64
-> Bool
-> Word32
-> m Gst.Event.Event
videoEventNewDownstreamForceKeyUnit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
CGType -> CGType -> CGType -> Bool -> Word32 -> m Event
videoEventNewDownstreamForceKeyUnit CGType
timestamp CGType
streamTime CGType
runningTime Bool
allHeaders Word32
count = IO Event -> m Event
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ do
let allHeaders' :: CInt
allHeaders' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
allHeaders
Ptr Event
result <- CGType -> CGType -> CGType -> CInt -> Word32 -> IO (Ptr Event)
gst_video_event_new_downstream_force_key_unit CGType
timestamp CGType
streamTime CGType
runningTime CInt
allHeaders' Word32
count
Text -> Ptr Event -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoEventNewDownstreamForceKeyUnit" Ptr Event
result
Event
result' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Gst.Event.Event) Ptr Event
result
Event -> IO Event
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result'
foreign import ccall "gst_video_event_is_force_key_unit" gst_video_event_is_force_key_unit ::
Ptr Gst.Event.Event ->
IO CInt
videoEventIsForceKeyUnit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Event.Event
-> m Bool
videoEventIsForceKeyUnit :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Event -> m Bool
videoEventIsForceKeyUnit Event
event = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Event -> IO CInt
gst_video_event_is_force_key_unit Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_video_crop_meta_api_get_type" gst_video_crop_meta_api_get_type ::
IO CGType
videoCropMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoCropMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoCropMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_crop_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_convert_sample_async" gst_video_convert_sample_async ::
Ptr Gst.Sample.Sample ->
Ptr Gst.Caps.Caps ->
Word64 ->
FunPtr GstVideo.Callbacks.C_VideoConvertSampleCallback ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
videoConvertSampleAsync ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Sample.Sample
-> Gst.Caps.Caps
-> Word64
-> GstVideo.Callbacks.VideoConvertSampleCallback
-> m ()
videoConvertSampleAsync :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sample -> Caps -> CGType -> VideoConvertSampleCallback -> m ()
videoConvertSampleAsync Sample
sample Caps
toCaps CGType
timeout VideoConvertSampleCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sample
sample' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sample
sample
Ptr Caps
toCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
toCaps
FunPtr C_VideoConvertSampleCallback
callback' <- C_VideoConvertSampleCallback
-> IO (FunPtr C_VideoConvertSampleCallback)
GstVideo.Callbacks.mk_VideoConvertSampleCallback (Maybe (Ptr (FunPtr C_VideoConvertSampleCallback))
-> VideoConvertSampleCallback_WithClosures
-> C_VideoConvertSampleCallback
GstVideo.Callbacks.wrap_VideoConvertSampleCallback Maybe (Ptr (FunPtr C_VideoConvertSampleCallback))
forall a. Maybe a
Nothing (VideoConvertSampleCallback
-> VideoConvertSampleCallback_WithClosures
GstVideo.Callbacks.drop_closures_VideoConvertSampleCallback VideoConvertSampleCallback
callback))
let userData :: Ptr ()
userData = FunPtr C_VideoConvertSampleCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_VideoConvertSampleCallback
callback'
let destroyNotify :: FunPtr (Ptr a -> IO ())
destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr Sample
-> Ptr Caps
-> CGType
-> FunPtr C_VideoConvertSampleCallback
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gst_video_convert_sample_async Ptr Sample
sample' Ptr Caps
toCaps' CGType
timeout FunPtr C_VideoConvertSampleCallback
callback' Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroyNotify
Sample -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sample
sample
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
toCaps
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "gst_video_convert_sample" gst_video_convert_sample ::
Ptr Gst.Sample.Sample ->
Ptr Gst.Caps.Caps ->
Word64 ->
Ptr (Ptr GError) ->
IO (Ptr Gst.Sample.Sample)
videoConvertSample ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Sample.Sample
-> Gst.Caps.Caps
-> Word64
-> m Gst.Sample.Sample
videoConvertSample :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sample -> Caps -> CGType -> m Sample
videoConvertSample Sample
sample Caps
toCaps CGType
timeout = IO Sample -> m Sample
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sample -> m Sample) -> IO Sample -> m Sample
forall a b. (a -> b) -> a -> b
$ do
Ptr Sample
sample' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sample
sample
Ptr Caps
toCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
toCaps
IO Sample -> IO () -> IO Sample
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Sample
result <- (Ptr (Ptr GError) -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Sample)) -> IO (Ptr Sample))
-> (Ptr (Ptr GError) -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a b. (a -> b) -> a -> b
$ Ptr Sample
-> Ptr Caps -> CGType -> Ptr (Ptr GError) -> IO (Ptr Sample)
gst_video_convert_sample Ptr Sample
sample' Ptr Caps
toCaps' CGType
timeout
Text -> Ptr Sample -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoConvertSample" Ptr Sample
result
Sample
result' <- ((ManagedPtr Sample -> Sample) -> Ptr Sample -> IO Sample
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Sample -> Sample
Gst.Sample.Sample) Ptr Sample
result
Sample -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sample
sample
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
toCaps
Sample -> IO Sample
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "gst_video_color_transfer_encode" gst_video_color_transfer_encode ::
CUInt ->
CDouble ->
IO CDouble
{-# DEPRECATED videoColorTransferEncode ["(Since version 1.20)","Use 'GI.GstVideo.Functions.videoTransferFunctionEncode' instead."] #-}
videoColorTransferEncode ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.Enums.VideoTransferFunction
-> Double
-> m Double
videoColorTransferEncode :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoTransferFunction -> Double -> m Double
videoColorTransferEncode VideoTransferFunction
func Double
val = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
let func' :: CUInt
func' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoTransferFunction -> Int) -> VideoTransferFunction -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoTransferFunction -> Int
forall a. Enum a => a -> Int
fromEnum) VideoTransferFunction
func
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
CDouble
result <- CUInt -> CDouble -> IO CDouble
gst_video_color_transfer_encode CUInt
func' CDouble
val'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
foreign import ccall "gst_video_color_transfer_decode" gst_video_color_transfer_decode ::
CUInt ->
CDouble ->
IO CDouble
{-# DEPRECATED videoColorTransferDecode ["(Since version 1.20)","Use 'GI.GstVideo.Functions.videoTransferFunctionDecode' instead."] #-}
videoColorTransferDecode ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.Enums.VideoTransferFunction
-> Double
-> m Double
videoColorTransferDecode :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoTransferFunction -> Double -> m Double
videoColorTransferDecode VideoTransferFunction
func Double
val = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
let func' :: CUInt
func' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoTransferFunction -> Int) -> VideoTransferFunction -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoTransferFunction -> Int
forall a. Enum a => a -> Int
fromEnum) VideoTransferFunction
func
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
CDouble
result <- CUInt -> CDouble -> IO CDouble
gst_video_color_transfer_decode CUInt
func' CDouble
val'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
foreign import ccall "gst_video_codec_alpha_meta_api_get_type" gst_video_codec_alpha_meta_api_get_type ::
IO CGType
videoCodecAlphaMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoCodecAlphaMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoCodecAlphaMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_codec_alpha_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_chroma_to_string" gst_video_chroma_to_string ::
CUInt ->
IO CString
{-# DEPRECATED videoChromaToString ["(Since version 1.20)","Use 'GI.GstVideo.Functions.videoChromaSiteToString' instead."] #-}
videoChromaToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
[GstVideo.Flags.VideoChromaSite]
-> m T.Text
videoChromaToString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[VideoChromaSite] -> m Text
videoChromaToString [VideoChromaSite]
site = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
let site' :: CUInt
site' = [VideoChromaSite] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [VideoChromaSite]
site
CString
result <- CUInt -> IO CString
gst_video_chroma_to_string CUInt
site'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoChromaToString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
foreign import ccall "gst_video_chroma_resample" gst_video_chroma_resample ::
Ptr GstVideo.VideoChromaResample.VideoChromaResample ->
Ptr () ->
Int32 ->
IO ()
videoChromaResample ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoChromaResample.VideoChromaResample
-> Ptr ()
-> Int32
-> m ()
videoChromaResample :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoChromaResample -> Ptr () -> Int32 -> m ()
videoChromaResample VideoChromaResample
resample Ptr ()
lines Int32
width = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoChromaResample
resample' <- VideoChromaResample -> IO (Ptr VideoChromaResample)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoChromaResample
resample
Ptr VideoChromaResample -> Ptr () -> Int32 -> IO ()
gst_video_chroma_resample Ptr VideoChromaResample
resample' Ptr ()
lines Int32
width
VideoChromaResample -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoChromaResample
resample
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "gst_video_chroma_from_string" gst_video_chroma_from_string ::
CString ->
IO CUInt
{-# DEPRECATED videoChromaFromString ["(Since version 1.20)","Use 'GI.GstVideo.Functions.videoChromaSiteFromString' instead."] #-}
videoChromaFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m [GstVideo.Flags.VideoChromaSite]
videoChromaFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m [VideoChromaSite]
videoChromaFromString Text
s = IO [VideoChromaSite] -> m [VideoChromaSite]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [VideoChromaSite] -> m [VideoChromaSite])
-> IO [VideoChromaSite] -> m [VideoChromaSite]
forall a b. (a -> b) -> a -> b
$ do
CString
s' <- Text -> IO CString
textToCString Text
s
CUInt
result <- CString -> IO CUInt
gst_video_chroma_from_string CString
s'
let result' :: [VideoChromaSite]
result' = CUInt -> [VideoChromaSite]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
s'
[VideoChromaSite] -> IO [VideoChromaSite]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [VideoChromaSite]
result'
foreign import ccall "gst_video_center_rect" gst_video_center_rect ::
Ptr GstVideo.VideoRectangle.VideoRectangle ->
Ptr GstVideo.VideoRectangle.VideoRectangle ->
Ptr GstVideo.VideoRectangle.VideoRectangle ->
CInt ->
IO ()
videoCenterRect ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoRectangle.VideoRectangle
-> GstVideo.VideoRectangle.VideoRectangle
-> Bool
-> m (GstVideo.VideoRectangle.VideoRectangle)
videoCenterRect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoRectangle -> VideoRectangle -> Bool -> m VideoRectangle
videoCenterRect VideoRectangle
src VideoRectangle
dst Bool
scaling = IO VideoRectangle -> m VideoRectangle
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoRectangle -> m VideoRectangle)
-> IO VideoRectangle -> m VideoRectangle
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoRectangle
src' <- VideoRectangle -> IO (Ptr VideoRectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoRectangle
src
Ptr VideoRectangle
dst' <- VideoRectangle -> IO (Ptr VideoRectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoRectangle
dst
Ptr VideoRectangle
result_ <- Int -> IO (Ptr VideoRectangle)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
16 :: IO (Ptr GstVideo.VideoRectangle.VideoRectangle)
let scaling' :: CInt
scaling' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
scaling
Ptr VideoRectangle
-> Ptr VideoRectangle -> Ptr VideoRectangle -> CInt -> IO ()
gst_video_center_rect Ptr VideoRectangle
src' Ptr VideoRectangle
dst' Ptr VideoRectangle
result_ CInt
scaling'
VideoRectangle
result_' <- ((ManagedPtr VideoRectangle -> VideoRectangle)
-> Ptr VideoRectangle -> IO VideoRectangle
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr VideoRectangle -> VideoRectangle
GstVideo.VideoRectangle.VideoRectangle) Ptr VideoRectangle
result_
VideoRectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoRectangle
src
VideoRectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoRectangle
dst
VideoRectangle -> IO VideoRectangle
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoRectangle
result_'
foreign import ccall "gst_video_caption_meta_api_get_type" gst_video_caption_meta_api_get_type ::
IO CGType
videoCaptionMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoCaptionMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoCaptionMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_caption_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_calculate_display_ratio" gst_video_calculate_display_ratio ::
Ptr Word32 ->
Ptr Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
IO CInt
videoCalculateDisplayRatio ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m ((Bool, Word32, Word32))
videoCalculateDisplayRatio :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m (Bool, Word32, Word32)
videoCalculateDisplayRatio Word32
videoWidth Word32
videoHeight Word32
videoParN Word32
videoParD Word32
displayParN Word32
displayParD = IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32))
-> IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Word32
darN <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Word32
darD <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Word32
-> Ptr Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> IO CInt
gst_video_calculate_display_ratio Ptr Word32
darN Ptr Word32
darD Word32
videoWidth Word32
videoHeight Word32
videoParN Word32
videoParD Word32
displayParN Word32
displayParD
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
darN' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
darN
Word32
darD' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
darD
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
darN
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
darD
(Bool, Word32, Word32) -> IO (Bool, Word32, Word32)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
darN', Word32
darD')
foreign import ccall "gst_video_blend_scale_linear_RGBA" gst_video_blend_scale_linear_RGBA ::
Ptr GstVideo.VideoInfo.VideoInfo ->
Ptr Gst.Buffer.Buffer ->
Int32 ->
Int32 ->
Ptr GstVideo.VideoInfo.VideoInfo ->
Ptr (Ptr Gst.Buffer.Buffer) ->
IO ()
videoBlendScaleLinearRGBA ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoInfo.VideoInfo
-> Gst.Buffer.Buffer
-> Int32
-> Int32
-> m ((GstVideo.VideoInfo.VideoInfo, Gst.Buffer.Buffer))
videoBlendScaleLinearRGBA :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoInfo -> Buffer -> Int32 -> Int32 -> m (VideoInfo, Buffer)
videoBlendScaleLinearRGBA VideoInfo
src Buffer
srcBuffer Int32
destHeight Int32
destWidth = IO (VideoInfo, Buffer) -> m (VideoInfo, Buffer)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (VideoInfo, Buffer) -> m (VideoInfo, Buffer))
-> IO (VideoInfo, Buffer) -> m (VideoInfo, Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoInfo
src' <- VideoInfo -> IO (Ptr VideoInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoInfo
src
Ptr Buffer
srcBuffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
srcBuffer
Ptr VideoInfo
dest <- Int -> IO (Ptr VideoInfo)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
120 :: IO (Ptr GstVideo.VideoInfo.VideoInfo)
Ptr (Ptr Buffer)
destBuffer <- IO (Ptr (Ptr Buffer))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Buffer.Buffer))
Ptr VideoInfo
-> Ptr Buffer
-> Int32
-> Int32
-> Ptr VideoInfo
-> Ptr (Ptr Buffer)
-> IO ()
gst_video_blend_scale_linear_RGBA Ptr VideoInfo
src' Ptr Buffer
srcBuffer' Int32
destHeight Int32
destWidth Ptr VideoInfo
dest Ptr (Ptr Buffer)
destBuffer
VideoInfo
dest' <- ((ManagedPtr VideoInfo -> VideoInfo)
-> Ptr VideoInfo -> IO VideoInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoInfo -> VideoInfo
GstVideo.VideoInfo.VideoInfo) Ptr VideoInfo
dest
Ptr Buffer
destBuffer' <- Ptr (Ptr Buffer) -> IO (Ptr Buffer)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Buffer)
destBuffer
Buffer
destBuffer'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
destBuffer'
VideoInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoInfo
src
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
srcBuffer
Ptr (Ptr Buffer) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Buffer)
destBuffer
(VideoInfo, Buffer) -> IO (VideoInfo, Buffer)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (VideoInfo
dest', Buffer
destBuffer'')
foreign import ccall "gst_video_blend" gst_video_blend ::
Ptr GstVideo.VideoFrame.VideoFrame ->
Ptr GstVideo.VideoFrame.VideoFrame ->
Int32 ->
Int32 ->
CFloat ->
IO CInt
videoBlend ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstVideo.VideoFrame.VideoFrame
-> GstVideo.VideoFrame.VideoFrame
-> Int32
-> Int32
-> Float
-> m Bool
videoBlend :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoFrame -> VideoFrame -> Int32 -> Int32 -> Float -> m Bool
videoBlend VideoFrame
dest VideoFrame
src Int32
x Int32
y Float
globalAlpha = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoFrame
dest' <- VideoFrame -> IO (Ptr VideoFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoFrame
dest
Ptr VideoFrame
src' <- VideoFrame -> IO (Ptr VideoFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoFrame
src
let globalAlpha' :: CFloat
globalAlpha' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
globalAlpha
CInt
result <- Ptr VideoFrame
-> Ptr VideoFrame -> Int32 -> Int32 -> CFloat -> IO CInt
gst_video_blend Ptr VideoFrame
dest' Ptr VideoFrame
src' Int32
x Int32
y CFloat
globalAlpha'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VideoFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoFrame
dest
VideoFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoFrame
src
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_video_bar_meta_api_get_type" gst_video_bar_meta_api_get_type ::
IO CGType
videoBarMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoBarMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoBarMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_bar_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_affine_transformation_meta_api_get_type" gst_video_affine_transformation_meta_api_get_type ::
IO CGType
videoAffineTransformationMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoAffineTransformationMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoAffineTransformationMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_affine_transformation_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_video_afd_meta_api_get_type" gst_video_afd_meta_api_get_type ::
IO CGType
videoAfdMetaApiGetType ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GType
videoAfdMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
videoAfdMetaApiGetType = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
CGType
result <- IO CGType
gst_video_afd_meta_api_get_type
let result' :: GType
result' = CGType -> GType
GType CGType
result
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "gst_is_video_overlay_prepare_window_handle_message" gst_is_video_overlay_prepare_window_handle_message ::
Ptr Gst.Message.Message ->
IO CInt
isVideoOverlayPrepareWindowHandleMessage ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Message.Message
-> m Bool
isVideoOverlayPrepareWindowHandleMessage :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Message -> m Bool
isVideoOverlayPrepareWindowHandleMessage Message
msg = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- Message -> IO (Ptr Message)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Message
msg
CInt
result <- Ptr Message -> IO CInt
gst_is_video_overlay_prepare_window_handle_message Ptr Message
msg'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Message -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Message
msg
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_buffer_pool_config_set_video_alignment" gst_buffer_pool_config_set_video_alignment ::
Ptr Gst.Structure.Structure ->
Ptr GstVideo.VideoAlignment.VideoAlignment ->
IO ()
bufferPoolConfigSetVideoAlignment ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Structure.Structure
-> GstVideo.VideoAlignment.VideoAlignment
-> m ()
bufferPoolConfigSetVideoAlignment :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> VideoAlignment -> m ()
bufferPoolConfigSetVideoAlignment Structure
config VideoAlignment
align = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
config' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
config
Ptr VideoAlignment
align' <- VideoAlignment -> IO (Ptr VideoAlignment)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoAlignment
align
Ptr Structure -> Ptr VideoAlignment -> IO ()
gst_buffer_pool_config_set_video_alignment Ptr Structure
config' Ptr VideoAlignment
align'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
config
VideoAlignment -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoAlignment
align
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "gst_buffer_pool_config_get_video_alignment" gst_buffer_pool_config_get_video_alignment ::
Ptr Gst.Structure.Structure ->
Ptr GstVideo.VideoAlignment.VideoAlignment ->
IO CInt
bufferPoolConfigGetVideoAlignment ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Structure.Structure
-> GstVideo.VideoAlignment.VideoAlignment
-> m Bool
bufferPoolConfigGetVideoAlignment :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> VideoAlignment -> m Bool
bufferPoolConfigGetVideoAlignment Structure
config VideoAlignment
align = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
config' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
config
Ptr VideoAlignment
align' <- VideoAlignment -> IO (Ptr VideoAlignment)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoAlignment
align
CInt
result <- Ptr Structure -> Ptr VideoAlignment -> IO CInt
gst_buffer_pool_config_get_video_alignment Ptr Structure
config' Ptr VideoAlignment
align'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
config
VideoAlignment -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoAlignment
align
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "gst_buffer_get_video_region_of_interest_meta_id" gst_buffer_get_video_region_of_interest_meta_id ::
Ptr Gst.Buffer.Buffer ->
Int32 ->
IO (Ptr GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta)
bufferGetVideoRegionOfInterestMetaId ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Int32
-> m (Maybe GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta)
bufferGetVideoRegionOfInterestMetaId :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> Int32 -> m (Maybe VideoRegionOfInterestMeta)
bufferGetVideoRegionOfInterestMetaId Buffer
buffer Int32
id = IO (Maybe VideoRegionOfInterestMeta)
-> m (Maybe VideoRegionOfInterestMeta)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoRegionOfInterestMeta)
-> m (Maybe VideoRegionOfInterestMeta))
-> IO (Maybe VideoRegionOfInterestMeta)
-> m (Maybe VideoRegionOfInterestMeta)
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoRegionOfInterestMeta
result <- Ptr Buffer -> Int32 -> IO (Ptr VideoRegionOfInterestMeta)
gst_buffer_get_video_region_of_interest_meta_id Ptr Buffer
buffer' Int32
id
Maybe VideoRegionOfInterestMeta
maybeResult <- Ptr VideoRegionOfInterestMeta
-> (Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta)
-> IO (Maybe VideoRegionOfInterestMeta)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoRegionOfInterestMeta
result ((Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta)
-> IO (Maybe VideoRegionOfInterestMeta))
-> (Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta)
-> IO (Maybe VideoRegionOfInterestMeta)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoRegionOfInterestMeta
result' -> do
VideoRegionOfInterestMeta
result'' <- ((ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta)
-> Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta
GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta) Ptr VideoRegionOfInterestMeta
result'
VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoRegionOfInterestMeta
result''
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Maybe VideoRegionOfInterestMeta
-> IO (Maybe VideoRegionOfInterestMeta)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoRegionOfInterestMeta
maybeResult
foreign import ccall "gst_buffer_get_video_meta_id" gst_buffer_get_video_meta_id ::
Ptr Gst.Buffer.Buffer ->
Int32 ->
IO (Ptr GstVideo.VideoMeta.VideoMeta)
bufferGetVideoMetaId ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Int32
-> m (Maybe GstVideo.VideoMeta.VideoMeta)
bufferGetVideoMetaId :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> Int32 -> m (Maybe VideoMeta)
bufferGetVideoMetaId Buffer
buffer Int32
id = IO (Maybe VideoMeta) -> m (Maybe VideoMeta)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoMeta) -> m (Maybe VideoMeta))
-> IO (Maybe VideoMeta) -> m (Maybe VideoMeta)
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoMeta
result <- Ptr Buffer -> Int32 -> IO (Ptr VideoMeta)
gst_buffer_get_video_meta_id Ptr Buffer
buffer' Int32
id
Maybe VideoMeta
maybeResult <- Ptr VideoMeta
-> (Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoMeta
result ((Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta))
-> (Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoMeta
result' -> do
VideoMeta
result'' <- ((ManagedPtr VideoMeta -> VideoMeta)
-> Ptr VideoMeta -> IO VideoMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoMeta -> VideoMeta
GstVideo.VideoMeta.VideoMeta) Ptr VideoMeta
result'
VideoMeta -> IO VideoMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoMeta
result''
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Maybe VideoMeta -> IO (Maybe VideoMeta)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoMeta
maybeResult
foreign import ccall "gst_buffer_get_video_meta" gst_buffer_get_video_meta ::
Ptr Gst.Buffer.Buffer ->
IO (Ptr GstVideo.VideoMeta.VideoMeta)
bufferGetVideoMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> m (Maybe GstVideo.VideoMeta.VideoMeta)
bufferGetVideoMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> m (Maybe VideoMeta)
bufferGetVideoMeta Buffer
buffer = IO (Maybe VideoMeta) -> m (Maybe VideoMeta)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoMeta) -> m (Maybe VideoMeta))
-> IO (Maybe VideoMeta) -> m (Maybe VideoMeta)
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoMeta
result <- Ptr Buffer -> IO (Ptr VideoMeta)
gst_buffer_get_video_meta Ptr Buffer
buffer'
Maybe VideoMeta
maybeResult <- Ptr VideoMeta
-> (Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoMeta
result ((Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta))
-> (Ptr VideoMeta -> IO VideoMeta) -> IO (Maybe VideoMeta)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoMeta
result' -> do
VideoMeta
result'' <- ((ManagedPtr VideoMeta -> VideoMeta)
-> Ptr VideoMeta -> IO VideoMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoMeta -> VideoMeta
GstVideo.VideoMeta.VideoMeta) Ptr VideoMeta
result'
VideoMeta -> IO VideoMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoMeta
result''
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Maybe VideoMeta -> IO (Maybe VideoMeta)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoMeta
maybeResult
foreign import ccall "gst_buffer_add_video_time_code_meta_full" gst_buffer_add_video_time_code_meta_full ::
Ptr Gst.Buffer.Buffer ->
Word32 ->
Word32 ->
Ptr GLib.DateTime.DateTime ->
CUInt ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
IO (Ptr GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta)
bufferAddVideoTimeCodeMetaFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Word32
-> Word32
-> GLib.DateTime.DateTime
-> [GstVideo.Flags.VideoTimeCodeFlags]
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m (Maybe GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta)
bufferAddVideoTimeCodeMetaFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> Word32
-> Word32
-> DateTime
-> [VideoTimeCodeFlags]
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m (Maybe VideoTimeCodeMeta)
bufferAddVideoTimeCodeMetaFull Buffer
buffer Word32
fpsN Word32
fpsD DateTime
latestDailyJam [VideoTimeCodeFlags]
flags Word32
hours Word32
minutes Word32
seconds Word32
frames Word32
fieldCount = IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta))
-> IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta)
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr DateTime
latestDailyJam' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
latestDailyJam
let flags' :: CUInt
flags' = [VideoTimeCodeFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [VideoTimeCodeFlags]
flags
Ptr VideoTimeCodeMeta
result <- Ptr Buffer
-> Word32
-> Word32
-> Ptr DateTime
-> CUInt
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> IO (Ptr VideoTimeCodeMeta)
gst_buffer_add_video_time_code_meta_full Ptr Buffer
buffer' Word32
fpsN Word32
fpsD Ptr DateTime
latestDailyJam' CUInt
flags' Word32
hours Word32
minutes Word32
seconds Word32
frames Word32
fieldCount
Maybe VideoTimeCodeMeta
maybeResult <- Ptr VideoTimeCodeMeta
-> (Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoTimeCodeMeta
result ((Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta))
-> (Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoTimeCodeMeta
result' -> do
VideoTimeCodeMeta
result'' <- ((ManagedPtr VideoTimeCodeMeta -> VideoTimeCodeMeta)
-> Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoTimeCodeMeta -> VideoTimeCodeMeta
GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta) Ptr VideoTimeCodeMeta
result'
VideoTimeCodeMeta -> IO VideoTimeCodeMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoTimeCodeMeta
result''
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
latestDailyJam
Maybe VideoTimeCodeMeta -> IO (Maybe VideoTimeCodeMeta)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoTimeCodeMeta
maybeResult
foreign import ccall "gst_buffer_add_video_time_code_meta" gst_buffer_add_video_time_code_meta ::
Ptr Gst.Buffer.Buffer ->
Ptr GstVideo.VideoTimeCode.VideoTimeCode ->
IO (Ptr GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta)
bufferAddVideoTimeCodeMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> GstVideo.VideoTimeCode.VideoTimeCode
-> m (Maybe GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta)
bufferAddVideoTimeCodeMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> VideoTimeCode -> m (Maybe VideoTimeCodeMeta)
bufferAddVideoTimeCodeMeta Buffer
buffer VideoTimeCode
tc = IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta))
-> IO (Maybe VideoTimeCodeMeta) -> m (Maybe VideoTimeCodeMeta)
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoTimeCode
tc' <- VideoTimeCode -> IO (Ptr VideoTimeCode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoTimeCode
tc
Ptr VideoTimeCodeMeta
result <- Ptr Buffer -> Ptr VideoTimeCode -> IO (Ptr VideoTimeCodeMeta)
gst_buffer_add_video_time_code_meta Ptr Buffer
buffer' Ptr VideoTimeCode
tc'
Maybe VideoTimeCodeMeta
maybeResult <- Ptr VideoTimeCodeMeta
-> (Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoTimeCodeMeta
result ((Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta))
-> (Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta)
-> IO (Maybe VideoTimeCodeMeta)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoTimeCodeMeta
result' -> do
VideoTimeCodeMeta
result'' <- ((ManagedPtr VideoTimeCodeMeta -> VideoTimeCodeMeta)
-> Ptr VideoTimeCodeMeta -> IO VideoTimeCodeMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoTimeCodeMeta -> VideoTimeCodeMeta
GstVideo.VideoTimeCodeMeta.VideoTimeCodeMeta) Ptr VideoTimeCodeMeta
result'
VideoTimeCodeMeta -> IO VideoTimeCodeMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoTimeCodeMeta
result''
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoTimeCode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoTimeCode
tc
Maybe VideoTimeCodeMeta -> IO (Maybe VideoTimeCodeMeta)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoTimeCodeMeta
maybeResult
foreign import ccall "gst_buffer_add_video_sei_user_data_unregistered_meta" gst_buffer_add_video_sei_user_data_unregistered_meta ::
Ptr Gst.Buffer.Buffer ->
Word8 ->
Word8 ->
Word64 ->
IO (Ptr GstVideo.VideoSEIUserDataUnregisteredMeta.VideoSEIUserDataUnregisteredMeta)
bufferAddVideoSeiUserDataUnregisteredMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Word8
-> Word8
-> Word64
-> m GstVideo.VideoSEIUserDataUnregisteredMeta.VideoSEIUserDataUnregisteredMeta
bufferAddVideoSeiUserDataUnregisteredMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> Word8 -> Word8 -> CGType -> m VideoSEIUserDataUnregisteredMeta
bufferAddVideoSeiUserDataUnregisteredMeta Buffer
buffer Word8
uuid Word8
data_ CGType
size = IO VideoSEIUserDataUnregisteredMeta
-> m VideoSEIUserDataUnregisteredMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoSEIUserDataUnregisteredMeta
-> m VideoSEIUserDataUnregisteredMeta)
-> IO VideoSEIUserDataUnregisteredMeta
-> m VideoSEIUserDataUnregisteredMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoSEIUserDataUnregisteredMeta
result <- Ptr Buffer
-> Word8
-> Word8
-> CGType
-> IO (Ptr VideoSEIUserDataUnregisteredMeta)
gst_buffer_add_video_sei_user_data_unregistered_meta Ptr Buffer
buffer' Word8
uuid Word8
data_ CGType
size
Text -> Ptr VideoSEIUserDataUnregisteredMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoSeiUserDataUnregisteredMeta" Ptr VideoSEIUserDataUnregisteredMeta
result
VideoSEIUserDataUnregisteredMeta
result' <- ((ManagedPtr VideoSEIUserDataUnregisteredMeta
-> VideoSEIUserDataUnregisteredMeta)
-> Ptr VideoSEIUserDataUnregisteredMeta
-> IO VideoSEIUserDataUnregisteredMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoSEIUserDataUnregisteredMeta
-> VideoSEIUserDataUnregisteredMeta
GstVideo.VideoSEIUserDataUnregisteredMeta.VideoSEIUserDataUnregisteredMeta) Ptr VideoSEIUserDataUnregisteredMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoSEIUserDataUnregisteredMeta
-> IO VideoSEIUserDataUnregisteredMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoSEIUserDataUnregisteredMeta
result'
foreign import ccall "gst_buffer_add_video_region_of_interest_meta_id" gst_buffer_add_video_region_of_interest_meta_id ::
Ptr Gst.Buffer.Buffer ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
IO (Ptr GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta)
bufferAddVideoRegionOfInterestMetaId ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMetaId :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> m VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMetaId Buffer
buffer Word32
roiType Word32
x Word32
y Word32
w Word32
h = IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta)
-> IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoRegionOfInterestMeta
result <- Ptr Buffer
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> IO (Ptr VideoRegionOfInterestMeta)
gst_buffer_add_video_region_of_interest_meta_id Ptr Buffer
buffer' Word32
roiType Word32
x Word32
y Word32
w Word32
h
Text -> Ptr VideoRegionOfInterestMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoRegionOfInterestMetaId" Ptr VideoRegionOfInterestMeta
result
VideoRegionOfInterestMeta
result' <- ((ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta)
-> Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta
GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta) Ptr VideoRegionOfInterestMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoRegionOfInterestMeta
result'
foreign import ccall "gst_buffer_add_video_region_of_interest_meta" gst_buffer_add_video_region_of_interest_meta ::
Ptr Gst.Buffer.Buffer ->
CString ->
Word32 ->
Word32 ->
Word32 ->
Word32 ->
IO (Ptr GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta)
bufferAddVideoRegionOfInterestMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> T.Text
-> Word32
-> Word32
-> Word32
-> Word32
-> m GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> Text
-> Word32
-> Word32
-> Word32
-> Word32
-> m VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMeta Buffer
buffer Text
roiType Word32
x Word32
y Word32
w Word32
h = IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta)
-> IO VideoRegionOfInterestMeta -> m VideoRegionOfInterestMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
CString
roiType' <- Text -> IO CString
textToCString Text
roiType
Ptr VideoRegionOfInterestMeta
result <- Ptr Buffer
-> CString
-> Word32
-> Word32
-> Word32
-> Word32
-> IO (Ptr VideoRegionOfInterestMeta)
gst_buffer_add_video_region_of_interest_meta Ptr Buffer
buffer' CString
roiType' Word32
x Word32
y Word32
w Word32
h
Text -> Ptr VideoRegionOfInterestMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoRegionOfInterestMeta" Ptr VideoRegionOfInterestMeta
result
VideoRegionOfInterestMeta
result' <- ((ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta)
-> Ptr VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoRegionOfInterestMeta -> VideoRegionOfInterestMeta
GstVideo.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta) Ptr VideoRegionOfInterestMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
roiType'
VideoRegionOfInterestMeta -> IO VideoRegionOfInterestMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoRegionOfInterestMeta
result'
foreign import ccall "gst_buffer_add_video_overlay_composition_meta" gst_buffer_add_video_overlay_composition_meta ::
Ptr Gst.Buffer.Buffer ->
Ptr GstVideo.VideoOverlayComposition.VideoOverlayComposition ->
IO (Ptr GstVideo.VideoOverlayCompositionMeta.VideoOverlayCompositionMeta)
bufferAddVideoOverlayCompositionMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Maybe (GstVideo.VideoOverlayComposition.VideoOverlayComposition)
-> m GstVideo.VideoOverlayCompositionMeta.VideoOverlayCompositionMeta
bufferAddVideoOverlayCompositionMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> Maybe VideoOverlayComposition -> m VideoOverlayCompositionMeta
bufferAddVideoOverlayCompositionMeta Buffer
buf Maybe VideoOverlayComposition
comp = IO VideoOverlayCompositionMeta -> m VideoOverlayCompositionMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoOverlayCompositionMeta -> m VideoOverlayCompositionMeta)
-> IO VideoOverlayCompositionMeta -> m VideoOverlayCompositionMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buf' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buf
Ptr VideoOverlayComposition
maybeComp <- case Maybe VideoOverlayComposition
comp of
Maybe VideoOverlayComposition
Nothing -> Ptr VideoOverlayComposition -> IO (Ptr VideoOverlayComposition)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoOverlayComposition
forall a. Ptr a
nullPtr
Just VideoOverlayComposition
jComp -> do
Ptr VideoOverlayComposition
jComp' <- VideoOverlayComposition -> IO (Ptr VideoOverlayComposition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoOverlayComposition
jComp
Ptr VideoOverlayComposition -> IO (Ptr VideoOverlayComposition)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoOverlayComposition
jComp'
Ptr VideoOverlayCompositionMeta
result <- Ptr Buffer
-> Ptr VideoOverlayComposition
-> IO (Ptr VideoOverlayCompositionMeta)
gst_buffer_add_video_overlay_composition_meta Ptr Buffer
buf' Ptr VideoOverlayComposition
maybeComp
Text -> Ptr VideoOverlayCompositionMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoOverlayCompositionMeta" Ptr VideoOverlayCompositionMeta
result
VideoOverlayCompositionMeta
result' <- ((ManagedPtr VideoOverlayCompositionMeta
-> VideoOverlayCompositionMeta)
-> Ptr VideoOverlayCompositionMeta
-> IO VideoOverlayCompositionMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoOverlayCompositionMeta
-> VideoOverlayCompositionMeta
GstVideo.VideoOverlayCompositionMeta.VideoOverlayCompositionMeta) Ptr VideoOverlayCompositionMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buf
Maybe VideoOverlayComposition
-> (VideoOverlayComposition -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe VideoOverlayComposition
comp VideoOverlayComposition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
VideoOverlayCompositionMeta -> IO VideoOverlayCompositionMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoOverlayCompositionMeta
result'
foreign import ccall "gst_buffer_add_video_meta_full" gst_buffer_add_video_meta_full ::
Ptr Gst.Buffer.Buffer ->
CUInt ->
CUInt ->
Word32 ->
Word32 ->
Word32 ->
Ptr Word64 ->
Ptr Int32 ->
IO (Ptr GstVideo.VideoMeta.VideoMeta)
bufferAddVideoMetaFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> [GstVideo.Flags.VideoFrameFlags]
-> GstVideo.Enums.VideoFormat
-> Word32
-> Word32
-> Word32
-> [Word64]
-> [Int32]
-> m GstVideo.VideoMeta.VideoMeta
bufferAddVideoMetaFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> [VideoFrameFlags]
-> VideoFormat
-> Word32
-> Word32
-> Word32
-> [CGType]
-> [Int32]
-> m VideoMeta
bufferAddVideoMetaFull Buffer
buffer [VideoFrameFlags]
flags VideoFormat
format Word32
width Word32
height Word32
nPlanes [CGType]
offset [Int32]
stride = IO VideoMeta -> m VideoMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoMeta -> m VideoMeta) -> IO VideoMeta -> m VideoMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let flags' :: CUInt
flags' = [VideoFrameFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [VideoFrameFlags]
flags
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) VideoFormat
format
Ptr CGType
offset' <- [CGType] -> IO (Ptr CGType)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [CGType]
offset
Ptr Int32
stride' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
stride
Ptr VideoMeta
result <- Ptr Buffer
-> CUInt
-> CUInt
-> Word32
-> Word32
-> Word32
-> Ptr CGType
-> Ptr Int32
-> IO (Ptr VideoMeta)
gst_buffer_add_video_meta_full Ptr Buffer
buffer' CUInt
flags' CUInt
format' Word32
width Word32
height Word32
nPlanes Ptr CGType
offset' Ptr Int32
stride'
Text -> Ptr VideoMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoMetaFull" Ptr VideoMeta
result
VideoMeta
result' <- ((ManagedPtr VideoMeta -> VideoMeta)
-> Ptr VideoMeta -> IO VideoMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoMeta -> VideoMeta
GstVideo.VideoMeta.VideoMeta) Ptr VideoMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
offset'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
stride'
VideoMeta -> IO VideoMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoMeta
result'
foreign import ccall "gst_buffer_add_video_meta" gst_buffer_add_video_meta ::
Ptr Gst.Buffer.Buffer ->
CUInt ->
CUInt ->
Word32 ->
Word32 ->
IO (Ptr GstVideo.VideoMeta.VideoMeta)
bufferAddVideoMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> [GstVideo.Flags.VideoFrameFlags]
-> GstVideo.Enums.VideoFormat
-> Word32
-> Word32
-> m GstVideo.VideoMeta.VideoMeta
bufferAddVideoMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> [VideoFrameFlags]
-> VideoFormat
-> Word32
-> Word32
-> m VideoMeta
bufferAddVideoMeta Buffer
buffer [VideoFrameFlags]
flags VideoFormat
format Word32
width Word32
height = IO VideoMeta -> m VideoMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoMeta -> m VideoMeta) -> IO VideoMeta -> m VideoMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let flags' :: CUInt
flags' = [VideoFrameFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [VideoFrameFlags]
flags
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) VideoFormat
format
Ptr VideoMeta
result <- Ptr Buffer
-> CUInt -> CUInt -> Word32 -> Word32 -> IO (Ptr VideoMeta)
gst_buffer_add_video_meta Ptr Buffer
buffer' CUInt
flags' CUInt
format' Word32
width Word32
height
Text -> Ptr VideoMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoMeta" Ptr VideoMeta
result
VideoMeta
result' <- ((ManagedPtr VideoMeta -> VideoMeta)
-> Ptr VideoMeta -> IO VideoMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoMeta -> VideoMeta
GstVideo.VideoMeta.VideoMeta) Ptr VideoMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoMeta -> IO VideoMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoMeta
result'
foreign import ccall "gst_buffer_add_video_gl_texture_upload_meta" gst_buffer_add_video_gl_texture_upload_meta ::
Ptr Gst.Buffer.Buffer ->
CUInt ->
Word32 ->
CUInt ->
FunPtr GstVideo.Callbacks.C_VideoGLTextureUpload ->
Ptr () ->
FunPtr GObject.Callbacks.C_BoxedCopyFunc ->
FunPtr GObject.Callbacks.C_BoxedFreeFunc ->
IO (Ptr GstVideo.VideoGLTextureUploadMeta.VideoGLTextureUploadMeta)
bufferAddVideoGlTextureUploadMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> GstVideo.Enums.VideoGLTextureOrientation
-> Word32
-> GstVideo.Enums.VideoGLTextureType
-> GstVideo.Callbacks.VideoGLTextureUpload
-> GObject.Callbacks.BoxedCopyFunc
-> GObject.Callbacks.BoxedFreeFunc
-> m GstVideo.VideoGLTextureUploadMeta.VideoGLTextureUploadMeta
bufferAddVideoGlTextureUploadMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer
-> VideoGLTextureOrientation
-> Word32
-> VideoGLTextureType
-> VideoGLTextureUpload
-> BoxedCopyFunc
-> C_DestroyNotify
-> m VideoGLTextureUploadMeta
bufferAddVideoGlTextureUploadMeta Buffer
buffer VideoGLTextureOrientation
textureOrientation Word32
nTextures VideoGLTextureType
textureType VideoGLTextureUpload
upload BoxedCopyFunc
userDataCopy C_DestroyNotify
userDataFree = IO VideoGLTextureUploadMeta -> m VideoGLTextureUploadMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoGLTextureUploadMeta -> m VideoGLTextureUploadMeta)
-> IO VideoGLTextureUploadMeta -> m VideoGLTextureUploadMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let textureOrientation' :: CUInt
textureOrientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoGLTextureOrientation -> Int)
-> VideoGLTextureOrientation
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoGLTextureOrientation -> Int
forall a. Enum a => a -> Int
fromEnum) VideoGLTextureOrientation
textureOrientation
let textureType' :: CUInt
textureType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoGLTextureType -> Int) -> VideoGLTextureType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoGLTextureType -> Int
forall a. Enum a => a -> Int
fromEnum) VideoGLTextureType
textureType
FunPtr C_VideoGLTextureUpload
upload' <- C_VideoGLTextureUpload -> IO (FunPtr C_VideoGLTextureUpload)
GstVideo.Callbacks.mk_VideoGLTextureUpload (Maybe (Ptr (FunPtr C_VideoGLTextureUpload))
-> VideoGLTextureUpload -> C_VideoGLTextureUpload
GstVideo.Callbacks.wrap_VideoGLTextureUpload Maybe (Ptr (FunPtr C_VideoGLTextureUpload))
forall a. Maybe a
Nothing VideoGLTextureUpload
upload)
FunPtr BoxedCopyFunc
userDataCopy' <- BoxedCopyFunc -> IO (FunPtr BoxedCopyFunc)
GObject.Callbacks.mk_BoxedCopyFunc (Maybe (Ptr (FunPtr BoxedCopyFunc))
-> BoxedCopyFunc -> BoxedCopyFunc
GObject.Callbacks.wrap_BoxedCopyFunc Maybe (Ptr (FunPtr BoxedCopyFunc))
forall a. Maybe a
Nothing BoxedCopyFunc
userDataCopy)
FunPtr C_DestroyNotify
userDataFree' <- C_DestroyNotify -> IO (FunPtr C_DestroyNotify)
GObject.Callbacks.mk_BoxedFreeFunc (Maybe (Ptr (FunPtr C_DestroyNotify))
-> C_DestroyNotify -> C_DestroyNotify
GObject.Callbacks.wrap_BoxedFreeFunc Maybe (Ptr (FunPtr C_DestroyNotify))
forall a. Maybe a
Nothing C_DestroyNotify
userDataFree)
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr VideoGLTextureUploadMeta
result <- Ptr Buffer
-> CUInt
-> Word32
-> CUInt
-> FunPtr C_VideoGLTextureUpload
-> Ptr ()
-> FunPtr BoxedCopyFunc
-> FunPtr C_DestroyNotify
-> IO (Ptr VideoGLTextureUploadMeta)
gst_buffer_add_video_gl_texture_upload_meta Ptr Buffer
buffer' CUInt
textureOrientation' Word32
nTextures CUInt
textureType' FunPtr C_VideoGLTextureUpload
upload' Ptr ()
forall a. Ptr a
userData FunPtr BoxedCopyFunc
userDataCopy' FunPtr C_DestroyNotify
userDataFree'
Text -> Ptr VideoGLTextureUploadMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoGlTextureUploadMeta" Ptr VideoGLTextureUploadMeta
result
VideoGLTextureUploadMeta
result' <- ((ManagedPtr VideoGLTextureUploadMeta -> VideoGLTextureUploadMeta)
-> Ptr VideoGLTextureUploadMeta -> IO VideoGLTextureUploadMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoGLTextureUploadMeta -> VideoGLTextureUploadMeta
GstVideo.VideoGLTextureUploadMeta.VideoGLTextureUploadMeta) Ptr VideoGLTextureUploadMeta
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_VideoGLTextureUpload -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_VideoGLTextureUpload
upload'
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr BoxedCopyFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr BoxedCopyFunc
userDataCopy'
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_DestroyNotify -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_DestroyNotify
userDataFree'
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoGLTextureUploadMeta -> IO VideoGLTextureUploadMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoGLTextureUploadMeta
result'
foreign import ccall "gst_buffer_add_video_codec_alpha_meta" gst_buffer_add_video_codec_alpha_meta ::
Ptr Gst.Buffer.Buffer ->
Ptr Gst.Buffer.Buffer ->
IO (Ptr GstVideo.VideoCodecAlphaMeta.VideoCodecAlphaMeta)
bufferAddVideoCodecAlphaMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Gst.Buffer.Buffer
-> m GstVideo.VideoCodecAlphaMeta.VideoCodecAlphaMeta
bufferAddVideoCodecAlphaMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> Buffer -> m VideoCodecAlphaMeta
bufferAddVideoCodecAlphaMeta Buffer
buffer Buffer
alphaBuffer = IO VideoCodecAlphaMeta -> m VideoCodecAlphaMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecAlphaMeta -> m VideoCodecAlphaMeta)
-> IO VideoCodecAlphaMeta -> m VideoCodecAlphaMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr Buffer
alphaBuffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Buffer
alphaBuffer
Ptr VideoCodecAlphaMeta
result <- Ptr Buffer -> Ptr Buffer -> IO (Ptr VideoCodecAlphaMeta)
gst_buffer_add_video_codec_alpha_meta Ptr Buffer
buffer' Ptr Buffer
alphaBuffer'
Text -> Ptr VideoCodecAlphaMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoCodecAlphaMeta" Ptr VideoCodecAlphaMeta
result
VideoCodecAlphaMeta
result' <- ((ManagedPtr VideoCodecAlphaMeta -> VideoCodecAlphaMeta)
-> Ptr VideoCodecAlphaMeta -> IO VideoCodecAlphaMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoCodecAlphaMeta -> VideoCodecAlphaMeta
GstVideo.VideoCodecAlphaMeta.VideoCodecAlphaMeta) Ptr VideoCodecAlphaMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
alphaBuffer
VideoCodecAlphaMeta -> IO VideoCodecAlphaMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecAlphaMeta
result'
foreign import ccall "gst_buffer_add_video_caption_meta" gst_buffer_add_video_caption_meta ::
Ptr Gst.Buffer.Buffer ->
CUInt ->
Ptr Word8 ->
Word64 ->
IO (Ptr GstVideo.VideoCaptionMeta.VideoCaptionMeta)
bufferAddVideoCaptionMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> GstVideo.Enums.VideoCaptionType
-> ByteString
-> m GstVideo.VideoCaptionMeta.VideoCaptionMeta
bufferAddVideoCaptionMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> VideoCaptionType -> ByteString -> m VideoCaptionMeta
bufferAddVideoCaptionMeta Buffer
buffer VideoCaptionType
captionType ByteString
data_ = IO VideoCaptionMeta -> m VideoCaptionMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCaptionMeta -> m VideoCaptionMeta)
-> IO VideoCaptionMeta -> m VideoCaptionMeta
forall a b. (a -> b) -> a -> b
$ do
let size :: CGType
size = Int -> CGType
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CGType) -> Int -> CGType
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let captionType' :: CUInt
captionType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoCaptionType -> Int) -> VideoCaptionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoCaptionType -> Int
forall a. Enum a => a -> Int
fromEnum) VideoCaptionType
captionType
Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
Ptr VideoCaptionMeta
result <- Ptr Buffer
-> CUInt -> Ptr Word8 -> CGType -> IO (Ptr VideoCaptionMeta)
gst_buffer_add_video_caption_meta Ptr Buffer
buffer' CUInt
captionType' Ptr Word8
data_' CGType
size
Text -> Ptr VideoCaptionMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoCaptionMeta" Ptr VideoCaptionMeta
result
VideoCaptionMeta
result' <- ((ManagedPtr VideoCaptionMeta -> VideoCaptionMeta)
-> Ptr VideoCaptionMeta -> IO VideoCaptionMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoCaptionMeta -> VideoCaptionMeta
GstVideo.VideoCaptionMeta.VideoCaptionMeta) Ptr VideoCaptionMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
VideoCaptionMeta -> IO VideoCaptionMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCaptionMeta
result'
foreign import ccall "gst_buffer_add_video_bar_meta" gst_buffer_add_video_bar_meta ::
Ptr Gst.Buffer.Buffer ->
Word8 ->
CInt ->
Word32 ->
Word32 ->
IO (Ptr GstVideo.VideoBarMeta.VideoBarMeta)
bufferAddVideoBarMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Word8
-> Bool
-> Word32
-> Word32
-> m GstVideo.VideoBarMeta.VideoBarMeta
bufferAddVideoBarMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> Word8 -> Bool -> Word32 -> Word32 -> m VideoBarMeta
bufferAddVideoBarMeta Buffer
buffer Word8
field Bool
isLetterbox Word32
barData1 Word32
barData2 = IO VideoBarMeta -> m VideoBarMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoBarMeta -> m VideoBarMeta)
-> IO VideoBarMeta -> m VideoBarMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let isLetterbox' :: CInt
isLetterbox' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
isLetterbox
Ptr VideoBarMeta
result <- Ptr Buffer
-> Word8 -> CInt -> Word32 -> Word32 -> IO (Ptr VideoBarMeta)
gst_buffer_add_video_bar_meta Ptr Buffer
buffer' Word8
field CInt
isLetterbox' Word32
barData1 Word32
barData2
Text -> Ptr VideoBarMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoBarMeta" Ptr VideoBarMeta
result
VideoBarMeta
result' <- ((ManagedPtr VideoBarMeta -> VideoBarMeta)
-> Ptr VideoBarMeta -> IO VideoBarMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoBarMeta -> VideoBarMeta
GstVideo.VideoBarMeta.VideoBarMeta) Ptr VideoBarMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoBarMeta -> IO VideoBarMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoBarMeta
result'
foreign import ccall "gst_buffer_add_video_affine_transformation_meta" gst_buffer_add_video_affine_transformation_meta ::
Ptr Gst.Buffer.Buffer ->
IO (Ptr GstVideo.VideoAffineTransformationMeta.VideoAffineTransformationMeta)
bufferAddVideoAffineTransformationMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> m GstVideo.VideoAffineTransformationMeta.VideoAffineTransformationMeta
bufferAddVideoAffineTransformationMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> m VideoAffineTransformationMeta
bufferAddVideoAffineTransformationMeta Buffer
buffer = IO VideoAffineTransformationMeta -> m VideoAffineTransformationMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoAffineTransformationMeta
-> m VideoAffineTransformationMeta)
-> IO VideoAffineTransformationMeta
-> m VideoAffineTransformationMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
Ptr VideoAffineTransformationMeta
result <- Ptr Buffer -> IO (Ptr VideoAffineTransformationMeta)
gst_buffer_add_video_affine_transformation_meta Ptr Buffer
buffer'
Text -> Ptr VideoAffineTransformationMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoAffineTransformationMeta" Ptr VideoAffineTransformationMeta
result
VideoAffineTransformationMeta
result' <- ((ManagedPtr VideoAffineTransformationMeta
-> VideoAffineTransformationMeta)
-> Ptr VideoAffineTransformationMeta
-> IO VideoAffineTransformationMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoAffineTransformationMeta
-> VideoAffineTransformationMeta
GstVideo.VideoAffineTransformationMeta.VideoAffineTransformationMeta) Ptr VideoAffineTransformationMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoAffineTransformationMeta -> IO VideoAffineTransformationMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoAffineTransformationMeta
result'
foreign import ccall "gst_buffer_add_video_afd_meta" gst_buffer_add_video_afd_meta ::
Ptr Gst.Buffer.Buffer ->
Word8 ->
CUInt ->
CUInt ->
IO (Ptr GstVideo.VideoAFDMeta.VideoAFDMeta)
bufferAddVideoAfdMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Buffer.Buffer
-> Word8
-> GstVideo.Enums.VideoAFDSpec
-> GstVideo.Enums.VideoAFDValue
-> m GstVideo.VideoAFDMeta.VideoAFDMeta
bufferAddVideoAfdMeta :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Buffer -> Word8 -> VideoAFDSpec -> VideoAFDValue -> m VideoAFDMeta
bufferAddVideoAfdMeta Buffer
buffer Word8
field VideoAFDSpec
spec VideoAFDValue
afd = IO VideoAFDMeta -> m VideoAFDMeta
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoAFDMeta -> m VideoAFDMeta)
-> IO VideoAFDMeta -> m VideoAFDMeta
forall a b. (a -> b) -> a -> b
$ do
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
let spec' :: CUInt
spec' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoAFDSpec -> Int) -> VideoAFDSpec -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoAFDSpec -> Int
forall a. Enum a => a -> Int
fromEnum) VideoAFDSpec
spec
let afd' :: CUInt
afd' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoAFDValue -> Int) -> VideoAFDValue -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoAFDValue -> Int
forall a. Enum a => a -> Int
fromEnum) VideoAFDValue
afd
Ptr VideoAFDMeta
result <- Ptr Buffer -> Word8 -> CUInt -> CUInt -> IO (Ptr VideoAFDMeta)
gst_buffer_add_video_afd_meta Ptr Buffer
buffer' Word8
field CUInt
spec' CUInt
afd'
Text -> Ptr VideoAFDMeta -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferAddVideoAfdMeta" Ptr VideoAFDMeta
result
VideoAFDMeta
result' <- ((ManagedPtr VideoAFDMeta -> VideoAFDMeta)
-> Ptr VideoAFDMeta -> IO VideoAFDMeta
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoAFDMeta -> VideoAFDMeta
GstVideo.VideoAFDMeta.VideoAFDMeta) Ptr VideoAFDMeta
result
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
VideoAFDMeta -> IO VideoAFDMeta
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoAFDMeta
result'