mediacontrol_internal.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _VLC_MEDIACONTROL_INTERNAL_H
00025 #define _VLC_MEDIACONTROL_INTERNAL_H 1
00026
00027 # ifdef __cplusplus
00028 extern "C" {
00029 # endif
00030
00031 #include <vlc/vlc.h>
00032 #include <vlc/mediacontrol_structures.h>
00033 #include <vlc/libvlc_structures.h>
00034 #include <vlc/libvlc.h>
00035
00036 struct mediacontrol_Instance {
00037 libvlc_instance_t * p_instance;
00038 libvlc_media_player_t * p_media_player;
00039 };
00040
00041 libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_player,
00042 mediacontrol_PositionKey from,
00043 mediacontrol_PositionKey to,
00044 int64_t value );
00045 libvlc_time_t private_mediacontrol_position2microsecond( libvlc_media_player_t *p_media_player,
00046 const mediacontrol_Position *pos );
00047
00048
00049
00050
00051
00052 mediacontrol_RGBPicture *private_mediacontrol_RGBPicture__alloc( int datasize );
00053
00054 mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long, int64_t l_date, char *, int);
00055
00056
00057 #define RAISE( c, m ) if( exception ) { exception->code = c; \
00058 exception->message = strdup(m); }
00059
00060 #define RAISE_NULL( c, m ) do{ RAISE( c, m ); return NULL; } while(0)
00061 #define RAISE_VOID( c, m ) do{ RAISE( c, m ); return; } while(0)
00062
00063 #define HANDLE_LIBVLC_EXCEPTION_VOID( e ) if( libvlc_exception_raised( e ) ) { \
00064 RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
00065 libvlc_exception_clear( e ); \
00066 return; }
00067
00068 #define HANDLE_LIBVLC_EXCEPTION_NULL( e ) if( libvlc_exception_raised( e ) ) { \
00069 RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
00070 libvlc_exception_clear( e ); \
00071 return NULL; }
00072
00073 #define HANDLE_LIBVLC_EXCEPTION_ZERO( e ) if( libvlc_exception_raised( e ) ) { \
00074 RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
00075 libvlc_exception_clear( e ); \
00076 return 0; }
00077
00078
00079 # ifdef __cplusplus
00080 }
00081 # endif
00082
00083 #endif