#include <stdlib.h> /* malloc(), free() */
#include <string.h>
-#include <errno.h> /* ENOMEM */
#include <stdio.h>
-#include <ctype.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_player,
mediacontrol_PositionKey from,
if( to == mediacontrol_SampleCount )
{
double f_fps;
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
- f_fps = libvlc_media_player_get_rate( p_media_player, &ex );
+ f_fps = libvlc_media_player_get_rate( p_media_player );
if( f_fps < 0 )
return 0;
else
case mediacontrol_SampleCount:
{
double f_fps;
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
- f_fps = libvlc_media_player_get_rate( p_media_player, &ex );
+ f_fps = libvlc_media_player_get_rate( p_media_player );
if( f_fps < 0 )
return 0;
{
libvlc_time_t l_time = 0;
libvlc_time_t l_pos = 0;
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
- l_time = libvlc_media_player_get_time( p_media_player, &ex );
+ l_time = libvlc_media_player_get_time( p_media_player );
/* Ignore exception, we will assume a 0 time value */
l_pos = private_mediacontrol_unit_convert( p_media_player,
- pos->key,
- mediacontrol_MediaTime,
- pos->value );
+ pos->key,
+ mediacontrol_MediaTime,
+ pos->value );
return 1000 * ( l_time + l_pos );
break;
}
libvlc_time_t l_time = 0;
libvlc_time_t l_length = 0;
libvlc_time_t l_pos = 0;
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
- l_length = libvlc_media_player_get_length( p_media_player, &ex );
+ l_length = libvlc_media_player_get_length( p_media_player );
if( l_length <= 0 )
return 0;
- l_time = libvlc_media_player_get_time( p_media_player, &ex );
+ l_time = libvlc_media_player_get_time( p_media_player );
/* Ignore exception, we will assume a 0 time value */
l_pos = private_mediacontrol_unit_convert( p_media_player,
- pos->key,
- mediacontrol_MediaTime,
- pos->value );
+ pos->key,
+ mediacontrol_MediaTime,
+ pos->value );
return 1000 * ( ( l_time + l_pos ) % l_length );
break;
*/
mediacontrol_RGBPicture*
private_mediacontrol_createRGBPicture( int i_width, int i_height, long i_chroma, int64_t l_date,
- char* p_data, int i_datasize )
+ char* p_data, int i_datasize )
{
mediacontrol_RGBPicture *retval;