Video::Xine::OSD - Xine onscreen display
These methods are used for the Xine on-screen display.
my $osd = Video::Xine::OSD->new($stream, $x, $y, $width, $height);
Creates a new OSD.
my $caps = $osd->get_capabilities(); print "Got freetype2" if ($caps & XINE_OSD_CAP_FREETYPE2);
Returns a number indicating the OSD's capabilities as flags. Import the :cap_constants tag to get the flag constants. See EXPORTS for details.
:cap_constants
$osd->clear()
Clears out the on-screen display.
$osd->draw_text(x => 0, y => 0, text => 'hello world', color_base => 1)
Draw text on the on-screen display. Set the font with set_font() before calling this method, or no text will be drawn.
set_font()
$osd->set_font($font_name, $font_size);
Sets the font and font size. $font_name can be either a straight name or a path to a TrueType font file. $font_size is the point size of the font. The Xine header seems to want you to make this a multiple of 11; not sure why.
$font_name
$font_size
Returns true on success, false on failure.
$osd->show();
Renders the OSD onto the screen.
$osd->hide();
Hides the OSD from the screen.
None by default.
The tag :cap_constants exports constants for OSD capabilities for use with the get_capabilities() method:
XINE_OSD_CAP_FREETYPE2
XINE_OSD_CAP_UNSCALED
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.