    {-# LINE 2 "./Media/Streaming/GStreamer/Core/Message.chs" #-}
    -- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*-
    --
    -- Author : Peter Gavin
    -- Created: 1-Apr-2007
    --
    -- Copyright (c) 2007 Peter Gavin
    --
    -- This library is free software: you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public License
    -- as published by the Free Software Foundation, either version 3 of
    -- the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- You should have received a copy of the GNU Lesser General Public
    -- License along with this program. If not, see
    -- <http:
    --
    -- GStreamer, the C library which this Haskell library depends on, is
    -- available under LGPL Version 2. The documentation included with
    -- this library is based on the original GStreamer documentation.
    --
    -- | Maintainer : gtk2hs-devel@lists.sourceforge.net
    -- Stability : alpha
    -- Portability : portable (depends on GHC)
    module Media.Streaming.GStreamer.Core.Message (

      Message,
      MessageClass,
      castToMessage,
      gTypeMessage,

      MessageType(..),
      messageTypeGetName,
      messageTypeToQuark,

      messageSrc,
      messageTimestamp,
      messageType,
      messageTypeName,
      messageStructure,

      messageNewApplication,
      messageNewClockProvide,
      messageNewClockLost,
      messageNewCustom,
      messageNewElement,
      messageNewEOS,
      messageNewError,

      messageNewInfo,

      messageNewNewClock,
      messageNewSegmentDone,
      messageNewSegmentStart,
      messageNewStateChanged,
      messageNewTag,

      messageNewBuffering,

      messageNewWarning,
      messageNewDuration,
      messageNewStateDirty,

      messageNewLatency,

      messageParseClockLost,
      messageParseClockProvide,
      messageParseError,

      messageParseInfo,

      messageParseNewClock,
      messageParseSegmentDone,
      messageParseSegmentStart,
      messageParseStateChanged,
      messageParseTag,

      messageParseBuffering,

      messageParseWarning,
      messageParseDuration,

      ) where

    import Control.Monad (liftM)
    import Media.Streaming.GStreamer.Core.Types
    {-# LINE 93 "./Media/Streaming/GStreamer/Core/Message.chs" #-}
    import System.Glib.FFI
    import System.Glib.GObject
    import System.Glib.UTFString
    import System.Glib.GError

    {-# LINE 99 "./Media/Streaming/GStreamer/Core/Message.chs" #-}

    messageTypeGetName :: MessageType
                       -> String
    messageTypeGetName messageType =
        unsafePerformIO $
            gst_message_type_get_name (fromIntegral $ fromEnum messageType) >>=
                peekUTFString

    messageTypeToQuark :: MessageType
                       -> Quark
    messageTypeToQuark messageType =
        gst_message_type_to_quark (fromIntegral $ fromEnum messageType)

    messageSrc :: Message
               -> Object
    messageSrc message =
        unsafePerformIO $ withMiniObject message (\ptr -> do {peekByteOff ptr 36 ::IO (Ptr Object)}) >>=
            peekObject

    messageTimestamp :: Message
                     -> ClockTime
    messageTimestamp message =
        fromIntegral $ unsafePerformIO $ withMiniObject message (\ptr -> do {peekByteOff ptr 28 ::IO CULLong})
    {-# LINE 122 "./Media/Streaming/GStreamer/Core/Message.chs" #-}

    messageType :: Message
                -> MessageType
    messageType message =
        toEnum $ fromIntegral $ unsafePerformIO $
            withMiniObject message cMessageGetMessageType
    foreign import ccall unsafe "_hs_gst_message_get_message_type"
        cMessageGetMessageType :: Ptr Message
                               -> IO (CInt)
    {-# LINE 131 "./Media/Streaming/GStreamer/Core/Message.chs" #-}

    messageTypeName :: Message
                    -> String
    messageTypeName =
        messageTypeGetName . messageType

    messageStructure :: Message
                     -> Structure
    messageStructure message =
        unsafePerformIO $
            (\(Message arg1) -> withForeignPtr arg1 $ \argPtr1 ->gst_message_get_structure argPtr1) message >>=
                peekStructure

    messageNewApplication :: ObjectClass objectT
                          => objectT
                          -> Structure
                          -> Message
    messageNewApplication src structure =
        unsafePerformIO $
            giveStructure structure
                          ((\(Object arg1) (Structure arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gst_message_new_application argPtr1 argPtr2) (toObject src)) >>=
                takeMiniObject

    messageNewClockProvide :: (ObjectClass objectT, ClockClass clockT)
                           => objectT
                           -> clockT
                           -> Bool
                           -> Message
    messageNewClockProvide src clock ready =
        unsafePerformIO $
            (\(Object arg1) (Clock arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gst_message_new_clock_provide argPtr1 argPtr2 arg3) (toObject src)
                                                 (toClock clock)
                                                 (fromBool ready) >>=
                takeMiniObject

    messageNewClockLost :: (ObjectClass objectT, ClockClass clockT)
                        => objectT
                        -> clockT
                        -> Message
    messageNewClockLost src clock =
        unsafePerformIO $
            (\(Object arg1) (Clock arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gst_message_new_clock_lost argPtr1 argPtr2) (toObject src)
                                              (toClock clock) >>=
                takeMiniObject

    messageNewCustom :: ObjectClass objectT
                     => MessageType
                     -> objectT
                     -> Maybe Structure
                     -> Message
    messageNewCustom messageType src structure =
        unsafePerformIO $
            (case structure of
               Just structure' ->
                   giveStructure structure' messageNewCustom'
               Nothing ->
                   messageNewCustom' $ Structure nullForeignPtr) >>=
                takeMiniObject
        where
          messageNewCustom' =
              (\arg1 (Object arg2) (Structure arg3) -> withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg3 $ \argPtr3 ->gst_message_new_custom arg1 argPtr2 argPtr3) (cFromEnum messageType)
                                            (toObject src)

    messageNewElement :: ObjectClass objectT
                      => objectT
                      -> Maybe Structure
                      -> Message
    messageNewElement src structure =
        unsafePerformIO $
            (case structure of
               Just structure' ->
                   giveStructure structure' messageNewElement'
               Nothing ->
                   messageNewElement' $ Structure nullForeignPtr) >>=
                takeMiniObject
        where
          messageNewElement' =
              (\(Object arg1) (Structure arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gst_message_new_element argPtr1 argPtr2) (toObject src)

    messageNewEOS :: ObjectClass objectT
                  => objectT
                  -> Message
    messageNewEOS src =
        unsafePerformIO $
            (\(Object arg1) -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_eos argPtr1) (toObject src) >>=
                takeMiniObject

    messageNewError :: ObjectClass objectT
                    => objectT
                    -> GError
                    -> String
                    -> Message
    messageNewError src error debug =
        unsafePerformIO $
           with error $ \gErrorPtr -> withUTFString debug $ \debugPtr ->
               (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_error argPtr1 arg2 arg3) (toObject src)
                                            (castPtr gErrorPtr)
                                            debugPtr >>=
                   takeMiniObject

    messageNewInfo :: ObjectClass objectT
                   => objectT
                   -> GError
                   -> String
                   -> Message
    messageNewInfo src error debug =
        unsafePerformIO $
           with error $ \gErrorPtr -> withUTFString debug $ \debugPtr ->
               (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_info argPtr1 arg2 arg3) (toObject src)
                                           (castPtr gErrorPtr)
                                           debugPtr >>=
                   takeMiniObject

    messageNewNewClock :: (ObjectClass objectT, ClockClass clockT)
                       => objectT
                       -> clockT
                       -> Message
    messageNewNewClock src clock =
        unsafePerformIO $
            (\(Object arg1) (Clock arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gst_message_new_new_clock argPtr1 argPtr2) (toObject src)
                                             (toClock clock) >>=
                takeMiniObject

    messageNewSegmentDone :: ObjectClass objectT
                          => objectT
                          -> Format
                          -> Int64
                          -> Message
    messageNewSegmentDone src format position =
        unsafePerformIO $
            (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_segment_done argPtr1 arg2 arg3) (toObject src)
                                                (fromIntegral $ fromFormat format)
                                                (fromIntegral position) >>=
                takeMiniObject

    messageNewSegmentStart :: ObjectClass objectT
                           => objectT
                           -> Format
                           -> Int64
                           -> Message
    messageNewSegmentStart src format position =
        unsafePerformIO $
            (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_segment_start argPtr1 arg2 arg3) (toObject src)
                                                 (fromIntegral $ fromFormat format)
                                                 (fromIntegral position) >>=
                takeMiniObject

    messageNewStateChanged :: ObjectClass objectT
                           => objectT
                           -> State
                           -> State
                           -> State
                           -> Message
    messageNewStateChanged src oldState newState pending =
        unsafePerformIO $
           (\(Object arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_state_changed argPtr1 arg2 arg3 arg4) (toObject src)
                                                (cFromEnum oldState)
                                                (cFromEnum newState)
                                                (cFromEnum pending) >>=
               takeMiniObject

    messageNewTag :: ObjectClass objectT
                  => objectT
                  -> TagList
                  -> Message
    messageNewTag src tagList =
        unsafePerformIO $ withTagList tagList $ \tagListPtr ->
            (\(Object arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_tag argPtr1 arg2) (toObject src)
                                       (castPtr tagListPtr) >>=
                takeMiniObject

    messageNewBuffering :: ObjectClass objectT
                        => objectT
                        -> Int
                        -> Message
    messageNewBuffering src percent =
        unsafePerformIO $
            (\(Object arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_buffering argPtr1 arg2) (toObject src)
                                             (fromIntegral percent) >>=
                takeMiniObject

    messageNewWarning :: ObjectClass objectT
                      => objectT
                      -> GError
                      -> String
                      -> Message
    messageNewWarning src error debug =
        unsafePerformIO $
           with error $ \gErrorPtr -> withUTFString debug $ \debugPtr ->
               (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_warning argPtr1 arg2 arg3) (toObject src)
                                              (castPtr gErrorPtr)
                                              debugPtr >>=
                   takeMiniObject

    messageNewDuration :: ObjectClass objectT
                       => objectT
                       -> Format
                       -> Int64
                       -> Message
    messageNewDuration src format duration =
        unsafePerformIO $
            (\(Object arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_duration argPtr1 arg2 arg3) (toObject src)
                                            (fromIntegral $ fromFormat format)
                                            (fromIntegral duration) >>=
               takeMiniObject

    messageNewStateDirty :: ObjectClass objectT
                         => objectT
                         -> Message
    messageNewStateDirty src =
        unsafePerformIO $
            (\(Object arg1) -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_state_dirty argPtr1) (toObject src) >>=
                takeMiniObject

    messageNewLatency :: ObjectClass objectT
                      => objectT
                      -> Message
    messageNewLatency src =
        unsafePerformIO $
            (\(Object arg1) -> withForeignPtr arg1 $ \argPtr1 ->gst_message_new_latency argPtr1) (toObject src) >>=
                takeMiniObject

    messageParseClockLost :: Message
                          -> Maybe Clock
    messageParseClockLost message | messageType message == MessageClockLost =
        Just $ unsafePerformIO $ alloca $ \clockPtr ->
            do (\(Message arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_clock_lost argPtr1 arg2) message $ castPtr clockPtr
               peek clockPtr >>= peekObject
                                  | otherwise = Nothing

    messageParseClockProvide :: Message
                             -> Maybe (Clock, Bool)
    messageParseClockProvide message | messageType message == MessageClockProvide =
        Just $ unsafePerformIO $ alloca $ \clockPtr ->
            alloca $ \readyPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_clock_provide argPtr1 arg2 arg3) message (castPtr clockPtr) readyPtr
                   clock <- peek clockPtr >>= peekObject
                   ready <- liftM toBool $ peek readyPtr
                   return (clock, ready)
                                     | otherwise = Nothing

    messageParseError :: Message
                      -> Maybe (GError, String)
    messageParseError message | messageType message == MessageError =
        Just $ unsafePerformIO $ alloca $ \gErrorPtr ->
            alloca $ \debugPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_error argPtr1 arg2 arg3) message (castPtr gErrorPtr) debugPtr
                   gError <- do ptr <- peek gErrorPtr
                                gError <- peek ptr
                                g_error_free $ castPtr ptr
                                return gError
                   debug <- peek debugPtr >>= readUTFString
                   return (gError, debug)
                              | otherwise = Nothing

    messageParseInfo :: Message
                     -> Maybe (GError, String)
    messageParseInfo message | messageType message == MessageInfo =
        Just $ unsafePerformIO $ alloca $ \gErrorPtr ->
            alloca $ \debugPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_info argPtr1 arg2 arg3) message (castPtr gErrorPtr) debugPtr
                   gError <- do ptr <- peek gErrorPtr
                                gError <- peek ptr
                                g_error_free $ castPtr ptr
                                return gError
                   debug <- peek debugPtr >>= readUTFString
                   return (gError, debug)
                             | otherwise = Nothing

    messageParseNewClock :: Message
                         -> Maybe Clock
    messageParseNewClock message | messageType message == MessageNewClock =
        Just $ unsafePerformIO $ alloca $ \clockPtr ->
            do (\(Message arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_clock_lost argPtr1 arg2) message $ castPtr clockPtr
               peek clockPtr >>= peekObject
                                 | otherwise = Nothing

    messageParseSegmentDone :: Message
                            -> Maybe (Format, Int64)
    messageParseSegmentDone message | messageType message == MessageSegmentDone =
        Just $ unsafePerformIO $ alloca $ \formatPtr ->
            alloca $ \positionPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_segment_done argPtr1 arg2 arg3) message formatPtr positionPtr
                   format <- liftM (toFormat . fromIntegral) $ peek formatPtr
                   position <- liftM fromIntegral $ peek positionPtr
                   return (format, position)
                                    | otherwise = Nothing

    messageParseSegmentStart :: Message
                             -> Maybe (Format, Int64)
    messageParseSegmentStart message | messageType message == MessageSegmentStart =
        Just $ unsafePerformIO $ alloca $ \formatPtr ->
            alloca $ \positionPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_segment_start argPtr1 arg2 arg3) message formatPtr positionPtr
                   format <- liftM (toFormat . fromIntegral) $ peek formatPtr
                   position <- liftM fromIntegral $ peek positionPtr
                   return (format, position)
                                     | otherwise = Nothing

    messageParseStateChanged :: Message
                             -> Maybe (State, State, State)
    messageParseStateChanged message | messageType message == MessageStateChanged =
        Just $ unsafePerformIO $ alloca $ \oldStatePtr ->
            alloca $ \newStatePtr -> alloca $ \pendingPtr ->
                do (\(Message arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_state_changed argPtr1 arg2 arg3 arg4) message oldStatePtr newStatePtr pendingPtr
                   oldState <- liftM cToEnum $ peek oldStatePtr
                   newState <- liftM cToEnum $ peek newStatePtr
                   pending <- liftM cToEnum $ peek pendingPtr
                   return (oldState, newState, pending)
                                     | otherwise = Nothing

    messageParseTag :: Message
                    -> Maybe TagList
    messageParseTag message | messageType message == MessageTag =
        Just $ unsafePerformIO $ alloca $ \tagListPtr ->
            do (\(Message arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_tag argPtr1 arg2) message $ castPtr tagListPtr
               peek tagListPtr >>= takeTagList
                            | otherwise = Nothing

    messageParseBuffering :: Message
                          -> Maybe Int
    messageParseBuffering message | messageType message == MessageBuffering =
        Just $ fromIntegral $ unsafePerformIO $ alloca $ \percentPtr ->
            do (\(Message arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_buffering argPtr1 arg2) message percentPtr
               peek percentPtr
                                  | otherwise = Nothing

    messageParseWarning :: Message
                        -> Maybe (Maybe GError, Maybe String)
    messageParseWarning message | messageType message == MessageWarning =
        Just $ unsafePerformIO $ alloca $ \gErrorPtr ->
            alloca $ \debugPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_warning argPtr1 arg2 arg3) message (castPtr gErrorPtr) debugPtr
                   gError <- peek gErrorPtr >>=
                                 (maybePeek $ \ptr ->
                                  do gError <- peek ptr
                                     g_error_free $ castPtr ptr
                                     return gError)
                   debug <- peek debugPtr >>= maybePeek readUTFString
                   return (gError, debug)
                                | otherwise = Nothing

    messageParseDuration :: Message
                         -> Maybe (Format, Int64)
    messageParseDuration message | messageType message == MessageDuration =
        Just $ unsafePerformIO $ alloca $ \formatPtr ->
            alloca $ \positionPtr ->
                do (\(Message arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gst_message_parse_duration argPtr1 arg2 arg3) message formatPtr positionPtr
                   format <- liftM (toFormat . fromIntegral) $ peek formatPtr
                   position <- liftM fromIntegral $ peek positionPtr
                   return (format, position)
                                 | otherwise = Nothing

    foreign import ccall safe "gst_message_type_get_name"
      gst_message_type_get_name :: (CInt -> (IO (Ptr CChar)))

    foreign import ccall safe "gst_message_type_to_quark"
      gst_message_type_to_quark :: (CInt -> CUInt)

    foreign import ccall safe "gst_message_get_structure"
      gst_message_get_structure :: ((Ptr Message) -> (IO (Ptr Structure)))

    foreign import ccall safe "gst_message_new_application"
      gst_message_new_application :: ((Ptr Object) -> ((Ptr Structure) -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_clock_provide"
      gst_message_new_clock_provide :: ((Ptr Object) -> ((Ptr Clock) -> (CInt -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_clock_lost"
      gst_message_new_clock_lost :: ((Ptr Object) -> ((Ptr Clock) -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_custom"
      gst_message_new_custom :: (CInt -> ((Ptr Object) -> ((Ptr Structure) -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_element"
      gst_message_new_element :: ((Ptr Object) -> ((Ptr Structure) -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_eos"
      gst_message_new_eos :: ((Ptr Object) -> (IO (Ptr Message)))

    foreign import ccall safe "gst_message_new_error"
      gst_message_new_error :: ((Ptr Object) -> ((Ptr ()) -> ((Ptr CChar) -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_info"
      gst_message_new_info :: ((Ptr Object) -> ((Ptr ()) -> ((Ptr CChar) -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_new_clock"
      gst_message_new_new_clock :: ((Ptr Object) -> ((Ptr Clock) -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_segment_done"
      gst_message_new_segment_done :: ((Ptr Object) -> (CInt -> (CLLong -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_segment_start"
      gst_message_new_segment_start :: ((Ptr Object) -> (CInt -> (CLLong -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_state_changed"
      gst_message_new_state_changed :: ((Ptr Object) -> (CInt -> (CInt -> (CInt -> (IO (Ptr Message))))))

    foreign import ccall safe "gst_message_new_tag"
      gst_message_new_tag :: ((Ptr Object) -> ((Ptr ()) -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_buffering"
      gst_message_new_buffering :: ((Ptr Object) -> (CInt -> (IO (Ptr Message))))

    foreign import ccall safe "gst_message_new_warning"
      gst_message_new_warning :: ((Ptr Object) -> ((Ptr ()) -> ((Ptr CChar) -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_duration"
      gst_message_new_duration :: ((Ptr Object) -> (CInt -> (CLLong -> (IO (Ptr Message)))))

    foreign import ccall safe "gst_message_new_state_dirty"
      gst_message_new_state_dirty :: ((Ptr Object) -> (IO (Ptr Message)))

    foreign import ccall safe "gst_message_new_latency"
      gst_message_new_latency :: ((Ptr Object) -> (IO (Ptr Message)))

    foreign import ccall safe "gst_message_parse_clock_lost"
      gst_message_parse_clock_lost :: ((Ptr Message) -> ((Ptr Clock) -> (IO ())))

    foreign import ccall safe "gst_message_parse_clock_provide"
      gst_message_parse_clock_provide :: ((Ptr Message) -> ((Ptr Clock) -> ((Ptr CInt) -> (IO ()))))

    foreign import ccall safe "gst_message_parse_error"
      gst_message_parse_error :: ((Ptr Message) -> ((Ptr (Ptr ())) -> ((Ptr (Ptr CChar)) -> (IO ()))))

    foreign import ccall safe "g_error_free"
      g_error_free :: ((Ptr ()) -> (IO ()))

    foreign import ccall safe "gst_message_parse_info"
      gst_message_parse_info :: ((Ptr Message) -> ((Ptr (Ptr ())) -> ((Ptr (Ptr CChar)) -> (IO ()))))

    foreign import ccall safe "gst_message_parse_segment_done"
      gst_message_parse_segment_done :: ((Ptr Message) -> ((Ptr CInt) -> ((Ptr CLLong) -> (IO ()))))

    foreign import ccall safe "gst_message_parse_segment_start"
      gst_message_parse_segment_start :: ((Ptr Message) -> ((Ptr CInt) -> ((Ptr CLLong) -> (IO ()))))

    foreign import ccall safe "gst_message_parse_state_changed"
      gst_message_parse_state_changed :: ((Ptr Message) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ())))))

    foreign import ccall safe "gst_message_parse_tag"
      gst_message_parse_tag :: ((Ptr Message) -> ((Ptr (Ptr ())) -> (IO ())))

    foreign import ccall safe "gst_message_parse_buffering"
      gst_message_parse_buffering :: ((Ptr Message) -> ((Ptr CInt) -> (IO ())))

    foreign import ccall safe "gst_message_parse_warning"
      gst_message_parse_warning :: ((Ptr Message) -> ((Ptr (Ptr ())) -> ((Ptr (Ptr CChar)) -> (IO ()))))

    foreign import ccall safe "gst_message_parse_duration"
      gst_message_parse_duration :: ((Ptr Message) -> ((Ptr CInt) -> ((Ptr CLLong) -> (IO ()))))