Portability | not portable |
---|---|
Stability | unstable |
Maintainer | Joachim Fasting <joachim.fasting@gmail.com> |
A simple binding to xine-lib. Low-level bindings. Made for xine-lib version 1.1.18.1
- xine_get_version_string :: String
- xine_get_version :: (Int, Int, Int)
- xine_check_version :: Int -> Int -> Int -> Bool
- data Engine
- data AudioPort
- data VideoPort
- data VisualType
- xine_new :: IO Engine
- xine_init :: Engine -> IO ()
- xine_open_audio_driver :: Engine -> Maybe String -> IO (Maybe AudioPort)
- xine_open_video_driver :: Engine -> Maybe String -> VisualType -> IO (Maybe VideoPort)
- xine_close_audio_driver :: Engine -> AudioPort -> IO ()
- xine_close_video_driver :: Engine -> VideoPort -> IO ()
- xine_exit :: Engine -> IO ()
- data Stream
- data StreamParam
- = Speed
- | AvOffset
- | AudioChannelLogical
- | SpuChannel
- | AudioVolume
- | AudioMute
- | AudioComprLevel
- | AudioReportLevel
- | Verbosity
- | SpuOffset
- | IgnoreVideo
- | IgnoreAudio
- | BroadcasterPort
- | MetronomPrebuffer
- | Eq30Hz
- | Eq60Hz
- | Eq125Hz
- | Eq500Hz
- | Eq1000Hz
- | Eq2000Hz
- | Eq4000Hz
- | Eq8000Hz
- | Eq16000Hz
- | AudioCloseDevice
- | AmpMute
- | FineSpeed
- | EarlyFinishedEvent
- | GaplessSwitch
- | DelayFinishedEvent
- | Deinterlace
- | AspectRatio
- | Hue
- | Saturation
- | Contrast
- | Brightness
- | ZoomX
- | ZoomY
- | PanScan
- | TvMode
- | WindowWidth
- | WindowHeight
- | CropLeft
- | CropRight
- | CropTop
- | CropBottom
- data Speed
- data NormalSpeed = NormalSpeed
- data Zoom
- data AspectRatio
- data DemuxStrategy
- data Verbosity
- type MRL = String
- data EngineParam = EngineVerbosity
- data Affection
- data TrickMode
- xine_stream_new :: Engine -> AudioPort -> VideoPort -> IO (Maybe Stream)
- xine_stream_master_slave :: Stream -> Stream -> [Affection] -> IO Int
- xine_open :: Stream -> MRL -> IO Int
- xine_play :: Stream -> Int -> Int -> IO Int
- xine_dispose :: Stream -> IO ()
- xine_eject :: Stream -> IO Int
- xine_trick_mode :: Stream -> TrickMode -> Int -> IO Int
- xine_stop :: Stream -> IO ()
- xine_close :: Stream -> IO ()
- xine_engine_set_param :: Engine -> EngineParam -> Int -> IO ()
- xine_engine_get_param :: Engine -> EngineParam -> IO Int
- xine_set_param :: Enum a => Stream -> StreamParam -> a -> IO ()
- xine_get_param :: Enum a => Stream -> StreamParam -> IO a
- data EngineStatus
- data XineError
- = NoError
- | NoInputPlugin
- | NoDemuxPlugin
- | MalformedMrl
- | InputFailed
- xine_get_error :: Stream -> IO XineError
- xine_get_status :: Stream -> IO EngineStatus
- xine_get_audio_lang :: Stream -> Int -> IO (Int, String)
- xine_get_spu_lang :: Stream -> Int -> IO (Int, String)
- xine_get_pos_length :: Stream -> IO (Int, Int, Int, Int)
- data InfoType
- = InfoBitrate
- | InfoSeekable
- | InfoVideoWidth
- | InfoVideoHeight
- | InfoVideoRatio
- | InfoVideoChannels
- | InfoVideoStreams
- | InfoVideoBitrate
- | InfoVideoFourCC
- | InfoVideoHandled
- | InfoFrameDuration
- | InfoAudioChannels
- | InfoAudioBits
- | InfoAudioSamplerate
- | InfoAudioBitrate
- | InfoAudioFourCC
- | InfoAudioHandled
- | InfoHasChapters
- | InfoHasVideo
- | InfoHasAudio
- | InfoIgnoreVideo
- | InfoIgnoreAudio
- | InfoIgnoreSpu
- | InfoVideoHasStill
- | InfoMaxAudioChannel
- | InfoMaxSpuChannel
- | InfoAudioMode
- | InfoSkippedFrames
- | InfoDiscardedFrames
- | InfoVideoAFD
- | InfoDvdTitleNumber
- | InfoDvdTitleCount
- | InfoDvdChapterNumber
- | InfoDvdChapterCount
- | InfoDvdAngleNumber
- | InfoDvdAngleCount
- data MetaType
- = MetaTitle
- | MetaComment
- | MetaArtist
- | MetaGenre
- | MetaAlbum
- | MetaYear
- | MetaVideoCodec
- | MetaAudioCodec
- | MetaSystemLayer
- | MetaInputPlugin
- | MetaDiscId
- | MetaTrackNumber
- | MetaComposer
- | MetaPublisher
- | MetaLicense
- | MetaArranger
- | MetaLyricist
- | MetaConductor
- | MetaPerformer
- | MetaEnsemble
- | MetaOpus
- | MetaPart
- | MetaPartNumber
- | MetaLocation
- xine_get_stream_info :: Stream -> InfoType -> IO Int
- xine_get_meta_info :: Stream -> MetaType -> IO String
Version information
xine_get_version_string :: StringSource
Get xine-lib version string.
Header declaration:
const char *xine_get_version_string (void)
xine_get_version :: (Int, Int, Int)Source
Get version as a triple: major, minor, sub
Header declaration:
void xine_get_version (int *major, int *minor, int *sub)
xine_check_version :: Int -> Int -> Int -> BoolSource
Compare given version to xine-lib version (major, minor, sub).
Header declaration:
int xine_check_version (int major, int minor, int sub)
returns 1 if compatible, 0 otherwise.
Global engine handling
data VisualType Source
Valid visual types
xine_init :: Engine -> IO ()Source
Post-init the xine engine.
Header declaration:
void xine_init (xine_t *self)
xine_open_audio_driver :: Engine -> Maybe String -> IO (Maybe AudioPort)Source
Initialise audio driver.
Header declaration:
xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, void *data)
id: identifier of the driver, may be NULL for auto-detection
data: special data struct for ui/driver communication
May return NULL if the driver failed to load.
xine_open_video_driver :: Engine -> Maybe String -> VisualType -> IO (Maybe VideoPort)Source
Initialise video driver.
Header declaration:
xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, int visual, void *data)
id: identifier of the driver, may be NULL for auto-detection
data: special data struct for ui/driver communication
visual : video driver flavor selector
May return NULL if the driver failed to load.
xine_close_audio_driver :: Engine -> AudioPort -> IO ()Source
Close audio port.
Header declaration:
void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver)
xine_close_video_driver :: Engine -> VideoPort -> IO ()Source
Close video port.
Header declaration:
void xine_close_video_driver (xine_t *self, xine_video_port_t *driver)
xine_exit :: Engine -> IO ()Source
Free all resources, close all plugins, close engine.
Header declaration:
void xine_exit (xine_t *self)
Stream handling
data StreamParam Source
Stream parameter enumeration.
Values for XINE_PARAM_SPEED parameter.
data AspectRatio Source
Values for XINE_PARAM_VO_ASPECT_RATIO
data DemuxStrategy Source
Stream format detection strategies
Media Resource Locator. Describes the media to read from. Valid MRLs may be plain file names or one of the following:
- Filesystem:
file:<path>
fifo:<path>
stdin:/
- CD and DVD:
dvd:/[device_name][/title[.part]]
dvd:/DVD_image_file[/title[.part]]
dvd:/DVD_directory[/title[.part]]
vcd://[CD_image_or_device_name][@[letter]number]
vcdo://track_number
cdda:/[device][/track_number]
- Video devices:
v4l://[tuner_device/frequency
v4l2://tuner_device
dvb://channel_number
dvb://channel_name
dvbc://channel_name:tuning_parameters
dvbs://channel_name:tuning_parameters
dvbt://channel_name:tuning_parameters
dvba://channel_name:tuning_parameters
pvr:/tmp_files_path!saved_files_path!max_page_age
- Network:
http://host
tcp://host[:port]
udp://host[:port[?iface=interface]]
rtp://host[:port[?iface=interface]]
smb://
mms://host
pnm://host
rtsp://host
The affection determines which actions on the master stream
are also to be applied to the slave stream. See xine_stream_master_slave
.
xine_stream_new :: Engine -> AudioPort -> VideoPort -> IO (Maybe Stream)Source
Create a new stream for media playback.
Header declaration:
xine_stream_t *xine_stream_new (xine_t *self, xine_audio_port *ao, xine_video_port_t *vo)
Returns xine_stream_t* if OK, NULL on error (use xine_get_error
for
details).
xine_stream_master_slave :: Stream -> Stream -> [Affection] -> IO IntSource
Make one stream the slave of another. Certain operations on the master stream are also applied to the slave stream.
Header declaration:
int xine_stream_master_slave (xine_stream_t *master, xine_stream_t *slave, int affection)
returns 1 on success, 0 on failure.
xine_open :: Stream -> MRL -> IO IntSource
Open a stream.
Header declaration:
int xine_open (xine_stream_t *stream, const char *mrl)
Returns 1 if OK, 0 on error (use xine_get_error
for details).
xine_play :: Stream -> Int -> Int -> IO IntSource
Play a stream from a given position.
Header declaration:
int xine_play (xine_stream_t *stream, int start_pos, int start_time)
Returns 1 if OK, 0 on error (use xine_get_error
for details).
xine_dispose :: Stream -> IO ()Source
Stop playback, dispose all stream-related resources. The stream is no longer valid after this.
Header declaration:
void xine_dispose (xine_stream_t *stream)
xine_eject :: Stream -> IO IntSource
Ask current input plugin to eject media.
Header declaration:
int xine_eject (xine_stream_t *stream)
xine_trick_mode :: Stream -> TrickMode -> Int -> IO IntSource
Set xine to a trick mode for fast forward, backwards playback, low latency seeking.
Header declaration:
int xine_trick_mode (xine_stream_t *stream, int mode, int value)
Returns 1 if OK, 0 on error (use xine_get_error
for details).
xine_close :: Stream -> IO ()Source
Free all stream-related resources.
The stream stays valid for new xine_open
.
Header declaration:
void xine_close (xine_stream_t *stream)
xine_engine_set_param :: Engine -> EngineParam -> Int -> IO ()Source
Set engine parameter.
Header declaration:
void xine_engine_set_param (xine_t *self, int param, int value)
xine_engine_get_param :: Engine -> EngineParam -> IO IntSource
Get engine parameter.
Header declaration:
int xine_engine_get_param(xine_t *self, int param)
xine_set_param :: Enum a => Stream -> StreamParam -> a -> IO ()Source
Set stream parameter.
Header declaration:
void xine_set_param (xine_stream_t *stream, int param, int value)
xine_get_param :: Enum a => Stream -> StreamParam -> IO aSource
Get stream parameter.
Header declaration:
int xine_get_param (xine_stream_t *stream, int param)
Information retrieval
data EngineStatus Source
Engine status codes.
xine error codes.
xine_get_error :: Stream -> IO XineErrorSource
Return last error.
Header declaration:
int xine_get_error (xine_stream_t *stream)
xine_get_status :: Stream -> IO EngineStatusSource
Get current xine engine status.
int xine_get_status (xine_stream_t *stream)
xine_get_audio_lang :: Stream -> Int -> IO (Int, String)Source
Find the audio language of the given channel (use -1 for current channel).
Header declaration:
int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang)
lang must point to a buffer of at least XINE_LANG_MAX bytes.
Returns 1 on success, 0 on failure.
xine_get_spu_lang :: Stream -> Int -> IO (Int, String)Source
Find the spu language of the given channel (use -1 for current channel).
Header declaration:
int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang)
lang must point to a buffer of at least XINE_LANG_MAX bytes.
Returns 1 on success, 0 on failure.
xine_get_pos_length :: Stream -> IO (Int, Int, Int, Int)Source
Get position/length information.
Header declaration:
int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time)
Returns 1 on success, 0 on failure.
The different kinds of stream information
The different kinds of metadata