The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Video::Xine - Perl interface to libxine

SYNOPSIS

use Video::Xine;

# Create and initialize the Xine object
my $xine = Video::Xine->new(
  config_file => "$ENV{'HOME'}/.xine/config",
);

# Load a video driver
my $video_driver = Video::Xine::Driver::Video->new($xine,"auto",1,$x11_visual);

# Create a new stream (put your video driver under $DRIVER)
my $stream = $xine->stream_new(undef,$DRIVER);

# Open a file on the stream
$stream->open('file://my/movie/file.avi')
  or die "Couldn't open stream: ", $stream->get_error();

# Get the current position (0 .. 65535), position in time, and length
# of stream in milliseconds
my ($pos, $pos_time, $length_time) = $stream->get_pos_length();

# Start the stream playing
$stream->play()
   or die "Couldn't play stream: ", $xine->get_error();

# Play the stream to the end
while ( $stream->get_status() == XINE_STATUS_PLAY ) {
  sleep(1);
}

DESCRIPTION

A perl interface to Xine, the Linux movie player. More properly, an interface to libxine, the development library. Requires installation of libxine.

Xine by itself does not provide a user interface, and neither does this interface. Instead, you must set up the window using your own windowing code, and pass the window information to Xine.

EXPORT

STATUS CONSTANTS

The Status constants are the results for a get_status() call. See xine.h for details.

  • XINE_STATUS_STOP

    Indicates that the stream is stopped.

  • XINE_STATUS_PLAY

    Indicates that the stream is playing.

SEE ALSO

xine(1)

AUTHOR

Stephen Nelson, <steven@localdomain>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Stephen Nelson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 362:

You forgot a '=back' before '=head1'