Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Media/Streaming/GStreamer/Core/Constants.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ data MessageType = MessageEOS -- ^ end-of-stream
#if GST_CHECK_VERSION(0, 10, 13)
| MessageAsyncStart -- ^ an element has started an async state change; used internally
| MessageAsyncDone -- ^ an element has completed an async state change; used internally
#endif
#if GST_CHECK_VERSION(0, 10, 35)
| MessageRequestState
| MessageStepStart
| MessageQoS
| MessageProgress
#endif
deriving (Eq, Bounded, Show)
instance Enum MessageType where
Expand Down Expand Up @@ -358,6 +364,13 @@ instance Enum MessageType where
#if GST_CHECK_VERSION(0, 10, 13)
| n == #{const GST_MESSAGE_ASYNC_START} = MessageAsyncStart
| n == #{const GST_MESSAGE_ASYNC_DONE} = MessageAsyncDone
#endif
#if GST_CHECK_VERSION(0, 10, 35)
| n == #{const GST_MESSAGE_REQUEST_STATE} = MessageRequestState
| n == #{const GST_MESSAGE_STEP_START} = MessageStepStart
| n == #{const GST_MESSAGE_QOS} = MessageQoS
| n == #{const GST_MESSAGE_PROGRESS} = MessageProgress
| otherwise = error $ "Unknown message: " ++ show n
#endif
fromEnum MessageEOS = #{const GST_MESSAGE_EOS}
fromEnum MessageError = #{const GST_MESSAGE_ERROR}
Expand All @@ -384,6 +397,12 @@ instance Enum MessageType where
fromEnum MessageAsyncStart = #{const GST_MESSAGE_ASYNC_START}
fromEnum MessageAsyncDone = #{const GST_MESSAGE_ASYNC_DONE}
#endif
#if GST_CHECK_VERSION(0, 10, 35)
fromEnum MessageRequestState = #{const GST_MESSAGE_REQUEST_STATE}
fromEnum MessageStepStart = #{const GST_MESSAGE_STEP_START}
fromEnum MessageQoS = #{const GST_MESSAGE_QOS}
fromEnum MessageProgress = #{const GST_MESSAGE_PROGRESS}
#endif
instance Flags MessageType

-- | The flags that a 'Caps' may have.
Expand Down