]> git.sesse.net Git - vlc/blob - bindings/libvlcpp/src/video.hpp
libvlcpp: fix compilation.
[vlc] / bindings / libvlcpp / src / video.hpp
1 /*****************************************************************************
2  * video.hpp: video part of the media player
3  *****************************************************************************
4  * Copyright (C) 2010 the VideoLAN team
5  * $Id$
6  *
7  * Authors: RĂ©mi Duraffort <ivoire@videolan.org>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 #ifndef LIBVLCPP_VIDEO_HPP
25 #define LIBVLCPP_VIDEO_HPP
26
27 #include <vlc/libvlc.h>
28 #include <vlc/libvlc_media.h>
29 #include <vlc/libvlc_media_player.h>
30
31 #include "libvlc.hpp"
32
33 namespace libvlc
34 {
35
36 class Video
37 {
38 public:
39     /**
40      * Constructor
41      * @param player: the player handling the video
42      */
43     Video( libvlc_media_player_t *player );
44
45     /** Destructor */
46     ~Video();
47
48     /**
49      * Get the height of the video
50      * @return the height of the video
51      */
52     int height();
53
54     /**
55      * Get the width of the video
56      * @return the widht of the video
57      */
58     int width();
59
60     /**
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
63      */
64     float scale();
65
66     /**
67      * Set the scaling factor
68      * @param factor: the new scaling factor
69      */
70     void setScale( float factor );
71
72     /**
73      * Get the current video aspect ratio
74      * @return the aspect ratio
75      */
76     char *aspectRatio();
77
78     /**
79      * set the video aspect ratio
80      * @param aspect_ratio: the aspect ratio
81      */
82     void setAspectRatio( const char *aspect_ratio );
83
84     /**
85      * Get the current video subtitle
86      * @return the video subtitle
87      */
88     int spu();
89
90     /**
91      * Get the number of available video subtitles
92      * @return the number of subtitle
93      */
94     int spuCount();
95
96     /**
97      * Set the video subtitle index
98      * @param spu: the video subtitle
99      */
100     void setSpu( int spu );
101
102     /** Get informations about the current spu */
103
104     /**
105      * Set the subtitle file
106      * @param subtitle_file: the new subtitle file
107      */
108     void setSubtitleFile( const char *subtitle_file );
109
110     /** Get title description */
111
112     /** Get chapter description */
113
114     /**
115      * Get the current crop filter geometry
116      * @return the crop geonmetry
117      */
118     char *cropGeometry();
119
120     /**
121      * Set the crop geometry
122      * @param geometry: the new crop filter geometry
123      */
124     void setCropGeometry( const char *geometry );
125
126     /**
127      * Get the current video track
128      * @return the video track
129      */
130     int track();
131
132     /**
133      * Get the number of video tracks
134      * @return the number of video tracks
135      */
136     int trackCount();
137
138     /**
139      * Set the video track
140      * @param track: the video track
141      */
142     void setTrack( int track );
143
144     /** get track description */
145
146     /**
147      * Take a snapshot and save it to a file
148      * @param num: the video output id (0 for the first/only one)
149      * @param filepath: path where to save the file
150      * @param widht: widht of the snapshot
151      * @param height: height of the snapshot
152      * @return 0 on success, -1 if the video output was not found
153      */
154     int snapshot( int num, const char *filepath, int widht, int height );
155
156     /**
157      * Enable or disable deinterlace filter and select the deinterlace filter to use
158      * @param enable: true to enable the deinterlace filter
159      * @param mode: the deinterlace filter to use
160      */
161     void deinterlace( int enable, const char *mode );
162
163 private:
164     /** The media player instance of libvlc */
165     libvlc_media_player_t *m_player;
166 };
167
168 };
169
170 #endif // LIBVLCPP_VIDEO_HPP
171