/*****************************************************************************
* fb.c : framebuffer plugin for vlc
*****************************************************************************
- * Copyright (C) 2000-2009 the VideoLAN team
+ * Copyright (C) 2000-2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Jean-Paul Saman
*
- * 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.
*****************************************************************************/
/*****************************************************************************
set_shortname("Framebuffer")
set_category(CAT_VIDEO)
set_subcategory(SUBCAT_VIDEO_VOUT)
- add_file(FB_DEV_VAR, "/dev/fb0", NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
- false)
- add_bool("fb-tty", true, NULL, TTY_TEXT, TTY_LONGTEXT, true)
- add_string( "fb-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
+ add_loadfile(FB_DEV_VAR, "/dev/fb0", DEVICE_TEXT, DEVICE_LONGTEXT,
+ false)
+ add_bool("fb-tty", true, TTY_TEXT, TTY_LONGTEXT, true)
+ add_string( "fb-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
add_obsolete_string("fb-aspect-ratio")
- add_integer("fb-mode", 4, NULL, FB_MODE_TEXT, FB_MODE_LONGTEXT,
+ add_integer("fb-mode", 4, FB_MODE_TEXT, FB_MODE_LONGTEXT,
true)
- add_bool("fb-hw-accel", true, NULL, HW_ACCEL_TEXT, HW_ACCEL_LONGTEXT,
+ add_bool("fb-hw-accel", true, HW_ACCEL_TEXT, HW_ACCEL_LONGTEXT,
true)
set_description(N_("GNU/Linux framebuffer video output"))
set_capability("vout display", 30)
* Local prototypes
*****************************************************************************/
static picture_pool_t *Pool (vout_display_t *, unsigned);
-static void Display(vout_display_t *, picture_t *);
+static void Display(vout_display_t *, picture_t *, subpicture_t *);
static int Control(vout_display_t *, int, va_list);
-static void Manage (vout_display_t *);
/* */
static int OpenDisplay (vout_display_t *, bool force_resolution);
return VLC_ENOMEM;
/* Does the framebuffer uses hw acceleration? */
- sys->is_hw_accel = var_CreateGetBool(vd, "fb-hw-accel");
+ sys->is_hw_accel = var_InheritBool(vd, "fb-hw-accel");
/* Set tty and fb devices */
sys->tty = 0; /* 0 == /dev/tty0 == current console */
- sys->is_tty = var_CreateGetBool(vd, "fb-tty");
+ sys->is_tty = var_InheritBool(vd, "fb-tty");
#if !defined(WIN32) && defined(HAVE_ISATTY)
/* Check that stdin is a TTY */
if (sys->is_tty && !isatty(0)) {
"there is no way to return to the TTY");
#endif
- const int mode = var_CreateGetInteger(vd, "fb-mode");
+ const int mode = var_InheritInteger(vd, "fb-mode");
bool force_resolution = true;
switch (mode) {
case 0: /* QCIF */
break;
}
- char *chroma = var_CreateGetNonEmptyString(vd, "fb-chroma");
+ char *chroma = var_InheritString(vd, "fb-chroma");
if (chroma) {
sys->chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma);
vd->prepare = NULL;
vd->display = Display;
vd->control = Control;
- vd->manage = Manage;
+ vd->manage = NULL;
/* */
vout_display_SendEventFullscreen(vd, true);
}
return sys->pool;
}
-static void Display(vout_display_t *vd, picture_t *picture)
+static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
{
vout_display_sys_t *sys = vd->sys;
picture_Copy(sys->picture, picture);
picture_Release(picture);
+ VLC_UNUSED(subpicture);
}
static int Control(vout_display_t *vd, int query, va_list args)
{
return VLC_EGENERIC;
}
}
-static void Manage (vout_display_t *vd)
-{
- VLC_UNUSED(vd);
-#if 0
- /*
- * Size change
- */
- if (vd->i_changes & VOUT_SIZE_CHANGE)
- {
- msg_Dbg(vd, "reinitializing framebuffer screen");
- vd->i_changes &= ~VOUT_SIZE_CHANGE;
-
- vout_display_SendEventDisplaySize();
-
- ClearScreen(vd->sys);
- }
-#endif
-}
/* following functions are local */
static int TtyInit(vout_display_t *vd)