mediacontrol_internal.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * control.h: private header for mediacontrol
00003  *****************************************************************************
00004  * Copyright (C) 2005 the VideoLAN team
00005  * $Id: f248a8b61f69c7d78800659226fffd70a79974d6 $
00006  *
00007  * Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
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  * Allocate a RGBPicture structure.
00050  * \param datasize: the size of the data
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

Generated on Wed Mar 31 08:05:27 2010 for VLC by  doxygen 1.5.6