vlc_image.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_image.h : wrapper for image reading/writing facilities
00003  *****************************************************************************
00004  * Copyright (C) 2004 the VideoLAN team
00005  * $Id: c5da85dd4e165d52f0f4f10b92b7d7706bae109f $
00006  *
00007  * Authors: 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_IMAGE_H
00025 #define VLC_IMAGE_H 1
00026 
00027 /**
00028  * \file
00029  * This file defines functions and structures for image conversions in vlc
00030  */
00031 
00032 #include <vlc_vout.h>
00033 
00034 # ifdef __cplusplus
00035 extern "C" {
00036 # endif
00037 
00038 struct image_handler_t
00039 {
00040     picture_t * (*pf_read)      ( image_handler_t *, block_t *,
00041                                   video_format_t *, video_format_t * );
00042     picture_t * (*pf_read_url)  ( image_handler_t *, const char *,
00043                                   video_format_t *, video_format_t * );
00044     block_t * (*pf_write)       ( image_handler_t *, picture_t *,
00045                                   video_format_t *, video_format_t * );
00046     int (*pf_write_url)         ( image_handler_t *, picture_t *,
00047                                   video_format_t *, video_format_t *,
00048                                   const char * );
00049 
00050     picture_t * (*pf_convert)   ( image_handler_t *, picture_t *,
00051                                   video_format_t *, video_format_t * );
00052     picture_t * (*pf_filter)    ( image_handler_t *, picture_t *,
00053                                   video_format_t *, const char * );
00054 
00055     /* Private properties */
00056     vlc_object_t *p_parent;
00057     decoder_t *p_dec;
00058     encoder_t *p_enc;
00059     filter_t  *p_filter;
00060 };
00061 
00062 VLC_EXPORT( image_handler_t *, image_HandlerCreate, ( vlc_object_t * ) LIBVLC_USED );
00063 #define image_HandlerCreate( a ) image_HandlerCreate( VLC_OBJECT(a) )
00064 VLC_EXPORT( void, image_HandlerDelete, ( image_handler_t * ) );
00065 
00066 #define image_Read( a, b, c, d ) a->pf_read( a, b, c, d )
00067 #define image_ReadUrl( a, b, c, d ) a->pf_read_url( a, b, c, d )
00068 #define image_Write( a, b, c, d ) a->pf_write( a, b, c, d )
00069 #define image_WriteUrl( a, b, c, d, e ) a->pf_write_url( a, b, c, d, e )
00070 #define image_Convert( a, b, c, d ) a->pf_convert( a, b, c, d )
00071 #define image_Filter( a, b, c, d ) a->pf_filter( a, b, c, d )
00072 
00073 VLC_EXPORT( vlc_fourcc_t, image_Type2Fourcc, ( const char *psz_name ) );
00074 VLC_EXPORT( vlc_fourcc_t, image_Ext2Fourcc, ( const char *psz_name ) );
00075 VLC_EXPORT( vlc_fourcc_t, image_Mime2Fourcc, ( const char *psz_mime ) );
00076 
00077 # ifdef __cplusplus
00078 }
00079 # endif
00080 
00081 #endif /* _VLC_IMAGE_H */

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