{-# LINE 2 "./Media/Streaming/GStreamer/Core/Pad.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)moduleMedia.Streaming.GStreamer.Core.Pad(Pad,PadClass,castToPad,gTypePad,PadFlags(..),PadDirection(..),PadLinkReturn(..),FlowReturn(..),ActivateMode(..),padGetFlags,padSetFlags,padUnsetFlags,padNew,padGetDirection,padGetParentElement,padLink,padUnlink,padIsLinked,padCanLink,padGetCaps,padGetAllowedCaps,padGetNegotiatedCaps,padGetPadTemplateCaps,padSetCaps,padGetPeer,padPeerGetCaps,padIsActive,padSetBlocked,padIsBlocked,padIsBlocking,padNewFromTemplate,padAcceptCaps,padProxyGetcaps,padFixateCaps,padPeerAcceptCaps,padSendEvent,padQuery,padQueryPosition,padQueryDuration,padQueryConvert,padQueryPeerPosition,padQueryPeerDuration,padQueryPeerConvert,padGetQueryTypes,onPadLinked,afterPadLinked,onPadRequestLink,afterPadRequestLink,onPadUnlinked,afterPadUnlinked,padCaps,padDirection,padTemplate,)whereimportControl.Monad(liftM)importData.Maybe(fromMaybe)importMedia.Streaming.GStreamer.Core.Types{-# LINE 97 "./Media/Streaming/GStreamer/Core/Pad.chs" #-}importMedia.Streaming.GStreamer.Core.Signals{-# LINE 98 "./Media/Streaming/GStreamer/Core/Pad.chs" #-}importSystem.Glib.FFIimportSystem.Glib.UTFStringimportSystem.Glib.GListimportSystem.Glib.Properties(objectGetPropertyGObject)importSystem.Glib.Attributes(ReadAttr,readAttr)importSystem.Glib.Signals{-# LINE 106 "./Media/Streaming/GStreamer/Core/Pad.chs" #-}{-# LINE 108 "./Media/Streaming/GStreamer/Core/Pad.chs" #-}padGetFlags::PadClasspadT=>padT->IO[PadFlags]padGetFlags=mkObjectGetFlagspadSetFlags::PadClasspadT=>padT->[PadFlags]->IO()padSetFlags=mkObjectSetFlagspadUnsetFlags::PadClasspadT=>padT->[PadFlags]->IO()padUnsetFlags=mkObjectUnsetFlagspadNew::String->PadDirection->IOPadpadNewnamedirection=withUTFStringname$\cName->gst_pad_newcName(fromIntegral$fromEnumdirection)>>=takeObjectpadGetDirection::PadClasspad=>pad->IOPadDirectionpadGetDirectionpad=liftM(toEnum.fromIntegral)$(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_directionargPtr1)$toPadpadpadGetParentElement::PadClasspad=>pad->IOElementpadGetParentElementpad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_parent_elementargPtr1)(toPadpad)>>=peekObjectpadLink::(PadClasssrcpad,PadClasssinkpad)=>srcpad->sinkpad->IOPadLinkReturnpadLinksrcpadsinkpad=liftM(toEnum.fromIntegral)$(\(Padarg1)(Padarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_linkargPtr1argPtr2)(toPadsrcpad)(toPadsinkpad)padUnlink::(PadClasssrcpad,PadClasssinkpad)=>srcpad->sinkpad->IOBoolpadUnlinksrcpadsinkpad=liftMtoBool$(\(Padarg1)(Padarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_unlinkargPtr1argPtr2)(toPadsrcpad)(toPadsinkpad)padIsLinked::PadClasspad=>pad->IOBoolpadIsLinkedpad=liftMtoBool$(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_is_linkedargPtr1)(toPadpad)padCanLink::(PadClasssrcpad,PadClasssinkpad)=>srcpad->sinkpad->IOBoolpadCanLinksrcpadsinkpad=liftMtoBool$(\(Padarg1)(Padarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_can_linkargPtr1argPtr2)(toPadsrcpad)(toPadsinkpad)padGetCaps::PadClasspad=>pad->IOCapspadGetCapspad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_capsargPtr1)(toPadpad)>>=takeCapspadGetAllowedCaps::PadClasspad=>pad->IO(MaybeCaps)padGetAllowedCapspad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_allowed_capsargPtr1)(toPadpad)>>=maybePeektakeCapspadGetNegotiatedCaps::PadClasspad=>pad->IO(MaybeCaps)padGetNegotiatedCapspad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_negotiated_capsargPtr1)(toPadpad)>>=maybePeektakeCapspadGetPadTemplateCaps::PadClasspad=>pad->IOCapspadGetPadTemplateCapspad=(liftMCaps$(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_pad_template_capsargPtr1)(toPadpad)>>=newForeignPtr_)>>=(\(Capsarg1)->withForeignPtrarg1$\argPtr1->gst_caps_copyargPtr1)>>=takeCapspadSetCaps::PadClasspad=>pad->MaybeCaps->IOBoolpadSetCapspadcaps=liftMtoBool$(\(Padarg1)(Capsarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_set_capsargPtr1argPtr2)(toPadpad)$fromMaybe(CapsnullForeignPtr)capspadGetPeer::PadClasspad=>pad->IO(MaybePad)padGetPeerpad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_peerargPtr1)(toPadpad)>>=maybePeektakeObjectpadPeerGetCaps::PadClasspad=>pad->IO(MaybeCaps)padPeerGetCapspad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_peer_get_capsargPtr1)(toPadpad)>>=maybePeektakeCapspadIsActive::PadClasspad=>pad->IOBoolpadIsActive=(liftMtoBool).(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_is_activeargPtr1).toPadpadSetBlocked::PadClasspad=>pad->Bool->IOBoolpadSetBlockedpadblocked=liftMtoBool$(\(Padarg1)arg2->withForeignPtrarg1$\argPtr1->gst_pad_set_blockedargPtr1arg2)(toPadpad)(fromBoolblocked)padIsBlocked::PadClasspad=>pad->IOBoolpadIsBlocked=(liftMtoBool).(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_is_blockedargPtr1).toPadpadIsBlocking::PadClasspad=>pad->IOBoolpadIsBlocking=(liftMtoBool).(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_is_blockingargPtr1).toPadpadNewFromTemplate::PadTemplateClasspadTemplate=>padTemplate->String->IO(MaybePad)padNewFromTemplatepadTemplatename=withUTFStringname$\cName->(\(PadTemplatearg1)arg2->withForeignPtrarg1$\argPtr1->gst_pad_new_from_templateargPtr1arg2)(toPadTemplatepadTemplate)cName>>=maybePeektakeObjectpadAcceptCaps::PadClasspad=>pad->Caps->IOBoolpadAcceptCapspadcaps=liftMtoBool$(\(Padarg1)(Capsarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_accept_capsargPtr1argPtr2)(toPadpad)capspadProxyGetcaps::PadClasspad=>pad->IOCapspadProxyGetcapspad=(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_proxy_getcapsargPtr1)(toPadpad)>>=takeCapspadFixateCaps::PadClasspad=>pad->Caps->IOCapspadFixateCapspadcaps=docaps'<-(\(Capsarg1)->withForeignPtrarg1$\argPtr1->gst_caps_copyargPtr1)caps>>=newForeignPtr_(\(Padarg1)(Capsarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_fixate_capsargPtr1argPtr2)(toPadpad)(Capscaps')withForeignPtrcaps'takeCapspadPeerAcceptCaps::PadClasspad=>pad->Caps->IOBoolpadPeerAcceptCapspadcaps=liftMtoBool$(\(Padarg1)(Capsarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_peer_accept_capsargPtr1argPtr2)(toPadpad)capspadSendEvent::(PadClasspad,EventClassevent)=>pad->event->IOBoolpadSendEventpadevent=liftMtoBool$giveMiniObject(toEventevent)$(\(Padarg1)(Eventarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_send_eventargPtr1argPtr2)(toPadpad)padQuery::(PadClasspad,QueryClassquery)=>pad->query->IO(Maybequery)padQuerypadquery=doquery'<-(\(MiniObjectarg1)->withForeignPtrarg1$\argPtr1->gst_mini_object_copyargPtr1)(toMiniObjectquery)>>=newForeignPtr_.castPtrsuccess<-(\(Padarg1)(Queryarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gst_pad_queryargPtr1argPtr2)(toPadpad)$Queryquery'iftoBoolsuccessthenliftMJust$withForeignPtrquery'$takeMiniObject.castPtrelsereturnNothingpadQueryPosition::PadClasspad=>pad->IO(Maybe(Format,Int64))padQueryPositionpad=alloca$\formatPtr->alloca$\curPtr->dosuccess<-(\(Padarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gst_pad_query_positionargPtr1arg2arg3)(toPadpad)formatPtrcurPtriftoBoolsuccessthendoformat<-peekformatPtrcur<-peekcurPtrreturn$Just(toFormat$fromIntegralformat,fromIntegralcur)elsereturnNothingpadQueryDuration::PadClasspad=>pad->IO(Maybe(Format,Int64))padQueryDurationpad=alloca$\formatPtr->alloca$\durationPtr->dosuccess<-(\(Padarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gst_pad_query_durationargPtr1arg2arg3)(toPadpad)formatPtrdurationPtriftoBoolsuccessthendoformat<-peekformatPtrduration<-peekdurationPtrreturn$Just(toFormat$fromIntegralformat,fromIntegralduration)elsereturnNothingpadQueryConvert::PadClasspad=>pad->Format->Int64->IO(Maybe(Format,Int64))padQueryConvertpadsrcFormatsrcVal=alloca$\destFormatPtr->alloca$\destValPtr->dosuccess<-(\(Padarg1)arg2arg3arg4arg5->withForeignPtrarg1$\argPtr1->gst_pad_query_convertargPtr1arg2arg3arg4arg5)(toPadpad)(fromIntegral$fromFormatsrcFormat)(fromIntegralsrcVal)destFormatPtrdestValPtriftoBoolsuccessthendodestFormat<-peekdestFormatPtrdestVal<-peekdestValPtrreturn$Just(toFormat$fromIntegraldestFormat,fromIntegraldestVal)elsereturnNothingpadQueryPeerPosition::PadClasspad=>pad->IO(Maybe(Format,Int64))padQueryPeerPositionpad=alloca$\formatPtr->alloca$\curPtr->dosuccess<-(\(Padarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gst_pad_query_peer_positionargPtr1arg2arg3)(toPadpad)formatPtrcurPtriftoBoolsuccessthendoformat<-peekformatPtrcur<-peekcurPtrreturn$Just(toFormat$fromIntegralformat,fromIntegralcur)elsereturnNothingpadQueryPeerDuration::PadClasspad=>pad->IO(Maybe(Format,Int64))padQueryPeerDurationpad=alloca$\formatPtr->alloca$\durationPtr->dosuccess<-(\(Padarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gst_pad_query_peer_durationargPtr1arg2arg3)(toPadpad)formatPtrdurationPtriftoBoolsuccessthendoformat<-peekformatPtrduration<-peekdurationPtrreturn$Just(toFormat$fromIntegralformat,fromIntegralduration)elsereturnNothingpadQueryPeerConvert::PadClasspad=>pad->Format->Int64->IO(Maybe(Format,Int64))padQueryPeerConvertpadsrcFormatsrcVal=alloca$\destFormatPtr->alloca$\destValPtr->dosuccess<-(\(Padarg1)arg2arg3arg4arg5->withForeignPtrarg1$\argPtr1->gst_pad_query_peer_convertargPtr1arg2arg3arg4arg5)(toPadpad)(fromIntegral$fromFormatsrcFormat)(fromIntegralsrcVal)destFormatPtrdestValPtriftoBoolsuccessthendodestFormat<-peekdestFormatPtrdestVal<-peekdestValPtrreturn$Just(toFormat$fromIntegraldestFormat,fromIntegraldestVal)elsereturnNothingpadGetQueryTypes::PadClasspad=>pad->IO[QueryType]padGetQueryTypespad=liftM(map(toEnum.fromIntegral))$(\(Padarg1)->withForeignPtrarg1$\argPtr1->gst_pad_get_query_typesargPtr1)(toPadpad)>>=peekArray00onPadLinked,afterPadLinked::(PadClasspad)=>pad->(Pad->IO())->IO(ConnectIdpad)onPadLinked=connect_OBJECT__NONE"linked"FalseafterPadLinked=connect_OBJECT__NONE"linked"TrueonPadRequestLink,afterPadRequestLink::(PadClasspad)=>pad->IO()->IO(ConnectIdpad)onPadRequestLink=connect_NONE__NONE"request-link"FalseafterPadRequestLink=connect_NONE__NONE"request-link"TrueonPadUnlinked,afterPadUnlinked::(PadClasspad)=>pad->(Pad->IO())->IO(ConnectIdpad)onPadUnlinked=connect_OBJECT__NONE"unlinked"FalseafterPadUnlinked=connect_OBJECT__NONE"unlinked"TruepadCaps::PadClasspad=>ReadAttrpadCapspadCaps=readAttrpadGetCapspadDirection::PadClasspad=>ReadAttrpadPadDirectionpadDirection=readAttrpadGetDirectionpadTemplate::PadClasspad=>ReadAttrpadPadTemplatepadTemplate=readAttr$objectGetPropertyGObjectgst_pad_template_get_type{-# LINE 459 "./Media/Streaming/GStreamer/Core/Pad.chs" #-}"template"padParentElement::PadClasspad=>ReadAttrpadElementpadParentElement=readAttrpadGetParentElementpadQueryTypes::PadClasspad=>ReadAttrpad[QueryType]padQueryTypes=readAttrpadGetQueryTypesforeignimportccallsafe"gst_pad_new"gst_pad_new::((PtrCChar)->(CInt->(IO(PtrPad))))foreignimportccallsafe"gst_pad_get_direction"gst_pad_get_direction::((PtrPad)->(IOCInt))foreignimportccallsafe"gst_pad_get_parent_element"gst_pad_get_parent_element::((PtrPad)->(IO(PtrElement)))foreignimportccallsafe"gst_pad_link"gst_pad_link::((PtrPad)->((PtrPad)->(IOCInt)))foreignimportccallsafe"gst_pad_unlink"gst_pad_unlink::((PtrPad)->((PtrPad)->(IOCInt)))foreignimportccallsafe"gst_pad_is_linked"gst_pad_is_linked::((PtrPad)->(IOCInt))foreignimportccallsafe"gst_pad_can_link"gst_pad_can_link::((PtrPad)->((PtrPad)->(IOCInt)))foreignimportccallsafe"gst_pad_get_caps"gst_pad_get_caps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_get_allowed_caps"gst_pad_get_allowed_caps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_get_negotiated_caps"gst_pad_get_negotiated_caps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_get_pad_template_caps"gst_pad_get_pad_template_caps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_caps_copy"gst_caps_copy::((PtrCaps)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_set_caps"gst_pad_set_caps::((PtrPad)->((PtrCaps)->(IOCInt)))foreignimportccallsafe"gst_pad_get_peer"gst_pad_get_peer::((PtrPad)->(IO(PtrPad)))foreignimportccallsafe"gst_pad_peer_get_caps"gst_pad_peer_get_caps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_is_active"gst_pad_is_active::((PtrPad)->(IOCInt))foreignimportccallsafe"gst_pad_set_blocked"gst_pad_set_blocked::((PtrPad)->(CInt->(IOCInt)))foreignimportccallsafe"gst_pad_is_blocked"gst_pad_is_blocked::((PtrPad)->(IOCInt))foreignimportccallsafe"gst_pad_is_blocking"gst_pad_is_blocking::((PtrPad)->(IOCInt))foreignimportccallsafe"gst_pad_new_from_template"gst_pad_new_from_template::((PtrPadTemplate)->((PtrCChar)->(IO(PtrPad))))foreignimportccallsafe"gst_pad_accept_caps"gst_pad_accept_caps::((PtrPad)->((PtrCaps)->(IOCInt)))foreignimportccallsafe"gst_pad_proxy_getcaps"gst_pad_proxy_getcaps::((PtrPad)->(IO(PtrCaps)))foreignimportccallsafe"gst_pad_fixate_caps"gst_pad_fixate_caps::((PtrPad)->((PtrCaps)->(IO())))foreignimportccallsafe"gst_pad_peer_accept_caps"gst_pad_peer_accept_caps::((PtrPad)->((PtrCaps)->(IOCInt)))foreignimportccallsafe"gst_pad_send_event"gst_pad_send_event::((PtrPad)->((PtrEvent)->(IOCInt)))foreignimportccallsafe"gst_mini_object_copy"gst_mini_object_copy::((PtrMiniObject)->(IO(PtrMiniObject)))foreignimportccallsafe"gst_pad_query"gst_pad_query::((PtrPad)->((PtrQuery)->(IOCInt)))foreignimportccallsafe"gst_pad_query_position"gst_pad_query_position::((PtrPad)->((PtrCInt)->((PtrCLLong)->(IOCInt))))foreignimportccallsafe"gst_pad_query_duration"gst_pad_query_duration::((PtrPad)->((PtrCInt)->((PtrCLLong)->(IOCInt))))foreignimportccallsafe"gst_pad_query_convert"gst_pad_query_convert::((PtrPad)->(CInt->(CLLong->((PtrCInt)->((PtrCLLong)->(IOCInt))))))foreignimportccallsafe"gst_pad_query_peer_position"gst_pad_query_peer_position::((PtrPad)->((PtrCInt)->((PtrCLLong)->(IOCInt))))foreignimportccallsafe"gst_pad_query_peer_duration"gst_pad_query_peer_duration::((PtrPad)->((PtrCInt)->((PtrCLLong)->(IOCInt))))foreignimportccallsafe"gst_pad_query_peer_convert"gst_pad_query_peer_convert::((PtrPad)->(CInt->(CLLong->((PtrCInt)->((PtrCLLong)->(IOCInt))))))foreignimportccallsafe"gst_pad_get_query_types"gst_pad_get_query_types::((PtrPad)->(IO(PtrCInt)))foreignimportccallsafe"gst_pad_template_get_type"gst_pad_template_get_type::CUInt