/*****************************************************************************
* vout_dummy.c: Dummy video output display method for testing purposes
*****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2000, 2001 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* free() */
-#include <string.h> /* strerror() */
-#include <vlc/vlc.h>
-#include <vlc/vout.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_vout.h>
#define DUMMY_WIDTH 16
#define DUMMY_HEIGHT 16
#define DUMMY_MAX_DIRECTBUFFERS 10
+#include "dummy.h"
+
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static void Render ( vout_thread_t *, picture_t * );
static void Display ( vout_thread_t *, picture_t * );
static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * );
+static int Control ( vout_thread_t *, int, va_list );
/*****************************************************************************
* OpenVideo: activates dummy video thread output method
*****************************************************************************
* This function initializes a dummy vout method.
*****************************************************************************/
-int E_(OpenVideo) ( vlc_object_t *p_this )
+int OpenVideo ( vlc_object_t *p_this )
{
vout_thread_t * p_vout = (vout_thread_t *)p_this;
p_vout->pf_manage = Manage;
p_vout->pf_render = Render;
p_vout->pf_display = Display;
+ p_vout->pf_control = Control;
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * Control: control facility for the vout
+ *****************************************************************************/
+static int Control( vout_thread_t *p_vout, int i_query, va_list args )
+{
+ (void) p_vout; (void) i_query; (void) args;
+ return VLC_EGENERIC;
+}
+
+
/*****************************************************************************
* Init: initialize dummy video thread output method
*****************************************************************************/
int i_index, i_chroma;
char *psz_chroma;
picture_t *p_pic;
- vlc_bool_t b_chroma = 0;
+ bool b_chroma = 0;
psz_chroma = config_GetPsz( p_vout, "dummy-chroma" );
- if( psz_chroma )
- {
- if( strlen( psz_chroma ) >= 4 )
- {
- i_chroma = VLC_FOURCC( psz_chroma[0], psz_chroma[1],
- psz_chroma[2], psz_chroma[3] );
- b_chroma = 1;
- }
-
- free( psz_chroma );
- }
+ i_chroma = vlc_fourcc_GetCodecFromString( VIDEO_ES, psz_chroma );
+ b_chroma = i_chroma != 0;
+ free( psz_chroma );
I_OUTPUTPICTURES = 0;
msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)",
i_chroma, (char*)&i_chroma );
p_vout->output.i_chroma = i_chroma;
- if ( i_chroma == VLC_FOURCC( 'R', 'G', 'B', '2' ) )
+ if ( i_chroma == VLC_CODEC_RGB8 )
{
p_vout->output.pf_setpalette = SetPalette;
}
*****************************************************************************/
static int Manage( vout_thread_t *p_vout )
{
+ VLC_UNUSED(p_vout);
return( 0 );
}
*****************************************************************************/
static void Render( vout_thread_t *p_vout, picture_t *p_pic )
{
+ VLC_UNUSED(p_vout); VLC_UNUSED(p_pic);
/* No need to do anything, the fake direct buffers stay as they are */
}
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
+ VLC_UNUSED(p_vout); VLC_UNUSED(p_pic);
/* No need to do anything, the fake direct buffers stay as they are */
}
static void SetPalette ( vout_thread_t *p_vout,
uint16_t *red, uint16_t *green, uint16_t *blue )
{
+ VLC_UNUSED(p_vout); VLC_UNUSED(red); VLC_UNUSED(green); VLC_UNUSED(blue);
/* No need to do anything, the fake direct buffers stay as they are */
}