NAME

Video::Xine::Stream

METHODS

These are methods which can be used on the Video::Xine::Stream class and object.

new()

new($xine, $audio_port, $video_port)

Creates a new Stream object. The $audio_port and $video_port options are optional and default to automatically-selected drivers.

get_video_port()

Returns the video port, also known as the video driver.

open()

$stream->open($mrl)

Opens the stream to an MRL, which is a URL-like construction used by Xine to locate media files. See the xine documentation for details.

play()

$stream->play($start_pos, $start_time)

Starts playing the stream at a specific position or specific time. Both $start_pos and $start_time are optional and default to 0.

stop()

$stream->stop()

Stops the stream.

close()

$stream->close()

Close the stream. You can re-use the same stream again and again.

get_pos_length()

($pos_pct, $pos_time, $length_time) = $s->get_pos_length();

Gets position / length information. $pos_pct is a value between 1 and 65535 indicating how far we've proceeded through the stream. $pos_time gives how far we've proceeded through the stream in milliseconds, and $length_time gives the total length of the stream in milliseconds.

get_status()

Returns the play status of the stream. It will return one of the following constants, which are exported in the tag ':status_constants':

STREAM CONSTANTS

  • XINE_STATUS_IDLE

    The stream is idle.

  • XINE_STATUS_STOP

    Indicates that the stream is stopped.

  • XINE_STATUS_PLAY

    Indicates that the stream is playing.

  • XINE_STATUS_QUIT

set_param()

$s->set_param($param, $value)

Sets a parameter on the stream. $param should be a xine parameter constant. See xine.h for details.

get_param()

$s->get_param($param)

Returns a parameter from the stream. $param should be a xine parameter constant.