* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#include <cstdlib>
#include "video.hpp"
#include "exception.hpp"
float Video::scale()
{
- Exception ex;
- return libvlc_video_get_scale( m_player, &ex.ex );
+ return libvlc_video_get_scale( m_player );
}
char *Video::aspectRatio()
{
- Exception ex;
- return libvlc_video_get_aspect_ratio( m_player, &ex.ex );
+ return libvlc_video_get_aspect_ratio( m_player );
}
void Video::setAspectRatio( const char *aspect_ratio )
{
- Exception ex;
- libvlc_video_set_aspect_ratio( m_player, aspect_ratio, &ex.ex );
+ libvlc_video_set_aspect_ratio( m_player, aspect_ratio );
}
int Video::spu()
{
- Exception ex;
- return libvlc_video_get_spu( m_player, &ex.ex );
+ return libvlc_video_get_spu( m_player );
}
int Video::spuCount()
{
- Exception ex;
- return libvlc_video_get_spu_count( m_player, &ex.ex );
+ return libvlc_video_get_spu_count( m_player );
}
void Video::setSpu( int spu )
{
- Exception ex;
- libvlc_video_set_spu( m_player, spu, &ex.ex );
+ libvlc_video_set_spu( m_player, spu );
}
void Video::setSubtitleFile( const char *subtitle_file )
char *Video::cropGeometry()
{
- Exception ex;
- return libvlc_video_get_crop_geometry( m_player, &ex.ex );
+ return libvlc_video_get_crop_geometry( m_player );
}
void Video::setCropGeometry( const char *geometry )
{
- Exception ex;
- libvlc_video_set_crop_geometry( m_player, geometry, &ex.ex );
+ libvlc_video_set_crop_geometry( m_player, geometry );
}
int Video::track()
{
- Exception ex;
- return libvlc_video_get_track( m_player, &ex.ex );
+ return libvlc_video_get_track( m_player );
}
int Video::trackCount()
void Video::setTrack( int track )
{
- Exception ex;
- libvlc_video_set_track( m_player, track, &ex.ex );
+ libvlc_video_set_track( m_player, track );
}
-void Video::snapshot( const char *filepath, int with, int height )
+int Video::snapshot( int num, const char *filepath, int with, int height )
{
- Exception ex;
- libvlc_video_take_snapshot( m_player, filepath, with, height, &ex.ex );
+ return libvlc_video_take_snapshot( m_player, num, filepath, with, height );
}
void Video::deinterlace( int enable, const char *mode )
{
- Exception ex;
- libvlc_video_set_deinterlace( m_player, enable, mode, &ex.ex );
+ if( enable )
+ libvlc_video_set_deinterlace( m_player, mode );
+ else
+ libvlc_video_set_deinterlace( m_player, NULL );
}