]> git.sesse.net Git - vlc/blobdiff - include/vlc_picture.h
LGPL
[vlc] / include / vlc_picture.h
index c16ceddb1ff060a6832c85f6cfd0a0c0dd624d9d..75502cab11099d73441f6912c383d0dafe91c7ba 100644 (file)
@@ -1,26 +1,26 @@
 /*****************************************************************************
  * vlc_picture.h: picture definitions
  *****************************************************************************
- * Copyright (C) 1999 - 2009 the VideoLAN team
+ * Copyright (C) 1999 - 2009 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
  *          Olivier Aubert <oaubert 47 videolan d07 org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VLC_PICTURE_H
@@ -114,7 +114,7 @@ struct picture_t
  * with picture_Hold and picture_Release. This default management will release
  * p_sys, p_q, p_data_orig fields if non NULL.
  */
-VLC_EXPORT( picture_t *, picture_New, ( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) );
+VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED;
 
 /**
  * This function will create a new picture using the given format.
@@ -122,7 +122,7 @@ VLC_EXPORT( picture_t *, picture_New, ( vlc_fourcc_t i_chroma, int i_width, int
  * When possible, it is preferred to use this function over picture_New
  * as more information about the format is kept.
  */
-VLC_EXPORT( picture_t *, picture_NewFromFormat, ( const video_format_t *p_fmt ) );
+VLC_API picture_t * picture_NewFromFormat( const video_format_t *p_fmt ) VLC_USED;
 
 /**
  * Resource for a picture.
@@ -148,7 +148,7 @@ typedef struct
  *
  * If the resource is NULL then a plain picture_NewFromFormat is returned.
  */
-VLC_EXPORT( picture_t *, picture_NewFromResource, ( const video_format_t *, const picture_resource_t * ) );
+VLC_API picture_t * picture_NewFromResource( const video_format_t *, const picture_resource_t * ) VLC_USED;
 
 /**
  * This function will force the destruction a picture.
@@ -157,7 +157,7 @@ VLC_EXPORT( picture_t *, picture_NewFromResource, ( const video_format_t *, cons
  * Unless used for reimplementing pf_release, you should not use this
  * function but picture_Release.
  */
-VLC_EXPORT( void, picture_Delete, ( picture_t * ) );
+VLC_API void picture_Delete( picture_t * );
 
 /**
  * This function will increase the picture reference count.
@@ -220,18 +220,18 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_
 }
 
 /**
- * This function will reset a picture informations (properties and quantizers).
+ * This function will reset a picture information (properties and quantizers).
  * It is sometimes useful for reusing pictures (like from a pool).
  */
-VLC_EXPORT( void, picture_Reset, ( picture_t * ) );
+VLC_API void picture_Reset( picture_t * );
 
 /**
  * This function will copy the picture pixels.
  * You can safely copy between pictures that do not have the same size,
  * only the compatible(smaller) part will be copied.
  */
-VLC_EXPORT( void, picture_CopyPixels, ( picture_t *p_dst, const picture_t *p_src ) );
-VLC_EXPORT( void, plane_CopyPixels, ( plane_t *p_dst, const plane_t *p_src ) );
+VLC_API void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src );
+VLC_API void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src );
 
 /**
  * This function will copy both picture dynamic properties and pixels.
@@ -264,7 +264,7 @@ static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src )
  *  - if strictly higher than 0, it will override the dimension.
  * If at most one of them is > 0 then the picture aspect ratio will be kept.
  */
-VLC_EXPORT( int, picture_Export, ( vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt, picture_t *p_picture, vlc_fourcc_t i_format, int i_override_width, int i_override_height ) );
+VLC_API int picture_Export( vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt, picture_t *p_picture, vlc_fourcc_t i_format, int i_override_width, int i_override_height );
 
 /**
  * This function will setup all fields of a picture_t without allocating any
@@ -277,7 +277,20 @@ VLC_EXPORT( int, picture_Export, ( vlc_object_t *p_obj, block_t **pp_image, vide
  *
  * It can be useful to get the properties of planes.
  */
-VLC_EXPORT( int, picture_Setup, ( picture_t *, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) );
+VLC_API int picture_Setup( picture_t *, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den );
+
+
+/**
+ * This function will blend a given subpicture onto a picture.
+ *
+ * The subpicture and all its region must:
+ *  - be absolute.
+ *  - not be ephemere.
+ *  - not have the fade flag.
+ *  - contains only picture (no text rendering).
+ */
+VLC_API void picture_BlendSubpicture( picture_t *, filter_t *p_blend, subpicture_t * );
+
 
 /*****************************************************************************
  * Flags used to describe the status of a picture