-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Video Compression Library (see http:theora.org)
@package Theora
@version 1.0
-- | This module calls the libtheora C library to generate video ogg files
-- from YCbCr images. As explained on
-- http://theora.org/doc/libtheora-1.0/group__encfuncs.html, the
-- basic steps for creating a video are the following :
--
--
module Theora.Encoding
data Info
Info :: Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> ColorSpace -> PixelFmt -> CInt -> CInt -> CInt -> Info
frameWidth :: Info -> Int32
frameHeight :: Info -> Int32
picWidth :: Info -> Int32
picHeight :: Info -> Int32
picX :: Info -> Int32
picY :: Info -> Int32
colorSpace :: Info -> ColorSpace
pixelFmt :: Info -> PixelFmt
targetBitRate :: Info -> CInt
quality :: Info -> CInt
keyframeGranuleShift :: Info -> CInt
data Comment
Comment :: [String] -> String -> Comment
-- | Your comments
user :: Comment -> [String]
-- | Name of the encoder, i.e. your application
vendor :: Comment -> String
-- | Theora supports 4 different pixel formats, listed in
-- http://theora.org/doc/Theora.pdf. YCbCr chroma frames (Cb and
-- Cr) may be resized for compression (see
-- http://en.wikipedia.org/Ycbcr). The resulting pixel formats are
-- as follows :
data PixelFmt
-- | Chroma decimation by 2 in both directions
Pf420 :: PixelFmt
-- | Chroma decimation by 2 in the x direction
Pf422 :: PixelFmt
-- | No chroma decimation
Pf444 :: PixelFmt
data ColorSpace
Unspecified :: ColorSpace
-- | A color space designed for NTSC content
ItuRec470M :: ColorSpace
-- | A color space designed for PAL/SECAM content
ItuRec470BG :: ColorSpace
-- | Makes an encoder (EncCtx) instance out of an Info record
encodeAlloc :: Info -> IO (Maybe EncCtx)
-- | Returns the last header packets. This function should be called before
-- encoding actual video.
flushHeader :: EncCtx -> Comment -> IO [OggPacket]
data ImgPlane
-- | YCbCrBuffer is the type of raw YCbCr frames
data YCbCrBuffer
YCbCr :: ImgPlane -> ImgPlane -> ImgPlane -> YCbCrBuffer
-- | the Y plane
y :: YCbCrBuffer -> ImgPlane
-- | the Cb plane
cb :: YCbCrBuffer -> ImgPlane
-- | the Cr plane
cr :: YCbCrBuffer -> ImgPlane
-- | Allocate a new YCbCrBuffer object
newYCbCr :: Int -> Int -> PixelFmt -> IO YCbCrBuffer
-- | Submits a frame for encoding
encodeIn :: EncCtx -> YCbCrBuffer -> IO ()
-- | Retrieve all the ready encoded packets
encodeOut :: EncCtx -> Bool -> IO [OggPacket]
data OggPacket
-- | Initializes an Ogg container stream
newOggStreamState :: Int -> IO OggStreamState
data OggPage
-- | Submits an encoded packet into the streams
streamPacketIn :: OggStreamState -> OggPacket -> IO ()
-- | Get an outputable Ogg page
streamPageOut :: OggStreamState -> IO (Maybe OggPage)
-- | Retrieve the last pages of the stream
streamFlush :: OggStreamState -> IO (Maybe OggPage)
instance Storable COggStreamState
instance Show OggPage
instance Storable OggPage
instance Storable YCbCrBuffer
instance Storable ImgPlane
instance Storable Comment
instance Storable OggPacket
instance Storable Info
instance Enum ColorSpace
instance Enum PixelFmt