You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Duncan C. <dun...@wo...> - 2007-10-30 09:25:57
|
Tue Oct 30 01:59:15 PDT 2007 Duncan Coutts <du...@ha...> * Remove duplicate item from EXTRA_DIST hunk ./Makefile.am 22 - gtk/Graphics/UI/Gtk/ModelView/Gtk2HsStore.h \ |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:59
|
Mon Oct 29 10:32:43 PDT 2007 hth...@zo... * Tutorial Port Event and Button Boxes (Chapter 6.2) Corrected a previous patch error in index.xhtml where .xhtml had been changed into .html. Corrected the chapter on font and color selection, which came after Alex Tarkovsky's patch, for un- necessary newlines after <pre> Corrected a few other missing or incorrect links in previous files addfile ./docs/tutorial/Tutorial_Port/Example_Code/GtkChap6-2.hs hunk ./docs/tutorial/Tutorial_Port/Example_Code/GtkChap6-2.hs 1 +import Graphics.UI.Gtk +import System.Random (randomRIO) + +main :: IO () +main= do + initGUI + window <- windowNew + set window [windowTitle := "Slot Machine", + containerBorderWidth := 10, + windowDefaultWidth := 350, [_$_] + windowDefaultHeight := 400] [_$_] + hb1 <- hBoxNew False 0 + containerAdd window hb1 + vb1 <- vBoxNew False 0 + boxPackStart hb1 vb1 PackGrow 0 + vbb <- vButtonBoxNew + boxPackStart hb1 vbb PackGrow 0 + resetb <- buttonNewWithLabel "Reset" + containerAdd vbb resetb + quitb <- buttonNewWithLabel "Quit" + containerAdd vbb quitb + playb <- buttonNewWithMnemonic "_Play" + containerAdd vbb playb + set vbb [buttonBoxLayoutStyle := ButtonboxStart, [_$_] + (buttonBoxChildSecondary playb) := True ] + + let picfiles = ["./jacunda.gif", "./pacu.gif", "./tucunaream.gif"] + evimls <- sequence (map (initEvent vb1) picfiles) + tips <- tooltipsNew + sequence_ $ map ((myTooltip tips) . fst) evimls + + onClicked playb (play evimls picfiles) + [_$_] + onClicked resetb $ sequence_ (zipWith reSet evimls picfiles) + + onClicked quitb (widgetDestroy window) + widgetShowAll window + onDestroy window mainQuit + mainGUI + +initEvent :: VBox -> FilePath -> IO (EventBox, Image) +initEvent vb picfile = do + eb <- eventBoxNew + boxPackStart vb eb PackGrow 0 + slot <- imageNewFromFile picfile + set eb[containerChild := slot, containerBorderWidth := 10 ] + widgetModifyBg eb StateNormal (Color 0 35000 0) + widgetModifyBg eb StateInsensitive (Color 50000 50000 50000) + onButtonPress eb [_$_] + (\x -> if (eventButton x) == LeftButton [_$_] + then do widgetSetSensitivity eb False [_$_] + return (eventSent x) + else return (eventSent x)) + return (eb, slot) + +reSet :: (EventBox, Image) -> FilePath -> IO () +reSet (eb, im) pf = do widgetSetSensitivity eb True [_$_] + imageSetFromFile im pf + [_$_] +play :: [(EventBox, Image)] -> [FilePath] -> IO () +play eilist fplist = [_$_] + do let n = length fplist + rands <- sequence $ replicate n (randomRIO (0::Int,(n-1))) + sequence_ (zipWith display eilist rands) where + display (eb, im) rn = do + state <- widgetGetState eb + if state == StateInsensitive [_$_] + then return () + else imageSetFromFile im (fplist !! rn) [_$_] + +myTooltip :: Tooltips -> EventBox -> IO () +myTooltip ttp eb = tooltipsSetTip ttp eb "Click Left Mouse Button to Freeze" "" addfile ./docs/tutorial/Tutorial_Port/Example_Code/jacunda.gif binary ./docs/tutorial/Tutorial_Port/Example_Code/jacunda.gif addfile ./docs/tutorial/Tutorial_Port/Example_Code/pacu.gif binary ./docs/tutorial/Tutorial_Port/Example_Code/pacu.gif addfile ./docs/tutorial/Tutorial_Port/Images/GtkChap6-2a.png binary ./docs/tutorial/Tutorial_Port/Images/GtkChap6-2a.png addfile ./docs/tutorial/Tutorial_Port/Images/GtkChap6-2b.png binary ./docs/tutorial/Tutorial_Port/Images/GtkChap6-2b.png hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 21 - <!-- a href="chap5-4.xhtml" -->Next [_$_] - <!--</a>--></span> + <a href="chap5-4.xhtml">Next [_$_] + </a></span> hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 24 - <h1>5.3 Font and Color Selection</h1> + <h2>5.3 Font and Color Selection</h2> hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 30 - <pre class="codebox"> -fontSelectionNew :: IO FontSelection + <pre class="codebox">fontSelectionNew :: IO FontSelection hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 41 - <pre class="codebox"> -onFontSet:: FontButtonClass self => self -> IO () -> IO (ConnectId self) + <pre class="codebox">onFontSet:: FontButtonClass self => self -> IO () -> IO (ConnectId self) hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 45 - <pre class="codebox"> -fontButtonGetFontName :: FontButtonClass self => self -> IO String + <pre class="codebox">fontButtonGetFontName :: FontButtonClass self => self -> IO String hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 60 - <pre class="codebox"> -fontDescriptionFromString :: String -> IO FontDescription + <pre class="codebox">fontDescriptionFromString :: String -> IO FontDescription hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 64 - <pre class="codebox"> -widgetModifyFont:: WidgetClass self => self -> Maybe FontDescription -> IO () + <pre class="codebox">widgetModifyFont:: WidgetClass self => self -> Maybe FontDescription -> IO () hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 68 - <pre class="codebox"> -colorSelectionNew :: IO Color Selection + <pre class="codebox">colorSelectionNew :: IO Color Selection hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 73 - <pre class="codebox"> -onColorSet :: ColorButtonClass self => self -> IO () -> IO (ConnectId self) + <pre class="codebox">onColorSet :: ColorButtonClass self => self -> IO () -> IO (ConnectId self) hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 76 - <pre class="codebox"> -colorButtonGetColor :: ColorButtonClass self => self -> IO Color + <pre class="codebox">colorButtonGetColor :: ColorButtonClass self => self -> IO Color hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 98 - <pre class="codebox"> -widgetModifyFg :: WidgetClass self => self -> StateType -> Color -> IO () + <pre class="codebox">widgetModifyFg :: WidgetClass self => self -> StateType -> Color -> IO () hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 103 - <pre class="codebox"> -widgetGetState :: WidgetClass w => w -> IO StateType + <pre class="codebox">widgetGetState :: WidgetClass w => w -> IO StateType hunk ./docs/tutorial/Tutorial_Port/chap5-3.xhtml 176 - <!--<a href="chap3-1.xhtml">-->Next [_$_] - <!--</a>--> - <br /></span> + <a href="chap3-1.xhtml">Next + </a> + <br />5.4 Notebook</span> hunk ./docs/tutorial/Tutorial_Port/chap5-4.xhtml 233 - <br />To be continued</span> + <br />6.1 Scrolled Windows</span> hunk ./docs/tutorial/Tutorial_Port/chap6-1.xhtml 251 - <br />6.2</span> + <br />6.2 Event Boxes and Button Boxes</span> addfile ./docs/tutorial/Tutorial_Port/chap6-2.xhtml hunk ./docs/tutorial/Tutorial_Port/chap6-2.xhtml 1 +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="Content-Type" + content="text/html; charset=utf-8" /> + <title>Gtk2Hs Tutorial: Event Boxes and Button Boxes</title> + <link href="default.css" type="text/css" rel="stylesheet" /> + </head> + <body> + <div id="header"> + <h1>Gtk2Hs Tutorial</h1> + <span class="nav-previous"> + <a href="chap6-1.xhtml">Previous</a> + </span> + <span class="nav-home"> + <a href="index.xhtml">Home</a> + </span> + <span class="nav-next"> + <a href="chap6-2.xhtml">Next</a> + </span> + </div> + <h2>6.2 Event Boxes and Button Boxes</h2> + <p>An event in Gtk2Hs is something that is sent to a widget, by + the main loop, usually as a result of an action performed by + the user. The widget then responds by emitting a signal, and + this is the 'signal' to the program to 'do something'. To the + Gtk2Hs application programmer, however, an event is just a + Haskell data type with named fields. Many of those are + described in the Graphics.UI.Gtk.Gdk.Events section in the API + documentation. Look, for example, at the widget signal:</p> + <pre class="codebox">onButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w) +</pre> + <p>This is not to be confused with the signal emitted when a [_$_] + <code>Button</code> type widget has been pressed; the button + here is a mouse button and the signal is emitted when a mouse + button has been pressed when the mouse is over that widget. The + handler is a function which takes an event, which has to have + the [_$_] + <code>Button</code> constructor, and has a IO boolean value. The + API lists the following fields for [_$_] + <code>Button</code> :</p> + <pre class="codebox">eventSent :: Bool +eventClick :: Click +eventTime :: TimeStamp +eventModifier :: [Modifier] +eventButton :: MouseButton +eventXRoot, eventYRoot :: Double +</pre> + <p>The first is used for the return. It occurs in all [_$_] + <code>Event</code> constructors like [_$_] + <code>Motion, Expose, Key, Crossing, Focus, Configure, Scroll, + WindowState and Proximity.</code> From [_$_] + <code>Events</code> you can extract all kinds of information + about what the user is doing. A simple example is this code + snippet:</p> + <pre class="codebox">onButtonPress eb [_$_] + (\x -> if (eventButton x) == LeftButton [_$_] + then do widgetSetSensitivity eb False [_$_] + return (eventSent x) + else return (eventSent x)) +</pre> + <p>Here parameter [_$_] + <code>eb</code> is the widget covered by the mouse, and the + anonymous function is of the type as described above. Something + is done (see the example below) if the left mouse button has + been pressed and then [_$_] + <code>eventSent</code> returns the appropriate boolean. If + another mouse button has been pressed, nothing happens, and + only the boolean is returned.</p> + <p>Now, some widgets don't have associated windows, so they + just draw on their parents. Because of this, they cannot + receive events and if they are incorrectly sized, they don't + clip so you can get messy overwriting (but we won't discuss + this further). An [_$_] + <code>EventBox</code> provides an X window for its child widget. + It is a subclass of [_$_] + <code>Bin</code> which also has its own window and which is a + subclass of [_$_] + <code>ContainerClass</code> .</p> + <p>To create a new EventBox widget, use:</p> + <pre class="codebox">eventBoxNew :: IO EventBox +</pre> + <p>To add a child we can just use the well known:</p> + <pre class="codebox">containerAdd :: (ContainerClass self, WidgetClass widget) => self -> widget -> IO () +</pre> + <p>The window may be visible or invisible, and the event box + may be above or below its child in the widget tree. This is + determined by:</p> + <pre class="codebox">eventBoxVisibleWindow :: Attr EventBox Bool -- default True +eventBoxAboveChild :: Attr EventBox Bool -- default False +</pre> + <p>If you just want to trap events, then set the window to be + invisible. If the [_$_] + <code>eventBox</code> is above its child, all events will go to + it first. If it is below, windows in child widgets of the child + will be reached first.</p> + <p>A Button Box is just a box which can be used to pack buttons + in a standard way. There are two kinds, horizontal and vertical + ones, and you construct them with:</p> + <pre class="codebox">hbuttonBoxNew :: IO HButtonBox +vButtonBoxNew :: IO VButtonBox +</pre> + <p>The functionality is in the [_$_] + <code>ButtonBoxClass.</code> </p> + <pre class="codebox">buttonBoxSetLayout :: ButtonBoxClass self => self -> ButtonBoxStyle -> IO () +</pre> + <p>The style is one of the following: [_$_] + <code>ButtonBoxDefaultStyle, ButtonBoxSpread, ButtonBoxEdge, + ButtonBoxStart, ButtonBoxEnd</code> . You don't pack buttons as + in ordinary horizontal and vertical boxes, but you use the [_$_] + <code>containerAdd</code> function instead.</p> + <p>The second feature of button boxes is that you can define + one or more of your buttons to be in a secondary group. These + will then be treated differently when the button box is + resized. For example, a help button can be kept visually apart + from the others. The function is:</p> + <pre class="codebox">buttonBoxSetChildSecondary :: (ButtonBoxClass self, WidgetClass child) +=> self -> child -> Bool -> IO () +</pre> + <p>This illustrates the use of event boxes and button + boxes:</p> + <p> + <img src="Images/GtkChap6-2a.png" alt="Slot Machine" + id="imgGtkChap6-2a" /> + </p> + <p>The buttons are packed into a vertical button box, with the + play button as a secondary child. This is also a mnemonic + button, with Alt-P as the accellerator key. The images are + placed into event boxes with visible windows, and their + background color is set to a shade of green with:</p> + <pre class="codebox">widgetModifyBg eb StateNormal (Color 0 35000 0)</pre> + <p>As mentioned in Chapter 5.3 the [_$_] + <code>StateType</code> can be [_$_] + <code>StateNormal, StateActive, StatePrelight, StateSelected or + StateInsensitive</code> .</p> + <p>Note that the images above are not all the same size. This + does not matter, but some care has to be taken to make the main + window large enough. Otherwise borders will disappear when the + pictures are switched.</p> + <p>When the user clicks the left mouse button when the mouse is + over an event box, it will be set to insensitive with:</p> + <pre class="codebox">widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO () +</pre> + <p>This changes the [_$_] + <code>StateType</code> to [_$_] + <code>StateInsensitive</code> and the widget will no longer + respond to any user events. Furthermore, its appearance changes. + In the example we've also set the background color to a shade + of grey.</p> + <p> + <img src="Images/GtkChap6-2b.png" + alt="Slot Machine Insensitive" id="imgGtkChap6-2b" /> + </p> + <p>We've used tooltips to tell the user the images can be + frozen. As mentioned in Chapter 4.4 they don't always work in + GHCi but they do in the compiled version. To flip the images + randomly, we've used function RandomRIO, as in the previous + chapter. You may wonder why a tuple of [_$_] + <code>EventBox</code> and [_$_] + <code>Image</code> has been used, instead of just getting the [_$_] + <code>Image</code> from the [_$_] + <code>containerChild</code> attribute of the event boxes. This + is because it is a write only attribute, it can be [_$_] + <code>set</code> but not retrieved with [_$_] + <code>get</code> .</p> + <p>Finally, if the images are not available in your source code + directory, or if you want to expand the slot machine with more + slots, there is an ample supply of Brazilian fish at + <a href="http://www.pesca.com.br/mundodapesca/peixe/index.htm"> + Peixes</a>. They have been classified into salt water (água + salgado) and fresh water (água doce) fish for your + convenience.</p> + <pre class="codebox"> +import Graphics.UI.Gtk +import System.Random (randomRIO) + +main :: IO () +main= do + initGUI + window <- windowNew + set window [windowTitle := "Slot Machine", + containerBorderWidth := 10, + windowDefaultWidth := 350, [_$_] + windowDefaultHeight := 400] [_$_] + hb1 <- hBoxNew False 0 + containerAdd window hb1 + vb1 <- vBoxNew False 0 + boxPackStart hb1 vb1 PackGrow 0 + vbb <- vButtonBoxNew + boxPackStart hb1 vbb PackGrow 0 + resetb <- buttonNewWithLabel "Reset" + containerAdd vbb resetb + quitb <- buttonNewWithLabel "Quit" + containerAdd vbb quitb + playb <- buttonNewWithMnemonic "_Play" + containerAdd vbb playb + set vbb [buttonBoxLayoutStyle := ButtonboxStart, [_$_] + (buttonBoxChildSecondary playb) := True ] + + let picfiles = ["./jacunda.gif", "./pacu.gif", "./tucunaream.gif"] + evimls <- sequence (map (initEvent vb1) picfiles) + tips <- tooltipsNew + sequence_ $ map ((myTooltip tips) . fst) evimls + + onClicked playb (play evimls picfiles) + + onClicked resetb $ sequence_ (zipWith reSet evimls picfiles) + + onClicked quitb (widgetDestroy window) + widgetShowAll window + onDestroy window mainQuit + mainGUI + +initEvent :: VBox -> FilePath -> IO (EventBox, Image) +initEvent vb picfile = do + eb <- eventBoxNew + boxPackStart vb eb PackGrow 0 + slot <- imageNewFromFile picfile + set eb[containerChild := slot, containerBorderWidth := 10 ] + widgetModifyBg eb StateNormal (Color 0 35000 0) + widgetModifyBg eb StateInsensitive (Color 50000 50000 50000) + onButtonPress eb [_$_] + (\x -> if (eventButton x) == LeftButton [_$_] + then do widgetSetSensitivity eb False [_$_] + return (eventSent x) + else return (eventSent x)) + return (eb, slot) + +reSet :: (EventBox, Image) -> FilePath -> IO () +reSet (eb, im) pf = do widgetSetSensitivity eb True [_$_] + imageSetFromFile im pf [_$_] + +play :: [(EventBox, Image)] -> [FilePath] -> IO () +play eilist fplist = [_$_] + do let n = length fplist + rands <- sequence $ replicate n (randomRIO (0::Int,(n-1))) + sequence_ (zipWith display eilist rands) where + display (eb, im) rn = do + state <- widgetGetState eb + if state == StateInsensitive [_$_] + then return () + else imageSetFromFile im (fplist !! rn) [_$_] + +myTooltip :: Tooltips -> EventBox -> IO () +myTooltip ttp eb = tooltipsSetTip ttp eb "Click Left Mouse Button to Freeze" "" +</pre> + <div id="footer"> + <span class="nav-previous"> + <a href="chap6-1.xhtml">Previous</a> + <br />6.1 Scrolled Windows</span> + <span class="nav-home"> + <a href="index.xhtml">Home</a> + </span> + <span class="nav-next"> + <a href="chap6-3.xhtml">Next</a> + <br />6.3</span> + </div> + </body> +</html> hunk ./docs/tutorial/Tutorial_Port/index.xhtml 94 + </li> + <li> + <a href="chap6-2.xhtml">6.2 Event Boxes and Button Boxes</a> |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:55
|
Sun Oct 21 12:26:10 PDT 2007 Peter Gavin <pg...@gm...> * Makefile.am: in uninstall, unregister from user pkg conf when USERPKGCONF is set hunk ./Makefile.am 2429 - $(GHCPKG) $(addprefix --package-conf=,$(PKGCONF)) \ + $(GHCPKG) $(addprefix --package-conf=,$(PKGCONF)) $(if $(USERPKGCONF),--user) \ |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:55
|
Thu Oct 25 08:34:04 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add M.S.G.Audio.AudioClock hunk ./Makefile.am 1905 - gstreamer/Media/Streaming/GStreamer/Net/Hierarchy.chs + gstreamer/Media/Streaming/GStreamer/Net/Hierarchy.chs \ + gstreamer/Media/Streaming/GStreamer/Audio/Hierarchy.chs hunk ./Makefile.am 1964 + gstreamer/Media/Streaming/GStreamer/Audio/AudioClock.chs \ hunk ./Makefile.am 2073 +gstreamer/Media/Streaming/GStreamer/Audio/Hierarchy.chs : \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template + $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-audio --lib=gstreamer --prefix=gst \ + --root=GObject \ + --modname=Media.Streaming.GStreamer.Audio.Hierarchy \ + --parentname=Media.Streaming.GStreamer.Core.Hierarchy) + hunk ./gstreamer/Media/Streaming/GStreamer/Audio/AudioClock.chs 29 -module Media.Streaming.GStreamer.Audio.AudioClock ( - ) where +module Media.Streaming.GStreamer.Audio.AudioClock + ( AudioClock + , [_$_] + ) where hunk ./gstreamer/Media/Streaming/GStreamer/Audio/AudioClock.chs 34 +import Control.Monad (liftM) +{#import Media.Streaming.GStreamer.Audio.Types#} +import Media.Streaming.GStreamer.Core +import System.Glib.FFI +import System.Glib.UTFString + +{# context lib = "gstreamer" prefix = "gst" #} + +type AudioClockGetTimeFunc = Clock -> IO ClockTime + +type CAudioClockGetTimeFunc = Ptr Clock + -> {# type gpointer #} + -> IO {# type GstClockTime #} +marshalAudioClockGetTimeFunc :: AudioClockGetTimeFunc + -> IO {# type GstAudioClockGetTimeFunc #} +marshalAudioClockGetTimeFunc func = + makeAudioClockGetTimeFunc cFunc + where cFunc :: CAudioClockGetTimeFunc + cFunc cClock _ = do + clock <- peekObject cClock + liftM fromIntegral $ func clock +foreign import ccall unsafe "wrapper" + makeAudioClockGetTimeFunc :: CAudioClockGetTimeFunc + -> IO {# type GstAudioClockGetTimeFunc #} + +audioClockNew :: String + -> AudioClockGetTimeFunc + -> IO Clock +audioClockNew name func = do + cFunc <- marshalAudioClockGetTimeFunc func + withUTFString name $ \cName -> + {# call audio_clock_new #} cName + cFunc + nullPtr >>= + takeObject hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs 29 -module Media.Streaming.GStreamer.Audio.Types ( +module Media.Streaming.GStreamer.Audio.Types + ( module Media.Streaming.GStreamer.Core.Types + , module Media.Streaming.GStreamer.Audio.Hierarchy + , module Media.Streaming.GStreamer.Audio.Constants hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs 34 - module Media.Streaming.GStreamer.Audio.Constants, - [_$_] - AudioFieldFlag(..), + , AudioFieldFlag(..) hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs 39 +{#import Media.Streaming.GStreamer.Audio.Hierarchy#} +{#import Media.Streaming.GStreamer.Core.Types#} hunk ./gstreamer/hierarchy.list 23 + GstAudioClock as AudioClock, gst_audio_clock_get_type if gstreamer-audio hunk ./gstreamer/hsgstreamer.h 43 +#include <gst/audio/gstaudioclock.h> |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:55
|
Sun Oct 28 14:47:36 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: change M/S/G/DataProtocol/Constants.chs to Constants.hsc in makefile hunk ./Makefile.am 1959 - gstreamer/Media/Streaming/GStreamer/DataProtocol/Constants.chs \ + gstreamer/Media/Streaming/GStreamer/DataProtocol/Constants.hsc \ |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:55
|
Sun Oct 21 14:02:13 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add a format argument to elementQueryDuration/Position this goes with the previous patch. also changes type of queryNewConvert to use Word64 rather than Int64. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 455 - do success <- {# call element_query_position #} (toElement element) formatPtr curPtr + do poke formatPtr $ fromIntegral $ fromEnum format + success <- {# call element_query_position #} (toElement element) formatPtr curPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 471 - do success <- {# call element_query_duration #} (toElement element) formatPtr durationPtr + do poke formatPtr $ fromIntegral $ fromEnum format + success <- {# call element_query_duration #} (toElement element) formatPtr durationPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Query.chs 109 - -> Int64 + -> Word64 |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:49
|
Sun Oct 21 14:01:38 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: change Int64 to Word64 in return types of elementQueryPosition/Duration hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 57 -type ClockTime = #{type GstClockTime} +type ClockTime = Word64 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 432 - -> IO (Maybe (Format, Int64)) + -> IO (Maybe (Format, Word64)) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 450 - -> IO (Maybe (Format, Int64)) -elementQueryPosition element = + -> Format + -> IO (Maybe (Format, Word64)) +elementQueryPosition element format = hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 465 - -> IO (Maybe (Format, Int64)) -elementQueryDuration element = + -> Format + -> IO (Maybe (Format, Word64)) +elementQueryDuration element format = |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:48
|
Sun Oct 21 13:58:43 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: improve vorbis-play demo hunk ./demo/gstreamer/VorbisPlay.hs 8 +import Text.Printf hunk ./demo/gstreamer/VorbisPlay.hs 68 + flip G.timeoutAdd 100 $ do + position <- Gst.elementQueryPosition pipeline Gst.FormatTime + duration <- Gst.elementQueryDuration pipeline Gst.FormatTime + case position of + Just (_, position') -> + case duration of + Just (_, duration') -> do + printf "%10d / %10d\r" (position' `div` Gst.second) (duration' `div` Gst.second) + Nothing -> do + putStr "no information\r" + Nothing -> do + putStr "no information\r" + hFlush stdout + return True + [_$_] |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:45
|
Sun Oct 21 12:28:36 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add vorbis-play demo adddir ./demo/gstreamer addfile ./demo/gstreamer/Makefile hunk ./demo/gstreamer/Makefile 1 + +PROGS = vorbis-play +SOURCES = VorbisPlay.hs + +all: $(PROGS) + +vorbis-play : VorbisPlay.hs + $(HC_RULE) + +HC_RULE = $(HC) --make $< -o $@ $(HCFLAGS) + +clean: + rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS) + +HC=ghc addfile ./demo/gstreamer/VorbisPlay.hs hunk ./demo/gstreamer/VorbisPlay.hs 1 +import System.Exit +import Data.Maybe +import qualified Media.Streaming.GStreamer as Gst +import qualified System.Glib as G +import qualified System.Glib.MainLoop as G +import qualified System.Glib.Properties as G +import qualified System.Glib.GError as G +import Control.Monad +import System.IO +import System + +mkElement action = + do element <- action + case element of + Just element' -> + return element' + Nothing -> [_$_] + do hPutStrLn stderr "could not create all GStreamer elements\n" + exitFailure + +main = + do args <- getArgs + when (length args /= 1) $ + do hPutStrLn stderr "Usage: vorbis-play <Ogg/Vorbis filename>\n" + exitFailure + [_$_] + Gst.init + [_$_] + mainLoop <- G.mainLoopNew Nothing True + [_$_] + pipeline <- Gst.pipelineNew "audio-player" + source <- mkElement $ Gst.elementFactoryMake "filesrc" "file-source" + parser <- mkElement $ Gst.elementFactoryMake "oggdemux" "ogg-parser" + decoder <- mkElement $ Gst.elementFactoryMake "vorbisdec" "vorbis-decoder" + conv <- mkElement $ Gst.elementFactoryMake "audioconvert" "convert" + sink <- mkElement $ Gst.elementFactoryMake "alsasink" "alsa-output" + [_$_] + let elements = [source, parser, decoder, conv, sink] + [_$_] + G.objectSetPropertyString "location" source (head args) + [_$_] + bus <- Gst.pipelineGetBus (Gst.castToPipeline pipeline) + Gst.busAddWatch bus G.priorityDefault $ \bus message -> + do case Gst.messageType message of + Gst.MessageEOS -> + do putStrLn "end of stream" + G.mainLoopQuit mainLoop + Gst.MessageError -> + let G.GError _ _ msg = fst $ fromJust $ Gst.messageParseError message + messageStr = "Error: " ++ msg + in do hPutStrLn stderr messageStr + G.mainLoopQuit mainLoop + _ -> return () + return True + [_$_] + mapM_ (Gst.binAdd $ Gst.castToBin pipeline) elements + [_$_] + Gst.elementLink source parser + Gst.elementLink decoder conv + Gst.elementLink conv sink + [_$_] + Gst.onElementPadAdded parser $ \pad -> + do sinkPad <- Gst.elementGetPad decoder "sink" + Gst.padLink pad $ fromJust sinkPad + return () + [_$_] + Gst.elementSetState pipeline Gst.StatePlaying + [_$_] + G.mainLoopRun mainLoop + [_$_] + Gst.elementSetState pipeline Gst.StateNull + [_$_] + return () |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:43
|
Sun Oct 21 12:28:14 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add mtl to packages dependencies hunk ./gstreamer/gstreamer.cabal.in 9 -build-depends: glib==@PACKAGE_VERSION@ +build-depends: glib==@PACKAGE_VERSION@, mtl hunk ./gstreamer/gstreamer.package.conf.in 16 -depends: glib-@PACKAGE_VERSION@ +depends: glib-@PACKAGE_VERSION@, mtl hunk ./gstreamer/gstreamer.pkg.in 11 - package_deps = ["glib"], + package_deps = ["glib","mtl"], |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:42
|
Sun Oct 21 12:27:26 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add MessageAsyncStart & MessageAsyncDone to MessageType enum hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 291 + | n == #{const GST_MESSAGE_ASYNC_START} = MessageAsyncStart + | n == #{const GST_MESSAGE_ASYNC_DONE} = MessageAsyncDone hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 313 + fromEnum MessageAsyncStart = #{const GST_MESSAGE_ASYNC_START} + fromEnum MessageAsyncDone = #{const GST_MESSAGE_ASYNC_DONE} |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:41
|
Sun Oct 21 12:25:23 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: include C objects in profile lib hunk ./Makefile.am 2126 -libHSgstreamer_p.a : $(libHSgstreamer_a_HSFILES:.hs=.p_o) \ - $(libHSgstreamer_a_LIBADD:.o=.p_o) +libHSgstreamer_p.a : \ + $(libHSgstreamer_a_HSFILES:.hs=.p_o) \ + $(libHSgstreamer_a_LIBADD:.o=.p_o) \ + $(libHSgstreamer_a_CFILES:.c=.o) |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:39
|
Sun Oct 21 11:06:36 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: export nsecond in M.S.G.Core.Constants hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 62 -second, msecond, usecond :: ClockTime +second, msecond, usecond, nsecond :: ClockTime |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:37
|
Sun Oct 21 11:03:23 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: make Adapter and Buffer build with ghc 6.8 the problems actually come from the changes in bytestring. not sure if I should specifically check for that instead. move ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp move ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp hunk ./Makefile.am 1926 - gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs \ + gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp \ hunk ./Makefile.am 1951 - gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs \ + gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp \ hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 52 +#if __GLASGOW_HASKELL__ < 608 hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 54 +#else +import qualified Data.ByteString.Unsafe as BS +import qualified Data.ByteString.Internal as BS +#endif hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 92 +#if __GLASGOW_HASKELL__ < 608 hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 94 +#else + else liftM Just $ BS.packCStringLen (castPtr ptr, fromIntegral size) +#endif hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 103 -adapterCopy adapter offset size = +adapterCopy adapter offset size = do hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs.pp 153 - BS.fromForeignPtr (castForeignPtr fPtr) $ - fromIntegral nBytes + BS.fromForeignPtr (castForeignPtr fPtr) +#if __GLASGOW_HASKELL__ >= 608 + 0 +#endif + (fromIntegral nBytes) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 142 +#if __GLASGOW_HASKELL__ < 608 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 144 +#else + BS.packCStringLen (castPtr ptr, fromIntegral size) +#endif hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 154 +#if __GLASGOW_HASKELL__ < 608 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 156 +#else + BS.packCStringLen (castPtr ptr, fromIntegral size) +#endif hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 182 +#if __GLASGOW_HASKELL__ < 608 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs.pp 184 +#else + BS.packCStringLen (castPtr ptr, fromIntegral size) +#endif |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:35
|
Sat Oct 20 12:50:00 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: hopefully fix takeObject & peekObject for real this time takeObject: to be used when a function returns an object that must be unreffed at GC. If the object has a floating reference, the float flag is removed. peekObject: to be used when an object must not be unreffed. A ref is added, and is removed at GC. The floating flag is not touched. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 235 - cObjectRef cObject - takeObject cObject + liftM (unsafeCastGObject . GObject . castForeignPtr) $ + do cObjectRef $ castPtr cObject + newForeignPtr (castPtr cObject) objectFinalizer hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 240 -foreign import ccall unsafe "_hs_gst_object_unfloat" +foreign import ccall unsafe "gst_object_ref" hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 246 - do cObjectUnfloat + do cObjectUnfloat $ castPtr cObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 248 +foreign import ccall unsafe "_hs_gst_object_unfloat" + cObjectUnfloat :: Ptr () + -> IO () |
From: Duncan C. <dun...@wo...> - 2007-10-30 00:35:35
|
Mon Oct 8 19:33:34 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: fix floating reference mess I figure, the safest and easiest thing to do is just remove the floating flag from any GstObject we see, without touching the refcount (except maybe to add one). hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 234 -peekObject cObject = - liftM (unsafeCastGObject . GObject . castForeignPtr) $ - do cObjectTakeOwnership $ castPtr cObject - newForeignPtr (castPtr cObject) objectFinalizer +peekObject cObject = do + cObjectRef cObject + takeObject cObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 239 -foreign import ccall unsafe "_hs_gst_object_take_ownership" - cObjectTakeOwnership :: Ptr () - -> IO () +foreign import ccall unsafe "_hs_gst_object_unfloat" + cObjectRef :: Ptr () + -> IO (Ptr ()) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 245 - newForeignPtr (castPtr cObject) objectFinalizer + do cObjectUnfloat + newForeignPtr (castPtr cObject) objectFinalizer hunk ./gstreamer/hsgstreamer.c 42 -void _hs_gst_object_take_ownership (gpointer obj) +void _hs_gst_object_unfloat (gpointer obj) hunk ./gstreamer/hsgstreamer.c 46 - if (GST_OBJECT_IS_FLOATING (obj)) { - GST_OBJECT_FLAG_UNSET (obj, GST_OBJECT_FLOATING); - } else { - gst_object_ref (obj); - } + GST_OBJECT_FLAG_UNSET (obj, GST_OBJECT_FLOATING); hunk ./gstreamer/hsgstreamer.h 50 -void _hs_gst_object_take_ownership (gpointer obj); +void _hs_gst_object_unfloat (gpointer obj); |
From: Duncan C. <dun...@wo...> - 2007-10-29 13:19:40
|
Mon Oct 29 06:21:12 PDT 2007 Duncan Coutts <du...@ha...> * Fix compiling with gtk+-2.6 hunk ./gtk/Graphics/UI/Gtk/ModelView/ComboBox.chs.pp 118 -#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/ComboBox.chs.pp 120 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/ComboBox.chs.pp 622 -#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/ComboBox.chs.pp 626 +-- * Available since Gtk+ version 2.10 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/ComboBox.chs.pp 632 +#endif |
From: Duncan C. <dun...@wo...> - 2007-10-29 13:19:40
|
Mon Oct 29 06:21:50 PDT 2007 Duncan Coutts <du...@ha...> * Fix mistake over #ifdev vs #if hunk ./gtk/Graphics/UI/Gtk.hs.pp 252 -#ifdef GTK_CHECK_VERSION(2,10,0) +#if GTK_CHECK_VERSION(2,10,0) |
From: Duncan C. <dun...@wo...> - 2007-10-29 12:34:58
|
Thu Sep 6 14:21:29 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: lots of new code adddir ./gstreamer/Media/Streaming/GStreamer/Audio adddir ./gstreamer/Media/Streaming/GStreamer/Controller adddir ./gstreamer/Media/Streaming/GStreamer/DataProtocol adddir ./gstreamer/Media/Streaming/GStreamer/Net hunk ./Makefile.am 1878 -libHSgstreamer_a_LIBS = $(GLIB_LIBS) $(GSTREAMER_LIBS) $(GCONF_LIBS) +libHSgstreamer_a_LIBS = $(GLIB_LIBS) $(GSTREAMER_LIBS) hunk ./Makefile.am 1881 -libHSgstreamer_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GSTREAMER_CFLAGS)) +libHSgstreamer_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GSTREAMER_CFLAGS)) -I. hunk ./Makefile.am 1885 -libHSgstreamer_a_LIBADD = \ +libHSgstreamer_a_LIBADD = \ hunk ./Makefile.am 1887 - gstreamer/Media/Streaming/GStreamer/Core/Index_stub.o \ + gstreamer/Media/Streaming/GStreamer/Core/Index_stub.o \ hunk ./Makefile.am 1891 +if !USE_GCLOSUE_SIGNALS_IMPL +libHSgstreamer_a_LIBADD += gstreamer/Media/Streaming/GStreamer/Core/Signals_stub.o +endif + hunk ./Makefile.am 1898 + gstreamer/Media/Streaming/GStreamer/Core/Signals.chs \ hunk ./Makefile.am 1904 - gstreamer/Media/Streaming/GStreamer/Core/Signals.chs + gstreamer/Media/Streaming/GStreamer/Controller/GObjectHierarchy.chs \ + gstreamer/Media/Streaming/GStreamer/Net/Hierarchy.chs hunk ./Makefile.am 1910 + gstreamer/Media/Streaming/GStreamer/Core/HierarchyBase.hs \ + gstreamer/Media/Streaming/GStreamer/Core/MiniHierarchyBase.chs \ hunk ./Makefile.am 1913 + gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc \ hunk ./Makefile.am 1916 + gstreamer/Media/Streaming/GStreamer/Core/MiniObject.chs \ hunk ./Makefile.am 1926 + gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs \ + gstreamer/Media/Streaming/GStreamer/Core/Event.chs \ + gstreamer/Media/Streaming/GStreamer/Core/Query.chs \ hunk ./Makefile.am 1945 + gstreamer/Media/Streaming/GStreamer/Base/Constants.hsc \ hunk ./Makefile.am 1952 + gstreamer/Media/Streaming/GStreamer/Base/CollectPads.chs \ hunk ./Makefile.am 1954 + gstreamer/Media/Streaming/GStreamer/Controller/Types.chs \ + gstreamer/Media/Streaming/GStreamer/Controller/Controller.chs \ + gstreamer/Media/Streaming/GStreamer/Net/Types.chs \ + gstreamer/Media/Streaming/GStreamer/Net/NetClientClock.chs \ + gstreamer/Media/Streaming/GStreamer/DataProtocol/Constants.chs \ + gstreamer/Media/Streaming/GStreamer/DataProtocol/DataProtocol.chs \ + gstreamer/Media/Streaming/GStreamer/Audio/Constants.hsc \ + gstreamer/Media/Streaming/GStreamer/Audio/Types.chs \ + gstreamer/Media/Streaming/GStreamer/Audio/Audio.chs \ hunk ./Makefile.am 1968 + gstreamer/Media/Streaming/GStreamer/Core/HierarchyBase.hs \ + gstreamer/Media/Streaming/GStreamer/Core/MiniHierarchyBase.hs \ hunk ./Makefile.am 1971 - gstreamer/Media/Streaming/GStreamer/Base/Types.hs \ - gnomevfs/System/Gnome/VFS/Marshal.hs + gstreamer/Media/Streaming/GStreamer/Base/Types.hs hunk ./Makefile.am 1977 - gstreamer/gobject-hierarchy.list - -gstreamer_Media_Streaming_GStreamer_Core_Types_hs_HCFLAGS = -fglasgow-exts -gstreamer_Media_Streaming_GStreamer_Core_Pad_hs_HCFLAGS = -fglasgow-exts -gstreamer_Media_Streaming_GStreamer_Core_Element_hs_HCFLAGS = -fglasgow-exts -gstreamer_Media_Streaming_GStreamer_Core_Iterator_hs_HCFLAGS = -fglasgow-exts -gstreamer_Media_Streaming_GStreamer_Core_Plugin_hs_HCFLAGS = -fglasgow-exts -gstreamer_Media_Streaming_GStreamer_Core_PluginFeature_hs_HCFLAGS = -fglasgow-exts + gstreamer/gobject-hierarchy.list \ + gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template hunk ./Makefile.am 1983 -gstreamer/Media/Streaming/GStreamer/Core/Hierarchy.chs : \ - $(srcdir)/gstreamer/hierarchy.list \ - $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ +gstreamer/Media/Streaming/GStreamer/Core/Hierarchy.chs : \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ hunk ./Makefile.am 1987 - $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ - $(srcdir)/gstreamer/hierarchy.list \ - $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ - $@ --tag=gstreamer-core --lib=gstreamer --prefix=gstreamer \ - --root=GObject \ + $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-core --lib=gstreamer --prefix=gst \ + --root=GObject \ hunk ./Makefile.am 2001 - $@ --tag=gstreamer-core --lib=gstreamer --prefix=gstreamer \ + $@ --tag=gstreamer-core --lib=gstreamer --prefix=gst \ hunk ./Makefile.am 2006 - $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/gstreamer/gobject-hierarchy.list \ hunk ./Makefile.am 2008 - $(srcdir)/gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template hunk ./Makefile.am 2010 - $(srcdir)/gstreamer/gobject-hierarchy.list \ - $(srcdir)/gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template \ - $@ --tag=gstreamer-core --lib=gstreamer --prefix=gstreamer \ - --root=GObject \ + $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-core --lib=gstreamer --prefix=gst \ + --root=GObject \ hunk ./Makefile.am 2016 -gstreamer/Media/Streaming/GStreamer/Base/Hierarchy.chs : \ - $(srcdir)/gstreamer/hierarchy.list \ - $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ +gstreamer/Media/Streaming/GStreamer/Base/Hierarchy.chs : \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ hunk ./Makefile.am 2020 - $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ - $(srcdir)/gstreamer/hierarchy.list \ - $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ - $@ --tag=gstreamer-base --lib=gstreamer --prefix=gstreamer \ - --root=GObject \ - --modname=Media.Streaming.GStreamer.Base.Hierarchy --parentname=Media.Streaming.GStreamer.Core.Types) + $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-base --lib=gstreamer --prefix=gst \ + --root=GObject \ + --modname=Media.Streaming.GStreamer.Base.Hierarchy \ + --parentname=Media.Streaming.GStreamer.Core.Hierarchy) hunk ./Makefile.am 2029 - $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template + $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-base --lib=gstreamer --prefix=gst \ + --root=GObject \ + --modname=Media.Streaming.GStreamer.Base.GObjectHierarchy) + +gstreamer/Media/Streaming/GStreamer/Controller/GObjectHierarchy.chs : \ + $(srcdir)/gstreamer/gobject-hierarchy.list \ hunk ./Makefile.am 2042 - $(srcdir)/gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template hunk ./Makefile.am 2044 - $(srcdir)/gstreamer/gobject-hierarchy.list \ - $(srcdir)/gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template \ - $@ --tag=gstreamer-base --lib=gstreamer --prefix=gstreamer \ - --root=GObject \ - --modname=Media.Streaming.GStreamer.Base.GObjectHierarchy --parentname=Media.Streaming.GStreamer.Core.Types) + $(srcdir)/gstreamer/gobject-hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-controller --lib=gstreamer --prefix=gst \ + --root=GObject \ + --modname=Media.Streaming.GStreamer.Controller.GObjectHierarchy) hunk ./Makefile.am 2050 -gstreamer/Media/Streaming/GStreamer/Core/Signals.chs : \ - $(srcdir)/tools/callbackGen/Signal.chs.template \ - $(srcdir)/gnomevfs/marshal.list \ +gstreamer/Media/Streaming/GStreamer/Net/Hierarchy.chs : \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template + $(strip $(srcdir)/tools/hierarchyGenGst/TypeGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/hierarchy.list \ + $(srcdir)/gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template \ + $@ --tag=gstreamer-net --lib=gstreamer --prefix=gst \ + --root=GObject \ + --modname=Media.Streaming.GStreamer.Net.Hierarchy \ + --parentname=Media.Streaming.GStreamer.Core.Hierarchy) + +gstreamer/Media/Streaming/GStreamer/Core/Signals.chs : \ + $(srcdir)/tools/callbackGen/Signal.chs.template \ + $(srcdir)/gstreamer/marshal.list \ hunk ./Makefile.am 2066 - $(strip $(srcdir)/tools/callbackGen/HookGenerator$(EXEEXT) \ - $(srcdir)/gstreamer/marshal.list \ - $(srcdir)/tools/callbackGen/Signal.chs.template $@ \ + $(strip $(srcdir)/tools/callbackGen/HookGenerator$(EXEEXT) \ + $(srcdir)/gstreamer/marshal.list \ + $(srcdir)/tools/callbackGen/Signal.chs.template $@ \ hunk ./Makefile.am 2082 - $(libHSgstreamer_a_HSPPFILES:.hs.pp=.hs) \ + $(libHSgstreamer_a_HSPPFILES:.hs.pp=.hs) \ hunk ./Makefile.am 2090 +libHSgstreamer_a_CFILES = $(filter %.c,$(libHSgstreamer_a_ALLSOURCES)) hunk ./Makefile.am 2097 +gstreamer_MOSTLYCLEANFILES += $(libHSgstreamer_a_CHSFILES:.chs=.h) hunk ./Makefile.am 2104 -$(libHSgstreamer_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSgstreamer_a_GENERATEDSOURCES) +$(libHSgstreamer_a_CHSFILES:.chs=.dep) : \ + $(libHSgstreamer_a_GENERATEDSOURCES) hunk ./Makefile.am 2473 - rm -f $(c2hs_CLEANFILES) - rm -f $(glib_CLEANFILES) - rm -f $(gtk_CLEANFILES) - rm -f $(glade_CLEANFILES) - rm -f $(gconf_CLEANFILES) - rm -f $(sourceview_CLEANFILES) - rm -f $(mozembed_CLEANFILES) - rm -f $(cairo_CLEANFILES) - rm -f $(svgcairo_CLEANFILES) - rm -f $(gtkglext_CLEANFILES) - rm -f $(soegtk_CLEANFILES) - rm -f $(doc_CLEANFILES) + rm -f $(c2hs_CLEANFILES) + rm -rf $(c2hs_CLEANFILES_SPLIT) + rm -f $(glib_CLEANFILES) + rm -rf $(glib_CLEANFILES_SPLIT) + rm -f $(gtk_CLEANFILES) + rm -rf $(gtk_CLEANFILES_SPLIT) + rm -f $(glade_CLEANFILES) + rm -rf $(glade_CLEANFILES_SPLIT) + rm -f $(gconf_CLEANFILES) + rm -rf $(gconf_CLEANFILES_SPLIT) + rm -f $(sourceview_CLEANFILES) + rm -rf $(sourceview_CLEANFILES_SPLIT) + rm -f $(mozembed_CLEANFILES) + rm -rf $(mozembed_CLEANFILES_SPLIT) + rm -f $(cairo_CLEANFILES) + rm -rf $(cairo_CLEANFILES_SPLIT) + rm -f $(svgcairo_CLEANFILES) + rm -rf $(svgcairo_CLEANFILES_SPLIT) + rm -f $(gtkglext_CLEANFILES) + rm -rf $(gtkglext_CLEANFILES_SPLIT) + rm -f $(soegtk_CLEANFILES) + rm -rf $(soegtk_CLEANFILES_SPLIT) + rm -f $(gnomevfs_CLEANFILES) + rm -rf $(gnomevfs_CLEANFILES_SPLIT) + rm -f $(gstreamer_CLEANFILES) + rm -rf $(gstreamer_CLEANFILES_SPLIT) + rm -f $(doc_CLEANFILES) hunk ./configure.ac 353 -GTKHS_PKG_CHECK(gstreamer, gstreamer, GSTREAMER, [gstreamer-0.10 >= 0.10], +GTKHS_PKG_CHECK(gstreamer, gstreamer, GSTREAMER, + [gstreamer-0.10 >= 0.10 \ + gstreamer-base-0.10 >= 0.10 \ + gstreamer-controller-0.10 >= 0.10 [_$_] + gstreamer-dataprotocol-0.10 >= 0.10 \ + gstreamer-net-0.10 >= 0.10 \ + gstreamer-plugins-base-0.10], hunk ./gstreamer/Media/Streaming/GStreamer.hs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer.hs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer.hs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) addfile ./gstreamer/Media/Streaming/GStreamer/Audio/Audio.chs hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Audio.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Audio.Audio ( + [_$_] + AudioFieldFlag(..), + [_$_] + ) where + +{#import Media.Streaming.GStreamer.Audio.Types#} addfile ./gstreamer/Media/Streaming/GStreamer/Audio/AudioClock.chs hunk ./gstreamer/Media/Streaming/GStreamer/Audio/AudioClock.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Audio.AudioClock ( + ) where + addfile ./gstreamer/Media/Streaming/GStreamer/Audio/Constants.hsc hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Constants.hsc 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Audio.Constants ( + [_$_] + audioDefRate, + [_$_] + ) where + +audioDefRate :: Double +audioDefRate = #{const GST_AUDIO_DEF_RATE} addfile ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Audio.Types ( + [_$_] + module Media.Streaming.GStreamer.Audio.Constants, + [_$_] + AudioFieldFlag(..), + [_$_] + ) where + +import Media.Streaming.GStreamer.Audio.Constants + +{# enum GstAudioFieldFlag as AudioFieldFlag {underscoreToCase} with prefix = "GST" #} hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 31 - module Media.Streaming.GStreamer.Base.BaseSrc + module Media.Streaming.GStreamer.Base.BaseSrc, + module Media.Streaming.GStreamer.Base.BaseSink, + module Media.Streaming.GStreamer.Base.BaseTransform, + module Media.Streaming.GStreamer.Base.PushSrc, + module Media.Streaming.GStreamer.Base.Adapter hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 40 +import Media.Streaming.GStreamer.Base.BaseSink +import Media.Streaming.GStreamer.Base.BaseTransform +import Media.Streaming.GStreamer.Base.PushSrc +import Media.Streaming.GStreamer.Base.Adapter + hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs 32 + AdapterClass, + toAdapter, + castToAdapter, + isAdapter, + adapterNew, + adapterClear, + adapterPush, + adapterPeek, + adapterCopy, + adapterCopyInto, + adapterFlush, + adapterAvailable, + adapterAvailableFast, + adapterTake, + adapterTakeBuffer hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs 51 +import qualified Data.ByteString as BS +import qualified Data.ByteString.Base as BS hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs 55 +import System.Glib.GObject hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs 62 +adapterNew :: IO Adapter +adapterNew = + constructNewGObject mkAdapter {# call adapter_new #} + +adapterClear :: AdapterClass adapterT + => adapterT + -> IO () +adapterClear = + {# call adapter_clear #} . toAdapter + +adapterPush :: (AdapterClass adapterT, BufferClass bufferT) + => adapterT + -> bufferT + -> IO () +adapterPush adapter buffer = + {# call adapter_push #} (toAdapter adapter) (toBuffer buffer) + +adapterPeek :: AdapterClass adapterT + => adapterT + -> Word + -> IO (Maybe BS.ByteString) +adapterPeek adapter size = + do ptr <- {# call adapter_peek #} (toAdapter adapter) (fromIntegral size) + if ptr == nullPtr + then return Nothing + else liftM Just $ BS.copyCStringLen (castPtr ptr, fromIntegral size) + +adapterCopy :: AdapterClass adapterT + => adapterT + -> Word + -> Word + -> IO BS.ByteString +adapterCopy adapter offset size = + BS.create (fromIntegral size) $ \dest -> + {# call adapter_copy #} (toAdapter adapter) + (castPtr dest) + (fromIntegral offset) + (fromIntegral size) + +adapterCopyInto :: AdapterClass adapterT + => adapterT + -> BS.ByteString + -> Word + -> IO () +adapterCopyInto adapter dest offset = + BS.useAsCStringLen dest $ \(destPtr, size) -> + {# call adapter_copy #} (toAdapter adapter) + (castPtr destPtr) + (fromIntegral offset) + (fromIntegral size) + +adapterFlush :: AdapterClass adapterT + => adapterT + -> Word + -> IO () +adapterFlush adapter flush = + {# call adapter_flush #} (toAdapter adapter) $ fromIntegral flush + +adapterAvailable :: AdapterClass adapterT + => adapterT + -> IO Word +adapterAvailable adapter = + liftM fromIntegral $ + {# call adapter_available #} $ toAdapter adapter + +adapterAvailableFast :: AdapterClass adapterT + => adapterT + -> IO Word +adapterAvailableFast adapter = + liftM fromIntegral $ + {# call adapter_available_fast #} $ toAdapter adapter + +adapterTake :: AdapterClass adapterT + => adapterT + -> Word + -> IO (Maybe BS.ByteString) +adapterTake adapter nBytes = + do ptr <- {# call adapter_take #} (toAdapter adapter) + (fromIntegral nBytes) + if ptr == nullPtr + then do fPtr <- newForeignPtr (castPtr ptr) gFreePtr + return $ Just $ + BS.fromForeignPtr (castForeignPtr fPtr) $ + fromIntegral nBytes + else return Nothing +foreign import ccall unsafe "&g_free" + gFreePtr :: FunPtr (Ptr () -> IO ()) + +adapterTakeBuffer :: AdapterClass adapterT + => adapterT + -> Word + -> IO (Maybe Buffer) +adapterTakeBuffer adapter nBytes = + {# call adapter_take_buffer #} (toAdapter adapter) (fromIntegral nBytes) >>= + maybePeek takeMiniObject + hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSink.chs 145 - withBaseSink (toBaseSink baseSink) cBaseSinkGetPad >>= peekPad + withObject (toBaseSink baseSink) cBaseSinkGetPad >>= peekObject hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 35 + baseSrcGetFlags, + baseSrcSetFlags, + baseSrcUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 49 +import Media.Streaming.GStreamer.Base.Constants hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 56 +baseSrcGetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> IO [BaseSrcFlags] +baseSrcGetFlags = mkObjectGetFlags + +baseSrcSetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> [BaseSrcFlags] + -> IO () +baseSrcSetFlags = mkObjectSetFlags + +baseSrcUnsetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> [BaseSrcFlags] + -> IO () +baseSrcUnsetFlags = mkObjectUnsetFlags + hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 90 - withBaseSrc (toBaseSrc baseSrc) cBaseSrcGetPad >>= peekPad + withObject (toBaseSrc baseSrc) cBaseSrcGetPad >>= peekObject hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseTransform.chs 105 - withBaseTransform (toBaseTransform baseTransform) cBaseTransformGetSinkPad >>= - peekPad + withObject (toBaseTransform baseTransform) cBaseTransformGetSinkPad >>= + peekObject hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseTransform.chs 115 - withBaseTransform (toBaseTransform baseTransform) cBaseTransformGetSrcPad >>= - peekPad + withObject (toBaseTransform baseTransform) cBaseTransformGetSrcPad >>= + peekObject addfile ./gstreamer/Media/Streaming/GStreamer/Base/CollectPads.chs hunk ./gstreamer/Media/Streaming/GStreamer/Base/CollectPads.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Base.CollectPads ( + [_$_] + CollectData, + CollectPads, + [_$_] + ) where + +{#import Media.Streaming.GStreamer.Base.Types#} addfile ./gstreamer/Media/Streaming/GStreamer/Base/Constants.hsc hunk ./gstreamer/Media/Streaming/GStreamer/Base/Constants.hsc 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Base.Constants ( + [_$_] + BaseSrcFlags(..), + [_$_] + ) where + +import System.Glib.Flags + +data BaseSrcFlags = BaseSrcStarted + deriving (Eq, Bounded) +instance Enum BaseSrcFlags where + toEnum n | n == #{const GST_BASE_SRC_STARTED} = BaseSrcStarted + fromEnum BaseSrcStarted = #{const GST_BASE_SRC_STARTED} +instance Flags BaseSrcFlags hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 25 --- [_$_] + +-- #hide + hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 31 --- [_$_] --- #hide hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 35 + module Media.Streaming.GStreamer.Base.GObjectHierarchy, hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 37 - BaseSrcFlags, - baseSrcFlagLast, - baseSrcGetFlags, - baseSrcSetFlags, - baseSrcUnsetFlags, - [_$_] - Adapter, + CollectData, hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 44 +{#import Media.Streaming.GStreamer.Base.GObjectHierarchy#} hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 51 -data BaseSrcFlags = BaseSrcStarted - deriving (Eq, Bounded) -instance Enum BaseSrcFlags where - toEnum n | n == (shiftL elementFlagLast 0) = BaseSrcStarted - fromEnum BaseSrcStarted = (shiftL elementFlagLast 0) -instance Flags BaseSrcFlags -baseSrcFlagLast :: Int -baseSrcFlagLast = shiftL elementFlagLast 2 - -baseSrcGetFlags :: BaseSrcClass baseSrcT - => baseSrcT - -> IO [BaseSrcFlags] -baseSrcGetFlags = mkObjectGetFlags - -baseSrcSetFlags :: BaseSrcClass baseSrcT - => baseSrcT - -> [BaseSrcFlags] - -> IO () -baseSrcSetFlags = mkObjectSetFlags - -baseSrcUnsetFlags :: BaseSrcClass baseSrcT - => baseSrcT - -> [BaseSrcFlags] - -> IO () -baseSrcUnsetFlags = mkObjectUnsetFlags +type CollectPadsFunction = CollectPads + -> IO FlowReturn +{# pointer *GstCollectData as CollectData newtype #} hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 57 -{# pointer *GstAdapter as Adapter foreign newtype #} +{# enum GstInterpolateMode as InterpolateMode {underscoreToCase} with prefix = "GST" deriving (Eq, Show) #} addfile ./gstreamer/Media/Streaming/GStreamer/Controller/Controller.chs hunk ./gstreamer/Media/Streaming/GStreamer/Controller/Controller.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Controller.Controller ( + [_$_] + Controller, + ControllerClass, + [_$_] + ) where + +import Control.Monad (liftM) +{#import Media.Streaming.GStreamer.Controller.Types#} +{#import System.Glib.GList#} +{#import System.Glib.GObject#} +import System.Glib.FFI +import System.Glib.UTFString + +{# context lib = "gstreamer" prefix = "gst" #} + +controllerInit :: IO Bool +controllerInit = + liftM toBool $ {# call controller_init #} nullPtr nullPtr + +controllerNew :: GObjectClass gObjectT + => gObjectT + -> [String] + -> IO Controller +controllerNew object properties = + withMany withUTFString properties $ \cProperties -> + do cPropertiesGList <- toGList cProperties + cController <- {# call controller_new_list #} (toGObject object) cPropertiesGList + {# call g_list_free #} cPropertiesGList + constructNewGObject Controller $ return cController + +controllerRemoveProperties :: ControllerClass controllerT + => controllerT + -> [String] + -> IO Bool +controllerRemoveProperties controller properties = + withMany withUTFString properties $ \cProperties -> + do cPropertiesGList <- toGList cProperties + success <- {# call controller_remove_properties_list #} (toController controller) cPropertiesGList + {# call g_list_free #} cPropertiesGList + return $ toBool success addfile ./gstreamer/Media/Streaming/GStreamer/Controller/Types.chs hunk ./gstreamer/Media/Streaming/GStreamer/Controller/Types.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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. + +-- #hide + +-- | Maintainer : gtk2hs-devel\@lists.sourceforge.net +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Controller.Types ( + [_$_] + module Media.Streaming.GStreamer.Core.Types, + module Media.Streaming.GStreamer.Controller.GObjectHierarchy, + [_$_] + ) where + +{#import Media.Streaming.GStreamer.Core.Types#} +{#import Media.Streaming.GStreamer.Controller.GObjectHierarchy#} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 88 - withUTFString name ({# call bin_get_by_name #} (toBin bin)) >>= maybePeek takeElement + withUTFString name ({# call bin_get_by_name #} (toBin bin)) >>= maybePeek takeObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 96 - maybePeek takeElement + maybePeek takeObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 104 - maybePeek takeElement + maybePeek takeObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 155 - maybePeek takePad + maybePeek takeObject addfile ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs hunk ./gstreamer/Media/Streaming/GStreamer/Core/Buffer.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Core.Buffer ( + [_$_] + Buffer, + BufferClass, + BufferFlags(..), + toBuffer, + castToBuffer, + isBuffer, + bufferOffsetNone, + bufferGetFlags, + bufferGetFlagsM, + bufferSetFlagsM, + bufferUnsetFlagsM, + bufferGetSize, + bufferGetSizeM, + bufferGetData, + bufferGetDataM, + bufferSetDataM, + bufferWithDataM, + bufferGetTimestamp, + bufferGetTimestampM, + bufferSetTimestampM, + bufferGetDuration, + bufferGetDurationM, + bufferSetDurationM, + bufferGetCaps, + bufferGetCapsM, + bufferSetCapsM, + bufferGetOffset, + bufferGetOffsetM, + bufferSetOffsetM, + bufferGetOffsetEnd, + bufferGetOffsetEndM, + bufferSetOffsetEndM, + bufferDurationIsValid, + bufferDurationIsValidM, + bufferTimestampIsValid, + bufferTimestampIsValidM, + bufferOffsetIsValid, + bufferOffsetIsValidM, + bufferOffsetEndIsValid, + bufferOffsetEndIsValidM, + bufferIsDiscont, + bufferIsDiscontM, + [_$_] + bufferCreateEmpty, + bufferCreate, + bufferCreateSub, + [_$_] + bufferIsSpanFast, + bufferSpan, + bufferStampM, + bufferMerge + [_$_] + ) where + +import Control.Monad ( liftM + , when ) +import Control.Monad.Trans +import qualified Data.ByteString as BS +{#import Media.Streaming.GStreamer.Core.Types#} +import System.Glib.FFI + +{# context lib = "gstreamer" prefix = "gst" #} + +bufferOffsetNone :: Word64 +bufferOffsetNone = maxBound -- should be ((guint64) -1) + +bufferGetFlags :: BufferClass bufferT + => bufferT + -> [BufferFlags] +bufferGetFlags = mkMiniObjectGetFlags + +bufferGetFlagsM :: BufferClass bufferT + => MiniObjectM bufferT [BufferFlags] +bufferGetFlagsM = mkMiniObjectGetFlagsM + +bufferSetFlagsM :: BufferClass bufferT + => [BufferFlags] + -> MiniObjectM bufferT () [_$_] +bufferSetFlagsM = mkMiniObjectSetFlagsM + +bufferUnsetFlagsM :: BufferClass bufferT + => [BufferFlags] + -> MiniObjectM bufferT () +bufferUnsetFlagsM = mkMiniObjectUnsetFlagsM + +bufferGetSize :: BufferClass bufferT + => bufferT + -> Word +bufferGetSize buffer = + fromIntegral $ unsafePerformIO $ + withMiniObject buffer {# get GstBuffer->size #} + +marshalBufferM :: BufferClass bufferT + => (Ptr Buffer -> IO a) + -> MiniObjectM bufferT a +marshalBufferM action = + MiniObjectM $ flip (withMiniObject . toBuffer) $ action + +bufferGetSizeM :: BufferClass bufferT + => MiniObjectM bufferT Word +bufferGetSizeM = + liftM fromIntegral $ + marshalBufferM {# get GstBuffer->size #} + +bufferGetData :: BufferClass bufferT + => bufferT + -> BS.ByteString +bufferGetData buffer = + unsafePerformIO $ withMiniObject buffer $ \bufferPtr -> + do ptr <- {# get GstBuffer->data #} bufferPtr + size <- {# get GstBuffer->size #} bufferPtr + BS.copyCStringLen (castPtr ptr, fromIntegral size) + +bufferGetDataM :: BufferClass bufferT + => MiniObjectM bufferT BS.ByteString +bufferGetDataM = + marshalBufferM $ \bufferPtr -> + do ptr <- {# get GstBuffer->data #} bufferPtr + size <- {# get GstBuffer->size #} bufferPtr + BS.copyCStringLen (castPtr ptr, fromIntegral size) + +bufferSetDataM :: BufferClass bufferT + => BS.ByteString + -> MiniObjectM bufferT () +bufferSetDataM bs = + marshalBufferM $ \bufferPtr -> + BS.useAsCStringLen bs $ \(origData, size) -> + do mallocData <- {# get GstBuffer->malloc_data #} bufferPtr + when (mallocData /= nullPtr) $ + {# call g_free #} $ castPtr mallocData + newData <- liftM castPtr $ {# call g_malloc #} $ fromIntegral size + copyBytes (castPtr newData) origData size + {# set GstBuffer->data #} bufferPtr newData + {# set GstBuffer->malloc_data #} bufferPtr newData + {# set GstBuffer->size #} bufferPtr $ fromIntegral size + +bufferWithDataM :: BufferClass bufferT + => (BS.ByteString -> MiniObjectM bufferT a) + -> MiniObjectM bufferT a +bufferWithDataM action = + do bs <- marshalBufferM $ \bufferPtr -> + do ptr <- {# get GstBuffer->data #} bufferPtr + size <- {# get GstBuffer->size #} bufferPtr + return $ BS.packCStringLen (castPtr ptr, fromIntegral size) + result <- action bs + MiniObjectM $ \buffer -> + let (Buffer bufferFPtr) = toBuffer buffer + in touchForeignPtr bufferFPtr + return result + +bufferGetTimestamp :: BufferClass bufferT + => bufferT + -> ClockTime +bufferGetTimestamp buffer = + fromIntegral $ unsafePerformIO $ + withMiniObject buffer {# get GstBuffer->timestamp #} + +bufferGetTimestampM :: BufferClass bufferT + => MiniObjectM bufferT ClockTime +bufferGetTimestampM = + liftM fromIntegral $ + marshalBufferM {# get GstBuffer->timestamp #} + +bufferSetTimestampM :: BufferClass bufferT + => ClockTime + -> MiniObjectM bufferT () +bufferSetTimestampM timestamp = + marshalBufferM $ flip {# set GstBuffer->timestamp #} $ fromIntegral timestamp + +bufferGetDuration :: BufferClass bufferT + => bufferT + -> ClockTime +bufferGetDuration buffer = + fromIntegral $ unsafePerformIO $ + withMiniObject buffer {# get GstBuffer->duration #} + +bufferGetDurationM :: BufferClass bufferT + => MiniObjectM bufferT ClockTime +bufferGetDurationM = + liftM fromIntegral $ + marshalBufferM {# get GstBuffer->duration #} + +bufferSetDurationM :: BufferClass bufferT + => ClockTime + -> MiniObjectM bufferT () +bufferSetDurationM duration = + marshalBufferM $ + flip {# set GstBuffer->duration #} $ fromIntegral duration + +bufferGetCaps :: BufferClass bufferT + => bufferT + -> Maybe Caps +bufferGetCaps buffer = + unsafePerformIO $ + {# call buffer_get_caps #} (toBuffer buffer) >>= + maybePeek takeCaps + +bufferGetCapsM :: BufferClass bufferT + => MiniObjectM bufferT (Maybe Caps) +bufferGetCapsM = + MiniObjectM $ \buffer -> + {# call buffer_get_caps #} (toBuffer buffer) >>= + maybePeek takeCaps + +bufferSetCapsM :: BufferClass bufferT + => Caps + -> MiniObjectM bufferT () +bufferSetCapsM caps = + MiniObjectM $ \buffer -> + {# call buffer_set_caps #} (toBuffer buffer) caps + +bufferGetOffset :: BufferClass bufferT + => bufferT + -> Word64 +bufferGetOffset buffer = + fromIntegral $ unsafePerformIO $ + withMiniObject buffer {# get GstBuffer->offset #} + +bufferGetOffsetM :: BufferClass bufferT + => MiniObjectM bufferT Word64 +bufferGetOffsetM = + liftM fromIntegral $ + marshalBufferM {# get GstBuffer->offset #} + +bufferSetOffsetM :: BufferClass bufferT + => Word64 + -> MiniObjectM bufferT () +bufferSetOffsetM offset = + marshalBufferM $ + flip {# set GstBuffer->offset #} $ fromIntegral offset + +bufferGetOffsetEnd :: BufferClass bufferT + => bufferT + -> Word64 +bufferGetOffsetEnd buffer = + fromIntegral $ unsafePerformIO $ + withMiniObject buffer {# get GstBuffer->offset_end #} + +bufferGetOffsetEndM :: BufferClass bufferT + => MiniObjectM bufferT Word64 +bufferGetOffsetEndM = + liftM fromIntegral $ + marshalBufferM {# get GstBuffer->offset_end #} + +bufferSetOffsetEndM :: BufferClass bufferT + => Word64 + -> MiniObjectM bufferT () +bufferSetOffsetEndM offsetEnd = + marshalBufferM $ + flip {# set GstBuffer->offset_end #} $ fromIntegral offsetEnd + +bufferDurationIsValid :: BufferClass bufferT + => bufferT + -> Bool +bufferDurationIsValid = + (/= clockTimeNone) . bufferGetOffset + +bufferDurationIsValidM :: BufferClass bufferT + => MiniObjectM bufferT Bool +bufferDurationIsValidM = + liftM (/= clockTimeNone) $ bufferGetDurationM + +bufferTimestampIsValid :: BufferClass bufferT + => bufferT + -> Bool +bufferTimestampIsValid = + (/= clockTimeNone) . bufferGetTimestamp + +bufferTimestampIsValidM :: BufferClass bufferT + => MiniObjectM bufferT Bool +bufferTimestampIsValidM = + liftM (/= clockTimeNone) $ bufferGetTimestampM + +bufferOffsetIsValid :: BufferClass bufferT + => bufferT + -> Bool +bufferOffsetIsValid = + (/= bufferOffsetNone) . bufferGetOffset + +bufferOffsetIsValidM :: BufferClass bufferT + => MiniObjectM bufferT Bool +bufferOffsetIsValidM = + liftM (/= bufferOffsetNone) $ bufferGetOffsetM + +bufferOffsetEndIsValid :: BufferClass bufferT + => bufferT + -> Bool +bufferOffsetEndIsValid = + (/= bufferOffsetNone) . bufferGetOffsetEnd + +bufferOffsetEndIsValidM :: BufferClass bufferT + => MiniObjectM bufferT Bool +bufferOffsetEndIsValidM = + liftM (/= bufferOffsetNone) $ bufferGetOffsetEndM + +bufferIsDiscont :: BufferClass bufferT + => bufferT + -> Bool +bufferIsDiscont = + (elem BufferDiscont) . bufferGetFlags + +bufferIsDiscontM :: BufferClass bufferT + => MiniObjectM bufferT Bool +bufferIsDiscontM = + liftM (elem BufferDiscont) $ bufferGetFlagsM + +bufferCreateEmpty :: MiniObjectM Buffer a + -> IO (Buffer, a) +bufferCreateEmpty = + marshalMiniObjectModify {# call buffer_new #} + +bufferCreate :: Word + -> MiniObjectM Buffer a + -> IO (Buffer, a) +bufferCreate size = + marshalMiniObjectModify $ + {# call buffer_new_and_alloc #} $ fromIntegral size + +bufferCreateSub :: BufferClass bufferT + => bufferT + -> Word + -> Word + -> MiniObjectM Buffer a + -> IO (Buffer, a) +bufferCreateSub parent offset size = + marshalMiniObjectModify $ + {# call buffer_create_sub #} (toBuffer parent) + (fromIntegral offset) + (fromIntegral size) + +bufferIsSpanFast :: (BufferClass bufferT1, BufferClass bufferT2) + => bufferT1 + -> bufferT2 + -> Bool +bufferIsSpanFast buffer1 buffer2 = + toBool $ unsafePerformIO $ + {# call buffer_is_span_fast #} (toBuffer buffer1) + (toBuffer buffer2) + +bufferSpan :: (BufferClass bufferT1, BufferClass bufferT2) + => bufferT1 + -> Word32 + -> bufferT2 + -> Word32 + -> Maybe Buffer +bufferSpan buffer1 offset buffer2 len = + unsafePerformIO $ + {# call buffer_span #} (toBuffer buffer1) + (fromIntegral offset) + (toBuffer buffer2) + (fromIntegral len) >>= + maybePeek takeMiniObject + +bufferStampM :: (BufferClass srcT, BufferClass destT) + => srcT + -> MiniObjectM destT () +bufferStampM src = + MiniObjectM $ \dest -> + {# call buffer_stamp #} (toBuffer dest) + (toBuffer src) + +bufferMerge :: (BufferClass bufferT1, BufferClass bufferT2) + => bufferT1 + -> bufferT2 + -> Buffer +bufferMerge buffer1 buffer2 = + unsafePerformIO $ + {# call buffer_merge #} (toBuffer buffer1) + (toBuffer buffer2) >>= + takeMiniObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 64 +busGetFlags :: BusClass busT + => busT + -> IO [BusFlags] +busGetFlags = mkObjectGetFlags + +busSetFlags :: BusClass busT + => busT + -> [BusFlags] + -> IO () +busSetFlags = mkObjectSetFlags + +busUnsetFlags :: BusClass busT + => busT + -> [BusFlags] + -> IO () +busUnsetFlags = mkObjectUnsetFlags + hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 83 - {# call bus_new #} >>= takeBus + {# call bus_new #} >>= takeObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 100 - {# call bus_peek #} bus >>= maybePeek takeMessage + {# call bus_peek #} bus >>= maybePeek takeMiniObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 105 - {# call bus_pop #} bus >>= maybePeek takeMessage + {# call bus_pop #} bus >>= maybePeek takeMiniObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 112 - maybePeek takeMessage + maybePeek takeMiniObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 138 - do bus <- peekBus busPtr - message <- peekMessage messagePtr + do bus <- peekObject busPtr + message <- peekMiniObject messagePtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 179 - takeMessage + takeMiniObject hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 186 - connect_BOXED__NONE "message" peekMessage False + connect_BOXED__NONE "message" peekMiniObject False hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 188 - connect_BOXED__NONE "message" peekMessage True + connect_BOXED__NONE "message" peekMiniObject True hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 35 + [_$_] + ClockTime, + clockTimeNone, + clockTimeIsValid, + second, + msecond, + usecond, + nsecond, + [_$_] + ClockTimeDiff, + ClockReturn(..), + ClockID, + [_$_] + ClockFlags(..), + clockGetFlags, + clockSetFlags, + clockUnsetFlags, + [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 87 +clockGetFlags :: ClockClass clockT + => clockT + -> IO [ClockFlags] +clockGetFlags = mkObjectGetFlags + +clockSetFlags :: ClockClass clockT + => clockT + -> [ClockFlags] + -> IO () +clockSetFlags = mkObjectSetFlags + +clockUnsetFlags :: ClockClass clockT + => clockT + -> [ClockFlags] + -> IO () +clockUnsetFlags = mkObjectUnsetFlags + +clockTimeIsValid :: ClockTime + -> Bool +clockTimeIsValid = (/= clockTimeNone) + hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 134 - {# call clock_get_master #} (toClock clock) >>= maybePeek takeClock + {# call clock_get_master #} (toClock clock) >>= maybePeek takeObject addfile ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Core.Constants ( + [_$_] + ClockTime, + [_$_] + clockTimeNone, + second, + msecond, + usecond, + nsecond, + [_$_] + ObjectFlags(..), + PadFlags(..), + ElementFlags(..), + StateChange(..), + BusFlags(..), + ClockFlags(..), + IndexFlags(..), + MiniObjectFlags(..), + BufferFlags(..), + EventType(..), + MessageType(..), + CapsFlags(..), + [_$_] + ) where + +import Data.Word +import System.Glib.Flags + +type ClockTime = #{type GstClockTime} + +clockTimeNone :: ClockTime +clockTimeNone = #{const GST_CLOCK_TIME_NONE} + +second, msecond, usecond :: ClockTime +second = #{const GST_SECOND} +msecond = #{const GST_MSECOND} +usecond = #{const GST_USECOND} +nsecond = #{const GST_NSECOND} + +data ObjectFlags = ObjectDisposing + deriving (Bounded, Show) +instance Enum ObjectFlags where + toEnum n | n == #{const GST_OBJECT_DISPOSING} = ObjectDisposing + fromEnum ObjectDisposing = #{const GST_OBJECT_DISPOSING} +instance Flags ObjectFlags + +data PadFlags = PadBlocked + | PadFlushing + | PadInGetCaps + | PadInSetCaps + | PadBlocking + deriving (Eq, Bounded, Show) +instance Enum PadFlags where + toEnum n | n == #{const GST_PAD_BLOC... [truncated message content] |
From: Duncan C. <dun...@wo...> - 2007-10-29 12:34:51
|
Sun Aug 5 07:06:33 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: add new modules BaseSink, BaseTransform, PushSrc, Adapter; redid comment headers in source files hunk ./Makefile.am 1934 + gstreamer/Media/Streaming/GStreamer/Base/BaseSink.chs \ + gstreamer/Media/Streaming/GStreamer/Base/BaseTransform.chs \ + gstreamer/Media/Streaming/GStreamer/Base/PushSrc.chs \ + gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs \ hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Base.hs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) addfile ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs hunk ./gstreamer/Media/Streaming/GStreamer/Base/Adapter.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Base.Adapter ( + [_$_] + Adapter, + [_$_] + ) where + +import Control.Monad (liftM) +{#import Media.Streaming.GStreamer.Base.Types#} +import System.Glib.FFI +import System.Glib.Flags +import System.Glib.Attributes +{#import System.Glib.Properties#} + +{# context lib = "gstreamer" prefix = "gst" #} addfile ./gstreamer/Media/Streaming/GStreamer/Base/BaseSink.chs hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSink.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Base.BaseSink ( + [_$_] + BaseSink, + BaseSinkClass, + castToBaseSink, + toBaseSink, + baseSinkQueryLatency, + baseSinkGetLatency, + baseSinkWaitPreroll, + baseSinkSetSync, + baseSinkGetSync, + baseSinkSetMaxLateness, + baseSinkGetMaxLateness, + baseSinkIsQOSEnabled, + baseSinkSetQOSEnabled, + baseSinkPrerollQueueLength, + baseSinkGetPad + [_$_] + ) where + +import Control.Monad (liftM, liftM4) +{#import Media.Streaming.GStreamer.Base.Types#} +import System.Glib.FFI +import System.Glib.Flags +import System.Glib.Attributes +{#import System.Glib.Properties#} + +{# context lib = "gstreamer" prefix = "gst" #} + +baseSinkQueryLatency :: BaseSinkClass baseSinkT + => baseSinkT + -> IO (Maybe (Bool, Bool, ClockTime, ClockTime)) +baseSinkQueryLatency baseSink = + alloca $ \livePtr -> alloca $ \upstreamLivePtr -> + alloca $ \minLatencyPtr -> alloca $ \maxLatencyPtr -> + do result <- {# call base_sink_query_latency #} (toBaseSink baseSink) + livePtr + upstreamLivePtr + minLatencyPtr + maxLatencyPtr + if toBool result + then do live <- peek livePtr + upstreamLive <- peek upstreamLivePtr + minLatency <- peek minLatencyPtr + maxLatency <- peek maxLatencyPtr + return $ Just (toBool live, + toBool upstreamLive, + cToEnum minLatency, + cToEnum maxLatency) + else return Nothing + +baseSinkGetLatency :: BaseSinkClass baseSinkT + => baseSinkT + -> IO ClockTime +baseSinkGetLatency baseSink = + liftM cToEnum $ + {# call base_sink_get_latency #} (toBaseSink baseSink) + +baseSinkWaitPreroll :: BaseSinkClass baseSinkT + => baseSinkT + -> IO FlowReturn +baseSinkWaitPreroll baseSink = + liftM cToEnum $ + {# call base_sink_wait_preroll #} (toBaseSink baseSink) + +baseSinkSetSync :: BaseSinkClass baseSinkT + => baseSinkT + -> Bool + -> IO () +baseSinkSetSync baseSink sync = + {# call base_sink_set_sync #} (toBaseSink baseSink) $ fromBool sync + +baseSinkGetSync :: BaseSinkClass baseSinkT + => baseSinkT + -> IO Bool +baseSinkGetSync baseSink = + liftM toBool $ + {# call base_sink_get_sync #} (toBaseSink baseSink) + +baseSinkSetMaxLateness :: BaseSinkClass baseSinkT + => baseSinkT + -> Word64 + -> IO () +baseSinkSetMaxLateness baseSink maxLateness = + {# call base_sink_set_max_lateness #} (toBaseSink baseSink) $ fromIntegral maxLateness + +baseSinkGetMaxLateness :: BaseSinkClass baseSinkT + => baseSinkT + -> IO Word64 +baseSinkGetMaxLateness baseSink = + liftM fromIntegral $ + {# call base_sink_get_max_lateness #} (toBaseSink baseSink) + +baseSinkIsQOSEnabled :: BaseSinkClass baseSinkT + => baseSinkT + -> IO Bool +baseSinkIsQOSEnabled baseSink = + liftM toBool $ + {# call base_sink_is_qos_enabled #} (toBaseSink baseSink) + +baseSinkSetQOSEnabled :: BaseSinkClass baseSinkT + => baseSinkT + -> Bool + -> IO () +baseSinkSetQOSEnabled baseSink enabled = + {# call base_sink_set_qos_enabled #} (toBaseSink baseSink) $ fromBool enabled + +baseSinkPrerollQueueLength :: BaseSinkClass baseSinkT + => Attr baseSinkT Int +baseSinkPrerollQueueLength = + newAttrFromUIntProperty "preroll-queue-len" + +baseSinkGetPad :: BaseSinkClass baseSinkT + => baseSinkT + -> IO Pad +baseSinkGetPad baseSink = + withBaseSink (toBaseSink baseSink) cBaseSinkGetPad >>= peekPad +foreign import ccall unsafe "_hs_gst_base_sink_get_pad" + cBaseSinkGetPad :: Ptr BaseSink + -> IO (Ptr Pad) hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 33 + castToBaseSrc, + toBaseSrc, + baseSrcWaitPlaying, + baseSrcIsLive, + baseSrcGetPad, + baseSrcBlockSize, + baseSrcNumBuffers, + baseSrcTypefind hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 44 +import Control.Monad (liftM) hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseSrc.chs 46 +import System.Glib.FFI +import System.Glib.Attributes +{#import System.Glib.Properties#} + +{# context lib = "gstreamer" prefix = "gst" #} + +baseSrcWaitPlaying :: BaseSrcClass baseSrcT + => baseSrcT + -> IO FlowReturn +baseSrcWaitPlaying baseSrc = + liftM cToEnum $ + {# call base_src_wait_playing #} (toBaseSrc baseSrc) + +baseSrcIsLive :: BaseSrcClass baseSrcT + => baseSrcT + -> IO Bool +baseSrcIsLive baseSrc = + liftM toBool $ {# call base_src_is_live #} (toBaseSrc baseSrc) + +baseSrcGetPad :: BaseSrcClass baseSrcT + => baseSrcT + -> IO Pad +baseSrcGetPad baseSrc = + withBaseSrc (toBaseSrc baseSrc) cBaseSrcGetPad >>= peekPad +foreign import ccall unsafe "_hs_gst_base_src_get_pad" + cBaseSrcGetPad :: Ptr BaseSrc + -> IO (Ptr Pad) + +-- FIXME: blocksize is actually a gulong... +baseSrcBlockSize :: BaseSrcClass baseSrcT + => Attr baseSrcT Word64 +baseSrcBlockSize = newAttr + (objectGetPropertyUInt64 "blocksize") + (objectSetPropertyUInt64 "blocksize") + +baseSrcNumBuffers :: BaseSrcClass baseSrcT + => Attr baseSrcT Int +baseSrcNumBuffers = + newAttrFromIntProperty "num-buffers" + +baseSrcTypefind :: BaseSrcClass baseSrcT + => Attr baseSrcT Bool +baseSrcTypefind = + newAttrFromBoolProperty "typefind" addfile ./gstreamer/Media/Streaming/GStreamer/Base/BaseTransform.chs hunk ./gstreamer/Media/Streaming/GStreamer/Base/BaseTransform.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module Media.Streaming.GStreamer.Base.BaseTransform ( + [_$_] + BaseTransform, + BaseTransformClass, + castToBaseTransform, + toBaseTransform, + baseTransformIsPassthrough, + baseTransformSetPassthrough, + baseTransformIsInPlace, + baseTransformSetInPlace, + baseTransformIsQOSEnabled, + baseTransformSetQOSEnabled, + baseTransformGetSinkPad, + baseTransformGetSrcPad, + baseTransformQOS + [_$_] + ) where + +import Control.Monad (liftM) +{#import Media.Streaming.GStreamer.Base.Types#} +import System.Glib.FFI +import System.Glib.Flags +import System.Glib.Attributes +{#import System.Glib.Properties#} + +{# context lib = "gstreamer" prefix = "gst" #} + +baseTransformIsPassthrough :: BaseTransformClass baseTransformT + => baseTransformT + -> IO Bool +baseTransformIsPassthrough baseTransform = + liftM toBool $ + {# call base_transform_is_passthrough #} (toBaseTransform baseTransform) + +baseTransformSetPassthrough :: BaseTransformClass baseTransformT + => baseTransformT + -> Bool + -> IO () +baseTransformSetPassthrough baseTransform passthrough = + {# call base_transform_set_passthrough #} (toBaseTransform baseTransform) + (fromBool passthrough) + +baseTransformIsInPlace :: BaseTransformClass baseTransformT + => baseTransformT + -> IO Bool +baseTransformIsInPlace baseTransform = + liftM toBool $ + {# call base_transform_is_in_place #} (toBaseTransform baseTransform) + +baseTransformSetInPlace :: BaseTransformClass baseTransformT + => baseTransformT + -> Bool + -> IO () +baseTransformSetInPlace baseTransform inPlace = + {# call base_transform_set_in_place #} (toBaseTransform baseTransform) + (fromBool inPlace) + +baseTransformIsQOSEnabled :: BaseTransformClass baseTransformT + => baseTransformT + -> IO Bool +baseTransformIsQOSEnabled baseTransform = + liftM toBool $ + {# call base_transform_is_qos_enabled #} (toBaseTransform baseTransform) + +baseTransformSetQOSEnabled :: BaseTransformClass baseTransformT + => baseTransformT + -> Bool + -> IO () +baseTransformSetQOSEnabled baseTransform enabled = + {# call base_transform_set_qos_enabled #} (toBaseTransform baseTransform) + (fromBool enabled) + +baseTransformGetSinkPad :: BaseTransformClass baseTransformT + => baseTransformT + -> IO Pad +baseTransformGetSinkPad baseTransform = + withBaseTransform (toBaseTransform baseTransform) cBaseTransformGetSinkPad >>= + peekPad +foreign import ccall unsafe "_hs_gst_base_transform_get_sink_pad" + cBaseTransformGetSinkPad :: Ptr BaseTransform + -> IO (Ptr Pad) + +baseTransformGetSrcPad :: BaseTransformClass baseTransformT + => baseTransformT + -> IO Pad +baseTransformGetSrcPad baseTransform = + withBaseTransform (toBaseTransform baseTransform) cBaseTransformGetSrcPad >>= + peekPad +foreign import ccall unsafe "_hs_gst_base_transform_get_src_pad" + cBaseTransformGetSrcPad :: Ptr BaseTransform + -> IO (Ptr Pad) + +baseTransformQOS :: BaseTransformClass baseTransformT + => Attr baseTransformT Bool +baseTransformQOS = newAttr + baseTransformIsQOSEnabled + baseTransformSetQOSEnabled + addfile ./gstreamer/Media/Streaming/GStreamer/Base/PushSrc.chs hunk ./gstreamer/Media/Streaming/GStreamer/Base/PushSrc.chs 1 +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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.Base.PushSrc ( + [_$_] + PushSrc, + PushSrcClass, + castToPushSrc, + toPushSrc, + [_$_] + ) where + +{#import Media.Streaming.GStreamer.Base.Types#} + +{# context lib = "gstreamer" prefix = "gst" #} hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to libgnomevfs -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 22 --- GnomeVFS, the C library which this Haskell library depends on, is +-- GStreamer, the C library which this Haskell library depends on, is hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 24 --- this library is based on the original GnomeVFS documentation, --- Copyright (c) 2001 Seth Nickell <sni...@st...>. The --- documentation is covered by the GNU Free Documentation License, --- version 1.2. +-- this library is based on the original GStreamer documentation. hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 26 --- | Maintainer : gtk...@li... +-- | Maintainer : gtk2hs-devel\@lists.sourceforge.net hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 29 +-- [_$_] +-- #hide hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 33 + module Media.Streaming.GStreamer.Core.Types, hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 36 + BaseSrcFlags, + baseSrcFlagLast, + baseSrcGetFlags, + baseSrcSetFlags, + baseSrcUnsetFlags, + [_$_] + Adapter, + [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 46 +import Data.Bits ( shiftL ) hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 50 +import System.Glib.Flags +import System.Glib.FFI + +{# context lib = "gstreamer" prefix = "gst" #} + +data BaseSrcFlags = BaseSrcStarted + deriving (Eq, Bounded) +instance Enum BaseSrcFlags where + toEnum n | n == (shiftL elementFlagLast 0) = BaseSrcStarted + fromEnum BaseSrcStarted = (shiftL elementFlagLast 0) +instance Flags BaseSrcFlags +baseSrcFlagLast :: Int +baseSrcFlagLast = shiftL elementFlagLast 2 + +baseSrcGetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> IO [BaseSrcFlags] +baseSrcGetFlags = mkObjectGetFlags + +baseSrcSetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> [BaseSrcFlags] + -> IO () +baseSrcSetFlags = mkObjectSetFlags + +baseSrcUnsetFlags :: BaseSrcClass baseSrcT + => baseSrcT + -> [BaseSrcFlags] + -> IO () +baseSrcUnsetFlags = mkObjectUnsetFlags + +------------------------------------------------------------------- hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 83 +{# pointer *GstAdapter as Adapter foreign newtype #} hunk ./gstreamer/Media/Streaming/GStreamer/Core.hs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core.hs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core.hs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core.hs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Caps.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Caps.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Caps.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs 8 --- 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 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 30 + [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 36 + [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/IndexFactory.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/IndexFactory.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/IndexFactory.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Init.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Init.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Init.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Init.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Iterator.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Iterator.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Iterator.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/PadTemplate.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/PadTemplate.chs 6 --- Version $Revision$ from $Date$ --- hunk ./gstreamer/Media/Streaming/GStreamer/Core/PadTemplate.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/PadTemplate.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Parse.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Parse.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Parse.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Plugin.chs 1 --- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gstreamer -*-haskell-*- hunk ./gstreamer/Media/Streaming/GStreamer/Core/Plugin.chs 8 --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Library General Public --- License as published by the Free Software Foundation; either --- version 2 of the License, or (at your option) any later version. --- +-- 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. +-- [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Plugin.chs 16 --- Library General Public License for more details. --- +-- 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://www.gnu.org/licenses/>. +-- [_$_] +-- 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 : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) hunk ./gs... [truncated message content] |
From: Duncan C. <dun...@wo...> - 2007-10-29 12:34:48
|
Sat Aug 4 09:09:45 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: update heirarchy stuff to match Duncan's recent changes hunk ./Makefile.am 2064 +gstreamer_CLEANFILES_SPLIT = $(libHSgstreamer_a_HSFILES:.hs=_split/) merger 0.0 ( hunk ./Makefile.am 2424 - rm -f $(c2hs_CLEANFILES) - rm -f $(glib_CLEANFILES) - rm -f $(gtk_CLEANFILES) - rm -f $(glade_CLEANFILES) - rm -f $(gconf_CLEANFILES) - rm -f $(sourceview_CLEANFILES) - rm -f $(mozembed_CLEANFILES) - rm -f $(cairo_CLEANFILES) - rm -f $(svgcairo_CLEANFILES) - rm -f $(gtkglext_CLEANFILES) - rm -f $(soegtk_CLEANFILES) - rm -f $(doc_CLEANFILES) + rm -f $(c2hs_CLEANFILES) + rm -rf $(c2hs_CLEANFILES_SPLIT) + rm -f $(glib_CLEANFILES) + rm -rf $(glib_CLEANFILES_SPLIT) + rm -f $(gtk_CLEANFILES) + rm -rf $(gtk_CLEANFILES_SPLIT) + rm -f $(glade_CLEANFILES) + rm -rf $(glade_CLEANFILES_SPLIT) + rm -f $(gconf_CLEANFILES) + rm -rf $(gconf_CLEANFILES_SPLIT) + rm -f $(sourceview_CLEANFILES) + rm -rf $(sourceview_CLEANFILES_SPLIT) + rm -f $(mozembed_CLEANFILES) + rm -rf $(mozembed_CLEANFILES_SPLIT) + rm -f $(cairo_CLEANFILES) + rm -rf $(cairo_CLEANFILES_SPLIT) + rm -f $(svgcairo_CLEANFILES) + rm -rf $(svgcairo_CLEANFILES_SPLIT) + rm -f $(gtkglext_CLEANFILES) + rm -rf $(gtkglext_CLEANFILES_SPLIT) + rm -f $(soegtk_CLEANFILES) + rm -rf $(soegtk_CLEANFILES_SPLIT) + rm -f $(gnomevfs_CLEANFILES) + rm -rf $(gnomevfs_CLEANFILES_SPLIT) + rm -f $(gstreamer_CLEANFILES) + rm -rf $(gstreamer_CLEANFILES_SPLIT) + rm -f $(doc_CLEANFILES) hunk ./Makefile.am 2424 - rm -f $(c2hs_CLEANFILES) - rm -f $(glib_CLEANFILES) - rm -f $(gtk_CLEANFILES) - rm -f $(glade_CLEANFILES) - rm -f $(gconf_CLEANFILES) - rm -f $(sourceview_CLEANFILES) - rm -f $(mozembed_CLEANFILES) - rm -f $(cairo_CLEANFILES) - rm -f $(svgcairo_CLEANFILES) - rm -f $(gtkglext_CLEANFILES) - rm -f $(soegtk_CLEANFILES) - rm -f $(doc_CLEANFILES) + rm -f $(c2hs_CLEANFILES) + rm -rf $(c2hs_CLEANFILES_SPLIT) + rm -f $(glib_CLEANFILES) + rm -rf $(glib_CLEANFILES_SPLIT) + rm -f $(gtk_CLEANFILES) + rm -rf $(gtk_CLEANFILES_SPLIT) + rm -f $(glade_CLEANFILES) + rm -rf $(glade_CLEANFILES_SPLIT) + rm -f $(gconf_CLEANFILES) + rm -rf $(gconf_CLEANFILES_SPLIT) + rm -f $(sourceview_CLEANFILES) + rm -rf $(sourceview_CLEANFILES_SPLIT) + rm -f $(mozembed_CLEANFILES) + rm -rf $(mozembed_CLEANFILES_SPLIT) + rm -f $(cairo_CLEANFILES) + rm -rf $(cairo_CLEANFILES_SPLIT) + rm -f $(svgcairo_CLEANFILES) + rm -rf $(svgcairo_CLEANFILES_SPLIT) + rm -f $(gtkglext_CLEANFILES) + rm -rf $(gtkglext_CLEANFILES_SPLIT) + rm -f $(soegtk_CLEANFILES) + rm -rf $(soegtk_CLEANFILES_SPLIT) + rm -f $(gnomevfs_CLEANFILES) + rm -rf $(gnomevfs_CLEANFILES_SPLIT) + rm -f $(gstreamer_CLEANFILES) + rm -rf $(gstreamer_CLEANFILES_SPLIT) + rm -f $(doc_CLEANFILES) ) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs 26 - fromBin, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs 26 - fromBus, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 24 - fromClock, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs 26 - fromElement, hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs 26 - fromElementFactory, hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 26 - fromGhostPad, hunk ./gstreamer/Media/Streaming/GStreamer/Core/ImplementsInterface.chs 23 - fromImplementsInterface, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 24 - fromIndex, hunk ./gstreamer/Media/Streaming/GStreamer/Core/IndexFactory.chs 24 - fromIndexFactory, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs 24 - fromMessage, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 26 - fromObject, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs 26 - fromPad, hunk ./gstreamer/Media/Streaming/GStreamer/Core/PadTemplate.chs 26 - fromPadTemplate, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pipeline.chs 23 - fromPipeline, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Plugin.chs 23 - fromPlugin, hunk ./gstreamer/Media/Streaming/GStreamer/Core/PluginFeature.chs 23 - fromPluginFeature, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Registry.chs 24 - fromRegistry, hunk ./gstreamer/Media/Streaming/GStreamer/Core/SystemClock.chs 22 - fromSystemClock, hunk ./gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template 40 +{#import System.Glib.Types#} hunk ./gstreamer/Media/Streaming/GStreamer/GObjectHierarchy.chs.template 56 - -> fromGObject gobj + -> unsafeCastGObject gobj hunk ./gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template 55 - -> fromGObject gobj + -> unsafeCastGObject gobj hunk ./gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template 37 - fromMiniObject, hunk ./gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template 66 - -> fromMiniObject gobj + -> unsafeCastMiniObject gobj hunk ./gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template 111 -toMiniObject :: MiniObjectClass o => o -> MiniObject -toMiniObject = unsafeCoerce# -fromMiniObject :: MiniObjectClass o => MiniObject -> o -fromMiniObject = unsafeCoerce# +class MiniObjectClass o where + toMiniObject :: MiniObjectClass o => o -> MiniObject + unsafeCastMiniObject :: MiniObjectClass o => MiniObject -> o hunk ./gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template 115 -class MiniObjectClass o -instance MiniObjectClass MiniObject +instance MiniObjectClass MiniObject where + toMiniObject = id + unsafeCastMiniObject = id hunk ./tools/hierarchyGenGst/TypeGen.hs 151 - "CASTING_FUNCTIONS" -> generateCastFunctions rootObject objs specialQueries - "CLASS_DECLERATIONS" -> generateClassDeclerations prefix objs specialQueries + "CASTING_FUNCTIONS" -> generateCastFunctions objs specialQueries rootObject + "CLASS_DECLERATIONS" -> generateClassDeclerations prefix objs specialQueries rootObject hunk ./tools/hierarchyGenGst/TypeGen.hs 191 - indent 1.ss "from".ss n.ss ", ". hunk ./tools/hierarchyGenGst/TypeGen.hs 198 -generateCastFunctions :: String -> [[String]] -> TypeTable -> ShowS -generateCastFunctions rootObject objs typeTable = foldl (.) id (map (makeUpcast rootObject typeTable) objs) +generateCastFunctions :: [[String]] -> TypeTable -> String -> ShowS +generateCastFunctions objs typeTable rootObject = foldl (.) id (map (makeUpcast rootObject typeTable) objs) hunk ./tools/hierarchyGenGst/TypeGen.hs 201 -generateClassDeclerations :: String -> [[String]] -> TypeTable -> ShowS -generateClassDeclerations prefix objs typeTable = foldl (.) id (map (makeClass prefix typeTable) objs) +generateClassDeclerations :: String -> [[String]] -> TypeTable -> String -> ShowS +generateClassDeclerations prefix objs typeTable rootObject = foldl (.) id (map (makeClass prefix typeTable rootObject) objs) hunk ./tools/hierarchyGenGst/TypeGen.hs 212 - indent 0.ss "peek".ss obj.ss " :: Ptr ".ss obj.ss " -> IO ".ss obj. - indent 0.ss "peek".ss obj.ss " = mkPeekObject ".ss obj. - indent 0.ss "take".ss obj.ss " :: Ptr ".ss obj.ss " -> IO ".ss obj. - indent 0.ss "take".ss obj.ss " = mkTakeObject ".ss obj. hunk ./tools/hierarchyGenGst/TypeGen.hs 240 -makeClass :: String -> TypeTable -> [String] -> ShowS -makeClass prefix table (name:[]) = id -makeClass prefix table (name:parents) = +makeClass :: String -> TypeTable -> String -> [String] -> ShowS +makeClass prefix table rootObject (name:[]) = id +makeClass prefix table rootObject (name:parents) = hunk ./tools/hierarchyGenGst/TypeGen.hs 258 + indent 0.ss "peek".ss name.ss " :: Ptr ".ss name.ss " -> IO ".ss name. + indent 0.ss "peek".ss name.ss " = mkPeekObject ".ss name. + indent 0.ss "take".ss name.ss " :: Ptr ".ss name.ss " -> IO ".ss name. + indent 0.ss "take".ss name.ss " = mkTakeObject ".ss name. hunk ./tools/hierarchyGenGst/TypeGen.hs 265 - indent 0.ss "to".ss name.ss " = unsafeCoerce#". - indent 0.ss "from".ss name.ss " :: ".ss name.ss "Class o => ".ss name.ss " -> o". - indent 0.ss "from".ss name.ss " = unsafeCoerce#". + indent 0.ss "to".ss name.ss " = unsafeCast".ss rootObject.ss " . to".ss rootObject. hunk ./tools/hierarchyGenGst/TypeGen.hs 270 + makeRootInstance name rootObject. hunk ./tools/hierarchyGenGst/TypeGen.hs 274 -makeInstance name [] = indent 0 +makeInstance name (rootObj:[]) = indent 0 hunk ./tools/hierarchyGenGst/TypeGen.hs 279 +makeRootInstance :: String -> String -> ShowS +makeRootInstance name rootObject = + indent 0.ss "instance ".ss rootObject.ss "Class ".ss name.ss " where". + indent 1.ss "to".ss rootObject.ss " = ".ss "mk".ss rootObject.ss" . castForeignPtr . un".ss name. + indent 1.ss "unsafeCast".ss rootObject.ss " = mk".ss name.ss " . castForeignPtr . un".ss rootObject + |
From: Duncan C. <dun...@wo...> - 2007-10-29 12:34:48
|
Thu Jul 26 13:28:00 PDT 2007 Peter Gavin <pg...@gm...> * gstreamer: better flag support for GstObject subtypes; replaced from* and to* for enums with cToEnum/cFromEnum; similarly for flags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs 185 - return $ (toClockReturn result, fromIntegral jitter) + return $ (cToEnum result, fromIntegral jitter) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 74 - withArray0 0 (map fromFormat formats) $ \cFormats -> - {# call formats_contains #} cFormats $ fromFormat format + withArray0 0 (map cFromEnum formats) $ \cFormats -> + {# call formats_contains #} cFormats $ cFromEnum format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 81 - ({# call format_get_details #} $ fromFormat format) >>= + ({# call format_get_details #} $ cFromEnum format) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/GhostPad.chs 57 - flip {# call ghost_pad_new_no_target #} $ fromPadDirection dir) >>= + flip {# call ghost_pad_new_no_target #} $ cFromEnum dir) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 89 - {# call index_set_certainty #} (toIndex index) $ fromIndexCertainty certainty + {# call index_set_certainty #} (toIndex index) $ cFromEnum certainty hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 136 - (fromFormat format) >>= + (cFromEnum format) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 175 - (fromIndexLookupMethod method) + (cFromEnum method) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 177 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 187 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Object.chs 27 + objectSetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 50 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 67 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 78 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 95 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 115 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 117 - (fromSeekType startType) + (cFromEnum startType) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 119 - (fromSeekType stopType) + (cFromEnum stopType) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 133 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 143 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/TagList.chs 173 - toTagFlag $ unsafePerformIO $ + cToEnum $ unsafePerformIO $ hunk ./gstreamer/Media/Streaming/GStreamer/Core/TagList.chs 200 - (fromTagMergeMode mode) >>= + (cFromEnum mode) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/TagList.chs 242 - (fromTagMergeMode mode) + (cFromEnum mode) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 24 + cToFlags, + cFromFlags, + cToEnum, + cFromEnum, + [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 33 - toFormat, - fromFormat, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 35 + mkObjectGetFlags, + mkObjectSetFlags, + mkObjectUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 39 + objectFlagLast, + objectGetFlags, + objectSetFlags, + objectUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 46 + padFlagLast, + padGetFlags, + padSetFlags, + padUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 51 - toPadDirection, - fromPadDirection, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 57 + elementFlagLast, + elementGetFlags, + elementSetFlags, + elementUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 66 - fromSeekType, - toSeekType, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 72 + busFlagLast, + busGetFlags, + busSetFlags, + busUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 79 + clockFlagLast, + clockGetFlags, + clockSetFlags, + clockUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 86 - toClockReturn, - fromClockReturn, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 92 + indexFlagLast, + indexGetFlags, + indexSetFlags, + indexUnsetFlags, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 97 - toIndexCertainty, - fromIndexCertainty, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 102 - fromIndexLookupMethod, - toIndexLookupMethod, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 147 - toTagFlag, - fromTagFlag, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 148 - toTagMergeMode, - fromTagMergeMode, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 177 +cToFlags :: (Integral int, Flags flags) + => int + -> [flags] +cToFlags = toFlags . fromIntegral +cFromFlags :: (Integral int, Flags flags) + => [flags] + -> int +cFromFlags = fromIntegral . fromFlags + +cToEnum :: (Integral int, Enum enum) + => int + -> enum +cToEnum = toEnum . fromIntegral +cFromEnum :: (Integral int, Enum enum) + => enum + -> int +cFromEnum = fromIntegral . fromEnum + hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 198 -toFormat int = (toEnum $ fromIntegral int) :: Format -fromFormat (format :: Format) = fromIntegral $ fromEnum format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 207 - do value <- liftM toFormat $ {# get GstFormatDefinition->value #} ptr + do value <- liftM cToEnum $ {# get GstFormatDefinition->value #} ptr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 219 +mkObjectGetFlags :: (ObjectClass objectT, Flags flagsT) + => objectT + -> IO [flagsT] +mkObjectGetFlags object = + liftM (toFlags . fromIntegral) $ + withObject object cObjectGetFlags +foreign import ccall unsafe "_hs_gst_object_flags" + cObjectGetFlags :: Ptr Object + -> IO CUInt + +mkObjectSetFlags :: (ObjectClass objectT, Flags flagsT) + => objectT + -> [flagsT] + -> IO () +mkObjectSetFlags object flags = + withObject object $ \cObject -> + cObjectSetFlags cObject (fromIntegral $ fromFlags flags) +foreign import ccall unsafe "_hs_gst_object_flag_set" + cObjectSetFlags :: Ptr Object + -> CUInt + -> IO () + +mkObjectUnsetFlags :: (ObjectClass objectT, Flags flagsT) + => objectT + -> [flagsT] + -> IO () +mkObjectUnsetFlags object flags = + withObject object $ \cObject -> + cObjectUnsetFlags cObject (fromIntegral $ fromFlags flags) +foreign import ccall unsafe "_hs_gst_object_flag_unset" + cObjectUnsetFlags :: Ptr Object + -> CUInt + -> IO () + hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 268 +instance Flags ObjectFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 271 -instance Flags ObjectFlags + +objectGetFlags :: ObjectClass objectT + => objectT + -> IO [ObjectFlags] +objectGetFlags = mkObjectGetFlags + +objectSetFlags :: ObjectClass objectT + => objectT + -> [ObjectFlags] + -> IO () +objectSetFlags = mkObjectSetFlags + +objectUnsetFlags :: ObjectClass objectT + => objectT + -> [ObjectFlags] + -> IO () +objectUnsetFlags = mkObjectUnsetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 303 - [_$_] hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 309 +padFlagLast :: Int +padFlagLast = shiftL objectFlagLast 8 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 312 -{# enum GstPadDirection as PadDirection {underscoreToCase} with prefix = "GST" deriving (Eq, Show) #} -toPadDirection n = (toEnum $ fromIntegral n) :: PadDirection -fromPadDirection (n :: PadDirection) = fromIntegral $ fromEnum n +padGetFlags :: PadClass padT + => padT + -> IO [PadFlags] +padGetFlags = mkObjectGetFlags + +padSetFlags :: PadClass padT + => padT + -> [PadFlags] + -> IO () +padSetFlags = mkObjectSetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 323 +padUnsetFlags :: PadClass padT + => padT + -> [PadFlags] + -> IO () +padUnsetFlags = mkObjectUnsetFlags + +{# enum GstPadDirection as PadDirection {underscoreToCase} with prefix = "GST" deriving (Eq, Show) #} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 357 +elementFlagLast :: Int +elementFlagLast = shiftL objectFlagLast 16 + +elementGetFlags :: ElementClass elementT + => elementT + -> IO [ElementFlags] +elementGetFlags = mkObjectGetFlags + +elementSetFlags :: ElementClass elementT + => elementT + -> [ElementFlags] + -> IO () +elementSetFlags = mkObjectSetFlags + +elementUnsetFlags :: ElementClass elementT + => elementT + -> [ElementFlags] + -> IO () +elementUnsetFlags = mkObjectUnsetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 380 -toSeekType int = (toEnum $ fromIntegral int) :: SeekType -fromSeekType (seekType :: SeekType) = fromIntegral $ fromEnum seekType - hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 426 +busFlagLast :: Int +busFlagLast = shiftL objectFlagLast 1 + +busGetFlags :: BusClass busT + => busT + -> IO [BusFlags] +busGetFlags = mkObjectGetFlags + +busSetFlags :: BusClass busT + => busT + -> [BusFlags] + -> IO () +busSetFlags = mkObjectSetFlags + +busUnsetFlags :: BusClass busT + => busT + -> [BusFlags] + -> IO () +busUnsetFlags = mkObjectUnsetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 476 +clockFlagLast :: Int +clockFlagLast = shiftL objectFlagLast 8 + +clockGetFlags :: ClockClass clockT + => clockT + -> IO [ClockFlags] +clockGetFlags = mkObjectGetFlags + +clockSetFlags :: ClockClass clockT + => clockT + -> [ClockFlags] + -> IO () +clockSetFlags = mkObjectSetFlags + +clockUnsetFlags :: ClockClass clockT + => clockT + -> [ClockFlags] + -> IO () +clockUnsetFlags = mkObjectUnsetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 500 -toClockReturn int = (toEnum $ fromIntegral int) :: ClockReturn -fromClockReturn (clockReturn :: ClockReturn) = fromIntegral $ fromEnum clockReturn hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 528 +indexFlagLast :: Int +indexFlagLast = shiftL objectFlagLast 8 hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 531 -{# enum GstIndexCertainty as IndexCertainty {underscoreToCase} with prefix = "GST" deriving (Eq) #} -toIndexCertainty int = (toEnum $ fromIntegral int) :: IndexCertainty -fromIndexCertainty (certainty :: IndexCertainty) = fromIntegral $ fromEnum certainty +indexGetFlags :: IndexClass indexT + => indexT + -> IO [IndexFlags] +indexGetFlags = mkObjectGetFlags + +indexSetFlags :: IndexClass indexT + => indexT + -> [IndexFlags] + -> IO () +indexSetFlags = mkObjectSetFlags hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 542 +indexUnsetFlags :: IndexClass indexT + => indexT + -> [IndexFlags] + -> IO () +indexUnsetFlags = mkObjectUnsetFlags + +{# enum GstIndexCertainty as IndexCertainty {underscoreToCase} with prefix = "GST" deriving (Eq) #} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 551 -toIndexLookupMethod int = (toEnum $ fromIntegral int) :: IndexLookupMethod -fromIndexLookupMethod (format :: IndexLookupMethod) = fromIntegral $ fromEnum format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 578 - return $ IndexAssociation (toFormat format) (fromIntegral value) + return $ IndexAssociation (cToEnum format) (fromIntegral value) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 580 - do {# set GstIndexAssociation->format #} ptr $ fromFormat format + do {# set GstIndexAssociation->format #} ptr $ cFromEnum format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 828 -toTagFlag int = (toEnum $ fromIntegral int) :: TagFlag -fromTagFlag (tagFlag :: TagFlag) = fromIntegral $ fromEnum tagFlag - hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 829 -toTagMergeMode int = (toEnum $ fromIntegral int) :: TagMergeMode -fromTagMergeMode (tagMergeMode :: TagMergeMode) = fromIntegral $ fromEnum tagMergeMode hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 858 - (toFormat format) + (cToEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 877 - (fromFormat format) + (cFromEnum format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 880 - {# set GstSegment->format #} ptr $ fromFormat format + {# set GstSegment->format #} ptr $ cFromEnum format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs 893 - hunk ./gstreamer/hsgstreamer.c 3 +guint _hs_gst_object_flags (GstObject* obj) +{ return GST_OBJECT_FLAGS (obj); } + +void _hs_gst_object_flag_set (GstObject* obj, guint flags) +{ GST_OBJECT_FLAG_SET (obj, flags); } + +void _hs_gst_object_flag_unset (GstObject* obj, guint flags) +{ GST_OBJECT_FLAG_UNSET (obj, flags); } + hunk ./gstreamer/hsgstreamer.h 16 +guint _hs_gst_object_flags (GstObject* obj); +void _hs_gst_object_flag_set (GstObject* obj, guint flags); +void _hs_gst_object_flag_unset (GstObject* obj, guint flags); |
From: Duncan C. <dun...@wo...> - 2007-10-29 11:39:35
|
Mon Oct 29 04:35:38 PDT 2007 Duncan Coutts <du...@ha...> * Make the StatusIcon stuff compile with gtk < 2.10 move ./gtk/Graphics/UI/Gtk.hs ./gtk/Graphics/UI/Gtk.hs.pp hunk ./Makefile.am 424 - gtk/Graphics/UI/Gtk.hs \ + gtk/Graphics/UI/Gtk.hs.pp \ hunk ./gtk/Graphics/UI/Gtk.hs.pp 252 +#ifdef GTK_CHECK_VERSION(2,10,0) hunk ./gtk/Graphics/UI/Gtk.hs.pp 254 +#else +import Graphics.UI.Gtk.Display.StatusIcon +#endif |
From: Duncan C. <dun...@wo...> - 2007-10-26 14:24:41
|
Fri Oct 26 05:42:16 PDT 2007 Duncan Coutts <du...@ha...> * Make GDateTime compile with old versions of glib move ./glib/System/Glib/GDateTime.chs ./glib/System/Glib/GDateTime.chs.pp hunk ./Makefile.am 288 - glib/System/Glib/GDateTime.chs + glib/System/Glib/GDateTime.chs.pp hunk ./glib/System/Glib/GDateTime.chs.pp 31 +#if GLIB_CHECK_VERSION(2,12,0) hunk ./glib/System/Glib/GDateTime.chs.pp 34 +#endif hunk ./glib/System/Glib/GDateTime.chs.pp 48 +#if GLIB_CHECK_VERSION(2,10,0) hunk ./glib/System/Glib/GDateTime.chs.pp 50 +#endif hunk ./glib/System/Glib/GDateTime.chs.pp 105 +#if GLIB_CHECK_VERSION(2,12,0) hunk ./glib/System/Glib/GDateTime.chs.pp 121 +#endif hunk ./glib/System/Glib/GDateTime.chs.pp 226 +#if GLIB_CHECK_VERSION(2,10,0) hunk ./glib/System/Glib/GDateTime.chs.pp 234 +#endif |
From: Duncan C. <dun...@wo...> - 2007-10-26 14:24:40
|
Mon Oct 8 19:32:50 PDT 2007 Peter Gavin <pg...@gm...> * gnomevfs: some documentation cleanups hunk ./gnomevfs/System/Gnome/VFS/Drive.chs 125 --- | If drive has associated 'Volume' objects, all of them will --- be unmounted by calling 'volumeUnmount' for each volume in --- 'driveGetMountedVolumes', except for the last one, for which --- 'volumeEject' is called to ensure that the drive's media is --- ejected. +-- | If drive has associated 'Volume' objects, all of them will be +-- unmounted by calling 'System.Gnome.VFS.Volume.volumeUnmount' for +-- each volume in 'driveGetMountedVolumes', except for the last one, +-- for which 'System.Gnome.VFS.Volume.volumeEject' is called to +-- ensure that the drive's media is ejected. hunk ./gnomevfs/System/Gnome/VFS/Drive.chs 151 --- check the validity of the location by calling 'uriFromString' --- with the URI, and checking whether the return value is not --- 'Nothing'. +-- check the validity of the location by calling +-- 'System.Gnome.VFS.URI.uriFromString' with the URI, and checking +-- whether the return value is not 'Nothing'. hunk ./gnomevfs/System/Gnome/VFS/MIME.chs 83 --- MIME-type as 'getFileInfo'. +-- MIME-type as 'System.Gnome.VFS.Ops.getFileInfo'. hunk ./gnomevfs/System/Gnome/VFS/Types.chs 101 - VolumeType, - DeviceType, + VolumeType(..), + DeviceType(..), hunk ./gnomevfs/System/Gnome/VFS/Util.chs 264 --- On Windows 'localFullPath' should be in the UTF-8 encoding, and +-- On Windows @localFullPath@ should be in the UTF-8 encoding, and hunk ./gnomevfs/System/Gnome/VFS/Volume.chs 149 --- check the validity of the location by calling 'uriFromString' --- with the URI, and checking whether the return value is not --- 'Nothing'. +-- check the validity of the location by calling +-- 'System.Gnome.VFS.URI.uriFromString' with the URI, and checking +-- whether the return value is not 'Nothing'. |