00001 /***************************************************************************** 00002 * vlc_vod.h: interface for VoD server modules 00003 ***************************************************************************** 00004 * Copyright (C) 2000, 2001 the VideoLAN team 00005 * $Id: 9b136108f2b844a971087a407f249ed3f5c5cf9b $ 00006 * 00007 * Author: Gildas Bazin <gbazin@videolan.org> 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_VOD_H 00025 #define VLC_VOD_H 1 00026 00027 /** 00028 * \file 00029 * This file defines an interface for VOD server modules in vlc 00030 */ 00031 00032 /** 00033 * \defgroup vod Video On Demand (VOD) 00034 * \ingroup server 00035 * Video On Demand (VOD) functionality is provided from VLM. 00036 * @{ 00037 */ 00038 00039 struct vod_t 00040 { 00041 VLC_COMMON_MEMBERS 00042 00043 /* Module properties */ 00044 module_t *p_module; 00045 vod_sys_t *p_sys; 00046 00047 vod_media_t * (*pf_media_new) ( vod_t *, const char *, input_item_t * ); 00048 void (*pf_media_del) ( vod_t *, vod_media_t * ); 00049 int (*pf_media_add_es)( vod_t *, vod_media_t *, es_format_t * ); 00050 void (*pf_media_del_es)( vod_t *, vod_media_t *, es_format_t * ); 00051 00052 /* Owner properties */ 00053 int (*pf_media_control) ( void *, vod_media_t *, const char *, int, va_list ); 00054 void *p_data; 00055 }; 00056 00057 static inline int vod_MediaControl( vod_t *p_vod, vod_media_t *p_media, 00058 const char *psz_id, int i_query, ... ) 00059 { 00060 va_list args; 00061 int i_result; 00062 00063 if( !p_vod->pf_media_control ) return VLC_EGENERIC; 00064 00065 va_start( args, i_query ); 00066 i_result = p_vod->pf_media_control( p_vod->p_data, p_media, psz_id, 00067 i_query, args ); 00068 va_end( args ); 00069 return i_result; 00070 } 00071 00072 enum vod_query_e 00073 { 00074 VOD_MEDIA_PLAY, /* arg1= char * res= */ 00075 VOD_MEDIA_PAUSE, /* arg1= res= */ 00076 VOD_MEDIA_STOP, /* arg1= res=can fail */ 00077 VOD_MEDIA_SEEK, /* arg1= double res= */ 00078 VOD_MEDIA_REWIND, /* arg1= double res= */ 00079 VOD_MEDIA_FORWARD, /* arg1= double res= */ 00080 }; 00081 00082 /** 00083 * @} 00084 */ 00085 00086 #endif
1.5.6