00001 /***************************************************************************** 00002 * vlc_vod.h: interface for VoD server modules 00003 ***************************************************************************** 00004 * Copyright (C) 2000, 2001 the VideoLAN team 00005 * $Id: vlc_vod.h 11664 2005-07-09 06:17:09Z courmisch $ 00006 * 00007 * Author: Gildas Bazin <[email protected]> 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef _VLC_VOD_H 00025 #define _VLC_VOD_H 1 00026 00027 struct vod_t 00028 { 00029 VLC_COMMON_MEMBERS 00030 00031 /* Module properties */ 00032 module_t *p_module; 00033 vod_sys_t *p_sys; 00034 00035 vod_media_t * (*pf_media_new) ( vod_t *, char *, input_item_t * ); 00036 void (*pf_media_del) ( vod_t *, vod_media_t * ); 00037 int (*pf_media_add_es)( vod_t *, vod_media_t *, es_format_t * ); 00038 void (*pf_media_del_es)( vod_t *, vod_media_t *, es_format_t * ); 00039 00040 /* Owner properties */ 00041 int (*pf_media_control) ( void *, vod_media_t *, char *, int, va_list ); 00042 void *p_data; 00043 }; 00044 00045 static inline int vod_MediaControl( vod_t *p_vod, vod_media_t *p_media, 00046 char *psz_id, int i_query, ... ) 00047 { 00048 va_list args; 00049 int i_result; 00050 00051 if( !p_vod->pf_media_control ) return VLC_EGENERIC; 00052 00053 va_start( args, i_query ); 00054 i_result = p_vod->pf_media_control( p_vod->p_data, p_media, psz_id, 00055 i_query, args ); 00056 va_end( args ); 00057 return i_result; 00058 } 00059 00060 enum vod_query_e 00061 { 00062 VOD_MEDIA_PLAY, /* arg1= double * res= */ 00063 VOD_MEDIA_PAUSE, /* arg1= double * res= */ 00064 VOD_MEDIA_STOP, /* arg1= double res=can fail */ 00065 VOD_MEDIA_SEEK, /* arg1= double * res= */ 00066 }; 00067 00068 #endif
1.4.2