/*****************************************************************************
- * vlc_video.h: common video definitions
+ * vlc_vout.h: common video definitions
*****************************************************************************
- * Copyright (C) 1999 - 2008 the VideoLAN team
+ * Copyright (C) 1999 - 2008 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_VOUT_H_
*/
/**
- * Video ouput thread private structure
+ * Vout configuration
+ */
+typedef struct {
+ vout_thread_t *vout;
+ vlc_object_t *input;
+ bool change_fmt;
+ const video_format_t *fmt;
+ unsigned dpb_size;
+} vout_configuration_t;
+
+/**
+ * Video output thread private structure
*/
typedef struct vout_thread_sys_t vout_thread_sys_t;
* is represented by a video output thread, and described using the following
* structure.
*/
-struct vout_thread_t
-{
+struct vout_thread_t {
VLC_COMMON_MEMBERS
/* Private vout_thread data */
#define VOUT_ALIGN_BOTTOM 0x0008
#define VOUT_ALIGN_VMASK 0x000C
-/* scaling factor (applied to i_zoom in vout_thread_t) */
-#define ZOOM_FP_FACTOR 1000
-
/*****************************************************************************
* Prototypes
*****************************************************************************/
/**
- * This function will
- * - returns a suitable vout (if requested by a non NULL p_fmt)
- * - recycles an old vout (if given) by either destroying it or by saving it
- * for latter usage.
+ * Returns a suitable vout or release the given one.
*
- * The purpose of this function is to avoid unnecessary creation/destruction of
- * vout (and to allow optional vout reusing).
+ * If cfg->fmt is non NULL and valid, a vout will be returned, reusing cfg->vout
+ * is possible, otherwise it returns NULL.
+ * If cfg->vout is not used, it will be closed and released.
*
- * You can call vout_Request on a vout created by vout_Create or by a previous
- * call to vout_Request.
* You can release the returned value either by vout_Request or vout_Close()
* followed by a vlc_object_release() or shorter vout_CloseAndRelease()
*
- * \param p_this a vlc object
- * \param p_vout a vout candidate
- * \param p_fmt the video format requested or NULL
- * \return a vout if p_fmt is non NULL and the request is successfull, NULL
- * otherwise
+ * \param object a vlc object
+ * \param cfg the video configuration requested.
+ * \return a vout
*/
-VLC_EXPORT( vout_thread_t *, vout_Request, ( vlc_object_t *p_this, vout_thread_t *p_vout, const video_format_t *p_fmt ) );
-#define vout_Request(a,b,c) vout_Request(VLC_OBJECT(a),b,c)
+VLC_API vout_thread_t * vout_Request( vlc_object_t *object, const vout_configuration_t *cfg );
+#define vout_Request(a,b) vout_Request(VLC_OBJECT(a),b)
/**
- * This function will create a suitable vout for a given p_fmt. It will never
- * reuse an already existing unused vout.
- *
- * You have to call either vout_Close or vout_Request on the returned value
- * \param p_this a vlc object to which the returned vout will be attached
- * \param p_fmt the video format requested
- * \return a vout if the request is successfull, NULL otherwise
- */
-VLC_EXPORT( vout_thread_t *, vout_Create, ( vlc_object_t *p_this, const video_format_t *p_fmt ) );
-#define vout_Create(a,b) vout_Create(VLC_OBJECT(a),b)
-
-/**
- * This function will close a vout created by vout_Create or vout_Request.
+ * This function will close a vout created by vout_Request.
* The associated vout module is closed.
* Note: It is not released yet, you'll have to call vlc_object_release()
* or use the convenient vout_CloseAndRelease().
*
* \param p_vout the vout to close
*/
-VLC_EXPORT( void, vout_Close, ( vout_thread_t *p_vout ) );
+VLC_API void vout_Close( vout_thread_t *p_vout );
/**
* This function will close a vout created by vout_Create
* available.
*
*/
-VLC_EXPORT( int, vout_GetSnapshot, ( vout_thread_t *p_vout,
- block_t **pp_image, picture_t **pp_picture,
- video_format_t *p_fmt,
- const char *psz_format, mtime_t i_timeout ) );
+VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
+ block_t **pp_image, picture_t **pp_picture,
+ video_format_t *p_fmt,
+ const char *psz_format, mtime_t i_timeout );
/* */
-VLC_EXPORT( picture_t *, vout_GetPicture, ( vout_thread_t * ) );
-VLC_EXPORT( void, vout_PutPicture, ( vout_thread_t *, picture_t * ) );
+VLC_API picture_t * vout_GetPicture( vout_thread_t * );
+VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
-VLC_EXPORT( void, vout_HoldPicture, ( vout_thread_t *, picture_t * ) );
-VLC_EXPORT( void, vout_ReleasePicture, ( vout_thread_t *, picture_t * ) );
+VLC_API void vout_HoldPicture( vout_thread_t *, picture_t * );
+VLC_API void vout_ReleasePicture( vout_thread_t *, picture_t * );
/* */
-VLC_EXPORT( void, vout_PutSubpicture, ( vout_thread_t *, subpicture_t * ) );
-VLC_EXPORT( int, vout_RegisterSubpictureChannel, ( vout_thread_t * ) );
-VLC_EXPORT( void, vout_FlushSubpictureChannel, ( vout_thread_t *, int ) );
-
-/**
- * Return the spu_t object associated to a vout_thread_t.
- *
- * The return object is valid only as long as the vout is. You must not
- * release the spu_t object returned.
- * It cannot return NULL so no need to check.
- */
-VLC_EXPORT( spu_t *, vout_GetSpu, ( vout_thread_t * ) );
+VLC_API void vout_PutSubpicture( vout_thread_t *, subpicture_t * );
+VLC_API int vout_RegisterSubpictureChannel( vout_thread_t * );
+VLC_API void vout_FlushSubpictureChannel( vout_thread_t *, int );
-VLC_EXPORT( void, vout_EnableFilter, ( vout_thread_t *, const char *,bool , bool ) );
+VLC_API void vout_EnableFilter( vout_thread_t *, const char *,bool , bool );
/**@}*/