Video::Xine::Stream - Audio-video stream for Xine
use Video::Xine; use Video::Xine::Stream; my $stream = Video::Xine::Stream->new($xine, $audio, $video); $stream->open('file://foo/bar');
These are methods which can be used on the Video::Xine::Stream class and object.
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.
$audio_port
$video_port
Returns the video port, also known as the video driver.
$stream->master_slave( $slave_stream, $affection )
Sets up a master-slave relationship with $slave_stream. You can import the constants for $affection with the ':master_slave_constants' tag. They are XINE_MASTER_SLAVE_PLAY, XINE_MASTER_SLAVE_STOP, and XINE_MASTER_SLAVE_SPEED.
$affection
$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.
$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.
$start_pos
$start_time
$stream->stop()
Stops the stream.
$stream->close()
Close the stream. You can re-use the same stream again and again.
$stream->eject()
Eject the stream, if possible. Returns 1 if OK, 0 if error.
($pos_pct, $pos_time, $length_millis) = $stream->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_millis gives the total length of the stream in milliseconds.
$pos_pct
$pos_time
$length_millis
Returns the play status of the stream. It will return one of the following constants, which are exported in the tag ':status_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
$s->set_param($param, $value)
Sets a parameter on the stream. $param should be a xine parameter constant. See "PARAMETER CONSTANTS" for a list of available parameter constants.
$param
my $param = $s->get_param($param)
Returns a parameter from the stream. $param should be a xine parameter constant.
my $info = $s->get_info($info_const)
Returns information about the stream, such as its bit rate, audio channels, width, or height. $info_const should be a xine info constant.
$info_const
my $meta_info = $stream->get_meta_info($meta_info_const)
Returns meta-information about the stream, such as its title. $meta_info_const should be a xine meta info constant; see META CONSTANTS below for details.
$meta_info_const
These constants are exported with the :param_constants tag.
:param_constants
XINE_PARAM_SPEED
XINE_PARAM_AV_OFFSET
XINE_PARAM_AUDIO_CHANNEL_LOGICAL
XINE_PARAM_SPU_CHANNEL
XINE_PARAM_VIDEO_CHANNEL
XINE_PARAM_AUDIO_VOLUME
XINE_PARAM_AUDIO_MUTE
XINE_PARAM_AUDIO_COMPR_LEVEL
XINE_PARAM_AUDIO_AMP_LEVEL
XINE_PARAM_AUDIO_REPORT_LEVEL
XINE_PARAM_VERBOSITY
XINE_PARAM_SPU_OFFSET
XINE_PARAM_IGNORE_VIDEO
XINE_PARAM_IGNORE_AUDIO
XINE_PARAM_IGNORE_SPU
XINE_PARAM_BROADCASTER_PORT
XINE_PARAM_METRONOM_PREBUFFER
XINE_PARAM_EQ_30HZ
XINE_PARAM_EQ_60HZ
XINE_PARAM_EQ_125HZ
XINE_PARAM_EQ_250HZ
XINE_PARAM_EQ_500HZ
XINE_PARAM_EQ_1000HZ
XINE_PARAM_EQ_2000HZ
XINE_PARAM_EQ_4000HZ
XINE_PARAM_EQ_8000HZ
XINE_PARAM_EQ_16000HZ
XINE_PARAM_AUDIO_CLOSE_DEVICE
XINE_PARAM_AUDIO_AMP_MUTE
XINE_PARAM_FINE_SPEED
Exported in the tag 'info_constants'.
XINE_STREAM_INFO_BITRATE
XINE_STREAM_INFO_SEEKABLE
XINE_STREAM_INFO_VIDEO_WIDTH
XINE_STREAM_INFO_VIDEO_HEIGHT
XINE_STREAM_INFO_VIDEO_RATIO
XINE_STREAM_INFO_VIDEO_CHANNELS
XINE_STREAM_INFO_VIDEO_STREAMS
XINE_STREAM_INFO_VIDEO_BITRATE
XINE_STREAM_INFO_VIDEO_FOURCC
XINE_STREAM_INFO_VIDEO_HANDLED
XINE_STREAM_INFO_FRAME_DURATION
XINE_STREAM_INFO_AUDIO_CHANNELS
XINE_STREAM_INFO_AUDIO_BITS
XINE_STREAM_INFO_AUDIO_SAMPLERATE
XINE_STREAM_INFO_AUDIO_BITRATE
XINE_STREAM_INFO_AUDIO_FOURCC
XINE_STREAM_INFO_AUDIO_HANDLED
XINE_STREAM_INFO_HAS_CHAPTERS
XINE_STREAM_INFO_HAS_VIDEO
XINE_STREAM_INFO_HAS_AUDIO
XINE_STREAM_INFO_IGNORE_VIDEO
XINE_STREAM_INFO_IGNORE_AUDIO
XINE_STREAM_INFO_IGNORE_SPU
XINE_STREAM_INFO_VIDEO_HAS_STILL
XINE_STREAM_INFO_MAX_AUDIO_CHANNEL
XINE_STREAM_INFO_MAX_SPU_CHANNEL
XINE_STREAM_INFO_AUDIO_MODE
XINE_STREAM_INFO_SKIPPED_FRAMES
XINE_STREAM_INFO_DISCARDED_FRAMES
XINE_STREAM_INFO_VIDEO_AFD
XINE_STREAM_INFO_DVD_TITLE_NUMBER
XINE_STREAM_INFO_DVD_TITLE_COUNT
XINE_STREAM_INFO_DVD_CHAPTER_NUMBER
XINE_STREAM_INFO_DVD_CHAPTER_COUNT
XINE_STREAM_INFO_DVD_ANGLE_NUMBER
XINE_STREAM_INFO_DVD_ANGLE_COUNT
Exported with the :meta_constants tag.
:meta_constants
XINE_META_INFO_TITLE
XINE_META_INFO_COMMENT
XINE_META_INFO_ARTIST
XINE_META_INFO_GENRE
XINE_META_INFO_ALBUM
XINE_META_INFO_YEAR
XINE_META_INFO_VIDEOCODEC
XINE_META_INFO_AUDIOCODEC
XINE_META_INFO_SYSTEMLAYER
XINE_META_INFO_INPUT_PLUGIN
XINE_META_INFO_CDINDEX_DISCID
XINE_META_INFO_TRACK_NUMBER
Video::Xine
To install Video::Xine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Video::Xine
CPAN shell
perl -MCPAN -e shell install Video::Xine
For more information on module installation, please visit the detailed CPAN module installation guide.