vlc_spu.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_spu.h: spu_t definition and functions.
00003  *****************************************************************************
00004  * Copyright (C) 1999-2010 the VideoLAN team
00005  * Copyright (C) 2010 Laurent Aimar
00006  * $Id: f4fded00473ac4f187c2e3c5f8871a0be20cd29e $
00007  *
00008  * Authors: Gildas Bazin <gbazin@videolan.org>
00009  *          Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00024  *****************************************************************************/
00025 
00026 #ifndef VLC_SPU_H
00027 #define VLC_SPU_H 1
00028 
00029 #include <vlc_subpicture.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 /**********************************************************************
00036  * Base SPU structures
00037  **********************************************************************/
00038 /**
00039  * \defgroup spu Subpicture Unit
00040  * This module describes the programming interface for the subpicture unit.
00041  * It includes functions allowing to create/destroy an spu, and render
00042  * subpictures.
00043  * @{
00044  */
00045 
00046 typedef struct spu_private_t spu_private_t;
00047 
00048 /* Default subpicture channel ID */
00049 #define SPU_DEFAULT_CHANNEL (1)
00050 
00051 /**
00052  * Subpicture unit descriptor
00053  */
00054 struct spu_t
00055 {
00056     VLC_COMMON_MEMBERS
00057 
00058     spu_private_t *p;
00059 };
00060 
00061 VLC_EXPORT( spu_t *, spu_Create, ( vlc_object_t * ) );
00062 #define spu_Create(a) spu_Create(VLC_OBJECT(a))
00063 VLC_EXPORT( void, spu_Destroy, ( spu_t * ) );
00064 
00065 /**
00066  * This function sends a subpicture to the spu_t core.
00067  * 
00068  * You cannot use the provided subpicture anymore. The spu_t core
00069  * will destroy it at its convenience.
00070  */
00071 VLC_EXPORT( void, spu_DisplaySubpicture, ( spu_t *, subpicture_t * ) );
00072 
00073 /**
00074  * This function asks the spu_t core a list of subpictures to display.
00075  *
00076  * The returned list can only be used by spu_RenderSubpictures.
00077  */
00078 VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t render_subtitle_date, bool b_subtitle_only ) );
00079 
00080 /**
00081  * This function renders a list of subpicture_t on the provided picture.
00082  *
00083  * \param p_fmt_dst is the format of the destination picture.
00084  * \param p_fmt_src is the format of the original(source) video.
00085  */
00086 VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *,  picture_t *, const video_format_t *p_fmt_dst, subpicture_t *p_list, const video_format_t *p_fmt_src, mtime_t render_subtitle_date ) );
00087 
00088 /**
00089  * It registers a new SPU channel.
00090  */
00091 VLC_EXPORT( int, spu_RegisterChannel, ( spu_t * ) );
00092 
00093 /**
00094  * It clears all subpictures associated to a SPU channel.
00095  */
00096 VLC_EXPORT( void, spu_ClearChannel, ( spu_t *, int ) );
00097 
00098 /**
00099  * It changes the sub filters list
00100  */
00101 VLC_EXPORT( void, spu_ChangeFilters, ( spu_t *, const char * ) );
00102 
00103 /** @}*/
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif /* VLC_SPU_H */
00110 

Generated on Mon Nov 22 07:55:20 2010 for VLC by  doxygen 1.5.6