1 /*****************************************************************************
2 * video.hpp: video part of an media player
3 *****************************************************************************
4 * Copyright (C) 2010 the VideoLAN team
7 * Authors: RĂ©mi Duraffort <ivoire@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef LIBVLCPP_VIDEO_HPP
25 #define LIBVLCPP_VIDEO_HPP
27 #include <vlc/libvlc.h>
28 #include <vlc/libvlc_media.h>
29 #include <vlc/libvlc_media_player.h>
41 * @param player: the player handling the video
43 Video( libvlc_media_player_t *player );
49 * Get the height of the video
50 * @return the height of the video
55 * Get the width of the video
56 * @return the widht of the video
61 * Get the current scaling factor of the video
62 * @return the current scaling factor or 0 if the video is set to fit to the output
67 * Set the scaling factor
68 * @param factor: the new scaling factor
70 void setScale( float factor );
73 * Get the current video aspect ratio
74 * @return the aspect ratio
79 * set the video aspect ratio
80 * @param aspect_ratio: the aspect ratio
82 void setAspectRatio( const char *aspect_ratio );
85 * Get the current video subtitle
86 * @return the video subtitle
91 * Get the number of available video subtitles
92 * @return the number of subtitle
97 * Set the video subtitle index
98 * @param spu: the video subtitle
100 void setSpu( int spu );
102 /** Get informations about the current spu */
105 * Set the subtitle file
106 * @param subtitle_file: the new subtitle file
108 void setSubtitleFile( const char *subtitle_file );
110 /** Get title description */
112 /** Get chapter description */
115 * Get the current crop filter geometry
116 * @return the crop geonmetry
118 char *cropGeometry();
121 * Set the crop geometry
122 * @param geometry: the new crop filter geometry
124 void setCropGeometry( const char *geometry );
127 * Get the current video track
128 * @return the video track
133 * Get the number of video tracks
134 * @return the number of video tracks
139 * Set the video track
140 * @param track: the video track
142 void setTrack( int track );
144 /** get track description */
147 * Take a snapshot and save it to a file
148 * @param filepath: path where to save the file
149 * @param widht: widht of the snapshot
150 * @param height: height of the snapshot
152 void snapshot( const char *filepath, int widht, int height );
155 * Enable or disable deinterlace filter and select the deinterlace filter to use
156 * @param enable: true to enable the deinterlace filter
157 * @param mode: the deinterlace filter to use
159 void deinterlace( int enable, const char *mode );
162 /** The media player instance of libvlc */
163 libvlc_media_player_t *m_player;
168 #endif // LIBVLCPP_VIDEO_HPP