Commit f6f06645 authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/image.c, include/vlc_image.h: new image handler facility making use...

* src/misc/image.c, include/vlc_image.h: new image handler facility making use of decoders and filters to load images.
parent 5a6a1bdf
...@@ -102,6 +102,7 @@ HEADERS_include = \ ...@@ -102,6 +102,7 @@ HEADERS_include = \
include/vlc_config_cat.h \ include/vlc_config_cat.h \
include/vlc_httpd.h \ include/vlc_httpd.h \
include/vlc_tls.h \ include/vlc_tls.h \
include/vlc_image.h \
include/vlc_input.h \ include/vlc_input.h \
include/vlc_interface.h \ include/vlc_interface.h \
include/vlc_keys.h \ include/vlc_keys.h \
...@@ -370,6 +371,7 @@ SOURCES_libvlc_common = \ ...@@ -370,6 +371,7 @@ SOURCES_libvlc_common = \
src/misc/threads.c \ src/misc/threads.c \
src/misc/cpu.c \ src/misc/cpu.c \
src/misc/configuration.c \ src/misc/configuration.c \
src/misc/image.c \
src/misc/iso_lang.c \ src/misc/iso_lang.c \
src/misc/iso-639_def.h \ src/misc/iso-639_def.h \
src/misc/messages.c \ src/misc/messages.c \
......
...@@ -304,6 +304,8 @@ typedef struct subpicture_sys_t subpicture_sys_t; ...@@ -304,6 +304,8 @@ typedef struct subpicture_sys_t subpicture_sys_t;
typedef struct subpicture_region_t subpicture_region_t; typedef struct subpicture_region_t subpicture_region_t;
typedef struct text_style_t text_style_t; typedef struct text_style_t text_style_t;
typedef struct image_handler_t image_handler_t;
/* Stream output */ /* Stream output */
typedef struct sout_instance_t sout_instance_t; typedef struct sout_instance_t sout_instance_t;
typedef struct sout_instance_sys_t sout_instance_sys_t; typedef struct sout_instance_sys_t sout_instance_sys_t;
......
/*****************************************************************************
* vlc_image.h : wrapper for image reading/writing facilities
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.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
* (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.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _VLC_IMAGE_H
#define _VLC_IMAGE_H 1
#include "vlc_video.h"
struct image_handler_t
{
picture_t * (*pf_read) ( image_handler_t *, block_t *,
video_format_t *, video_format_t * );
picture_t * (*pf_read_url) ( image_handler_t *, const char *,
video_format_t *, video_format_t * );
block_t* (*pf_write) ( image_handler_t *, picture_t *,
video_format_t *, video_format_t * );
int (*pf_write_url) ( image_handler_t *, picture_t *,
video_format_t *, video_format_t *, const char * );
/* Private properties */
vlc_object_t *p_parent;
decoder_t *p_dec;
encoder_t *p_enc;
filter_t *p_filter;
};
VLC_EXPORT( image_handler_t *, __image_HandlerCreate, ( vlc_object_t * ) );
#define image_HandlerCreate( a ) __image_HandlerCreate( VLC_OBJECT(a) )
VLC_EXPORT( void, image_HandlerDelete, ( image_handler_t * ) );
#define image_Read( a, b, c, d ) a->pf_read( a, b, c, d )
#define image_ReadUrl( a, b, c, d ) a->pf_read_url( a, b, c, d )
#define image_Write( a, b, c, d ) a->pf_write( a, b, c, d )
#define image_WriteUrl( a, b, c, d, e ) a->pf_write_url( a, b, c, d, e )
#endif /* _VLC_IMAGE_H */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment