xine-0.0.0.4: Bindings to xine-lib

Portabilitynot portable
Stabilityunstable
MaintainerJoachim Fasting <joachim.fasting@gmail.com>

Xine.Foreign

Contents

Description

A simple binding to xine-lib. Low-level bindings. Made for xine-lib version 1.1.18.1

Synopsis

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 Engine Source

An opaque type, never dereferenced on the Haskell side XXX: document me

data AudioPort Source

An opaque type, never dereferenced on the Haskell side XXX: document me

data VideoPort Source

An opaque type, never dereferenced on the Haskell side XXX: document me

data VisualType Source

Valid visual types

Constructors

None 
X11 
X11_2 
AA 
FB 
GTK 
DFB 
PM 
DirectX 
CACA 
MacOSX 
XCB 
Raw 

xine_new :: IO EngineSource

Pre-init the xine engine.

Header declaration:

xine_t *xine_new (void)

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 Stream Source

An opaque type, never dereferenced on the Haskell side

data Speed Source

Values for XINE_PARAM_SPEED parameter.

Constructors

Pause 
Slow4 
Slow2 
Normal 
Fast2 
Fast4 

Instances

data NormalSpeed Source

Value for XINE_PARAM_FINE_SPEED

Constructors

NormalSpeed 

Instances

data Zoom Source

Values for XINE_PARAM_VO_ZOOM_

Constructors

ZoomStep 
ZoomMax 
ZoomMin 

Instances

data AspectRatio Source

Values for XINE_PARAM_VO_ASPECT_RATIO

Instances

data DemuxStrategy Source

Stream format detection strategies

Instances

data Verbosity Source

Verbosity setting

Instances

type MRL = StringSource

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

data EngineParam Source

Engine parameter enumeration.

Constructors

EngineVerbosity 

Instances

data Affection Source

The affection determines which actions on the master stream are also to be applied to the slave stream. See xine_stream_master_slave.

Instances

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_stop :: Stream -> IO ()Source

Stop stream playback. The stream stays valid for new xine_open or xine_play.

Header declaration:

void xine_stop (xine_stream *stream)

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.

Constructors

Idle 
Stopped 
Playing 
Quitting 

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.

xine_get_stream_info :: Stream -> InfoType -> IO IntSource

Get information about the stream.

Header declaration:

int32_t xine_get_stream_info (xine_stream_t *stream, int info)

xine_get_meta_info :: Stream -> MetaType -> IO StringSource

Get meta information about the stream.

Header declaration:

const char *xine_get_meta_info (xine_stream_t *stream, int info)