1 /*****************************************************************************
2 * video.hpp: video part of the 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>
40 * Get the height of the video
41 * @return the height of the video
46 * Get the width of the video
47 * @return the widht of the video
52 * Get the current scaling factor of the video
53 * @return the current scaling factor or 0 if the video is set to fit to the output
58 * Set the scaling factor
59 * @param factor: the new scaling factor
61 void setScale( float factor );
64 * Get the current video aspect ratio
65 * @return the aspect ratio
70 * set the video aspect ratio
71 * @param aspect_ratio: the aspect ratio
73 void setAspectRatio( const char *aspect_ratio );
76 * Get the current video subtitle
77 * @return the video subtitle
82 * Get the number of available video subtitles
83 * @return the number of subtitle
88 * Set the video subtitle index
89 * @param spu: the video subtitle
91 void setSpu( int spu );
93 /** Get informations about the current spu */
96 * Set the subtitle file
97 * @param subtitle_file: the new subtitle file
99 void setSubtitleFile( const char *subtitle_file );
101 /** Get title description */
103 /** Get chapter description */
106 * Get the current crop filter geometry
107 * @return the crop geonmetry
109 char *cropGeometry();
112 * Set the crop geometry
113 * @param geometry: the new crop filter geometry
115 void setCropGeometry( const char *geometry );
118 * Get the current video track
119 * @return the video track
124 * Get the number of video tracks
125 * @return the number of video tracks
130 * Set the video track
131 * @param track: the video track
133 void setTrack( int track );
135 /** get track description */
138 * Take a snapshot and save it to a file
139 * @param num: the video output id (0 for the first/only one)
140 * @param filepath: path where to save the file
141 * @param widht: widht of the snapshot
142 * @param height: height of the snapshot
143 * @return 0 on success, -1 if the video output was not found
145 int snapshot( int num, const char *filepath, int widht, int height );
148 * Enable or disable deinterlace filter and select the deinterlace filter to use
149 * @param enable: true to enable the deinterlace filter
150 * @param mode: the deinterlace filter to use
152 void deinterlace( int enable, const char *mode );
155 /** The media player instance of libvlc */
156 libvlc_media_player_t *m_player;
159 * The constructor is private so only the MediaPlayer can create an
160 * instance of this class
164 /** Destructor only used by the MediaPlayer associated with this class */
168 * Set the media player. This function can only be used by the MediaPlayer class
169 * @param player: the media player
171 void setMediaPlayer( libvlc_media_player_t *player);
174 friend class MediaPlayer;
179 #endif // LIBVLCPP_VIDEO_HPP