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 VLC authors and VideoLAN
00005  * Copyright (C) 2010 Laurent Aimar
00006  * $Id: d448d06f8c9f9c91d70239ff0d07cb5ceac06423 $
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 it
00012  * under the terms of the GNU Lesser General Public License as published by
00013  * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public License
00022  * along with this program; if not, write to the Free Software Foundation,
00023  * 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_API spu_t * spu_Create( vlc_object_t * );
00062 #define spu_Create(a) spu_Create(VLC_OBJECT(a))
00063 VLC_API 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_API void spu_PutSubpicture( spu_t *, subpicture_t * );
00072 
00073 /**
00074  * This function will return an unique subpicture containing the OSD and
00075  * subtitles visibles at the requested date.
00076  *
00077  * \param p_chroma_list is a list of supported chroma for the output (can be NULL)
00078  * \param p_fmt_dst is the format of the picture on which the return subpicture will be rendered.
00079  * \param p_fmt_src is the format of the original(source) video.
00080  *
00081  * The returned value if non NULL must be released by subpicture_Delete().
00082  */
00083 VLC_API subpicture_t * spu_Render( spu_t *, const vlc_fourcc_t *p_chroma_list, const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src, mtime_t render_subtitle_date, mtime_t render_osd_date, bool ignore_osd );
00084 
00085 /**
00086  * It registers a new SPU channel.
00087  */
00088 VLC_API int spu_RegisterChannel( spu_t * );
00089 
00090 /**
00091  * It clears all subpictures associated to a SPU channel.
00092  */
00093 VLC_API void spu_ClearChannel( spu_t *, int );
00094 
00095 /**
00096  * It changes the sub sources list
00097  */
00098 VLC_API void spu_ChangeSources( spu_t *, const char * );
00099 
00100 /**
00101  * It changes the sub filters list
00102  */
00103 VLC_API void spu_ChangeFilters( spu_t *, const char * );
00104 
00105 /** @}*/
00106 
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110 
00111 #endif /* VLC_SPU_H */
00112 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines