From: Duncan C. <dun...@wo...> - 2007-08-26 23:29:30
|
Sat Jul 21 14:42:52 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: change ClockTime/ClockTimeDiff to Word64/Int64 instead of c2hs types hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 42 +import Data.Ratio ( Ratio + , (%) + , numerator + , denominator ) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 59 - do success <- {# call clock_add_observation #} (toClock clock) slave master rSquaredPtr + do success <- {# call clock_add_observation #} (toClock clock) + (fromIntegral slave) + (fromIntegral master) + rSquaredPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 84 -clockSetResolution = - {# call clock_set_resolution #} . toClock +clockSetResolution clock resolution = + liftM fromIntegral $ + {# call clock_set_resolution #} (toClock clock) + (fromIntegral resolution) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 92 -clockGetResolution = - {# call clock_get_resolution #} . toClock +clockGetResolution clock = + liftM fromIntegral $ + {# call clock_get_resolution #} (toClock clock) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 99 -clockGetTime = - {# call clock_get_time #} . toClock +clockGetTime clock = + liftM fromIntegral $ + {# call clock_get_time #} (toClock clock) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 108 - {# call clock_new_single_shot_id #} (toClock clock) time >>= + {# call clock_new_single_shot_id #} (toClock clock) + (fromIntegral time) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 118 - {# call clock_new_periodic_id #} (toClock clock) startTime interval >>= + {# call clock_new_periodic_id #} (toClock clock) + (fromIntegral startTime) + (fromIntegral interval) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 126 -clockGetInternalTime = - {# call clock_get_internal_time #} . toClock +clockGetInternalTime clock = + liftM fromIntegral $ + {# call clock_get_internal_time #} (toClock clock) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 132 - -> IO (ClockTime, ClockTime, ClockTime, ClockTime) + -> IO (ClockTime, ClockTime, Ratio ClockTime) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 143 - liftM4 (\a b c d -> (a, b, c, d)) + liftM4 (\a b c d -> + (fromIntegral a, + fromIntegral b, + (fromIntegral c) % (fromIntegral d))) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 156 - -> ClockTime - -> ClockTime + -> Ratio ClockTime hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 158 -clockSetCalibration = - {# call clock_set_calibration #} . toClock +clockSetCalibration clock internal external rate = + {# call clock_set_calibration #} (toClock clock) + (fromIntegral internal) + (fromIntegral external) + (fromIntegral $ numerator rate) + (fromIntegral $ denominator rate) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 168 - withClockID clockID $ {# call clock_id_get_time #} . castPtr + liftM fromIntegral $ withClockID clockID $ + {# call clock_id_get_time #} . castPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 178 - return $ (toClockReturn result, jitter) + return $ (toClockReturn result, fromIntegral jitter) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs 79 - unsafePerformIO $ withMessage message {# get GstMessage->timestamp #} + fromIntegral $ unsafePerformIO $ withMessage message {# get GstMessage->timestamp #} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 75 - {# call pipeline_set_new_stream_time #} (toPipeline pipeline) time + {# call pipeline_set_new_stream_time #} (toPipeline pipeline) + (fromIntegral time) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 81 -pipelineGetLastStreamTime = - {# call pipeline_get_last_stream_time #} . toPipeline +pipelineGetLastStreamTime pipeline = + liftM fromIntegral $ + {# call pipeline_get_last_stream_time #} (toPipeline pipeline) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 104 - {# call pipeline_set_delay #} (toPipeline pipeline) delay + {# call pipeline_set_delay #} (toPipeline pipeline) + (fromIntegral delay) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 111 - {# call pipeline_get_delay #} (toPipeline pipeline) + liftM fromIntegral $ + {# call pipeline_get_delay #} (toPipeline pipeline) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Structure.chs 279 - marshalStructureSet {# call g_value_set_uint64 #} + marshalStructureSet $ \gValue clockTime -> + {# call g_value_set_uint64 #} gValue $ fromIntegral clockTime hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 649 -type ClockTime = {# type GstClockTime #} -type ClockTimeDiff = {# type GstClockTimeDiff #} +type ClockTime = Word64 +type ClockTimeDiff = Int64 |