X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcontrol%2Fmediacontrol_internal.h;h=f248a8b61f69c7d78800659226fffd70a79974d6;hb=618605e3423f647ccbab98a12d4c6827b5572120;hp=374abd7d5c21a0f75338539c592343d3823bcdb7;hpb=70bb5bccb040d4bf7870177f2c83bad8008bc9e1;p=vlc diff --git a/src/control/mediacontrol_internal.h b/src/control/mediacontrol_internal.h index 374abd7d5c..f248a8b61f 100644 --- a/src/control/mediacontrol_internal.h +++ b/src/control/mediacontrol_internal.h @@ -2,7 +2,7 @@ * control.h: private header for mediacontrol ***************************************************************************** * Copyright (C) 2005 the VideoLAN team - * $Id: vlc.h 10101 2005-03-02 16:47:31Z robux4 $ + * $Id$ * * Authors: Olivier Aubert * @@ -30,40 +30,48 @@ extern "C" { #include #include -#include "libvlc_internal.h" +#include #include struct mediacontrol_Instance { - struct libvlc_instance_t * p_instance; - playlist_t *p_playlist; + libvlc_instance_t * p_instance; + libvlc_media_player_t * p_media_player; }; -VLC_PRIVATE_API vlc_int64_t mediacontrol_unit_convert( input_thread_t *p_input, - mediacontrol_PositionKey from, - mediacontrol_PositionKey to, - vlc_int64_t value ); -VLC_PRIVATE_API vlc_int64_t mediacontrol_position2microsecond( - input_thread_t *p_input, - const mediacontrol_Position *pos ); +libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_player, + mediacontrol_PositionKey from, + mediacontrol_PositionKey to, + int64_t value ); +libvlc_time_t private_mediacontrol_position2microsecond( libvlc_media_player_t *p_media_player, + const mediacontrol_Position *pos ); -#define RAISE( c, m ) if( exception ) { exception->code = c; \ +/** + * Allocate a RGBPicture structure. + * \param datasize: the size of the data + */ +mediacontrol_RGBPicture *private_mediacontrol_RGBPicture__alloc( int datasize ); + +mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long, int64_t l_date, char *, int); + + +#define RAISE( c, m ) if( exception ) { exception->code = c; \ exception->message = strdup(m); } -#define RAISE_NULL( c, m ) { RAISE( c, m ); return NULL; } -#define RAISE_VOID( c, m ) { RAISE( c, m ); return; } +#define RAISE_NULL( c, m ) do{ RAISE( c, m ); return NULL; } while(0) +#define RAISE_VOID( c, m ) do{ RAISE( c, m ); return; } while(0) -#define HANDLE_LIBVLC_EXCEPTION_VOID( e ) if( libvlc_exception_raised( e ) ) { \ - RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \ +#define HANDLE_LIBVLC_EXCEPTION_VOID( e ) if( libvlc_exception_raised( e ) ) { \ + RAISE( mediacontrol_InternalException, libvlc_errmsg()); \ libvlc_exception_clear( e ); \ return; } -#define HANDLE_LIBVLC_EXCEPTION_NULL( e ) if( libvlc_exception_raised( e ) ) { \ - RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \ +#define HANDLE_LIBVLC_EXCEPTION_NULL( e ) if( libvlc_exception_raised( e ) ) { \ + RAISE( mediacontrol_InternalException, libvlc_errmsg()); \ libvlc_exception_clear( e ); \ return NULL; } #define HANDLE_LIBVLC_EXCEPTION_ZERO( e ) if( libvlc_exception_raised( e ) ) { \ - RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \ + RAISE( mediacontrol_InternalException, libvlc_errmsg()); \ libvlc_exception_clear( e ); \ return 0; }