Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5adefde4
Commit
5adefde4
authored
May 13, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xosd: remove plugin completely
Outdated and probably broken since version 1.1.0.
parent
760668e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
323 deletions
+1
-323
NEWS
NEWS
+1
-0
configure.ac
configure.ac
+0
-20
modules/LIST
modules/LIST
+0
-1
modules/notify/Modules.am
modules/notify/Modules.am
+0
-1
modules/notify/xosd.c
modules/notify/xosd.c
+0
-300
po/POTFILES.in
po/POTFILES.in
+0
-1
No files found.
NEWS
View file @
5adefde4
...
...
@@ -35,6 +35,7 @@ Mac OS X Interface:
Removed modules:
* portaudio audio output
* X11 On Screen Display notifications (xosd)
Changes between 2.0.0 and 2.0.1:
...
...
configure.ac
View file @
5adefde4
...
...
@@ -3804,26 +3804,6 @@ if test "${enable_ncurses}" != "no"; then
VLC_RESTORE_FLAGS
fi
dnl
dnl XOSD plugin
dnl
AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)])
if test "${enable_xosd}" = "yes"
then
AC_CHECK_HEADERS(xosd.h,
AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
AS_IF([test "${no_x}" != "yes"], [
VLC_ADD_PLUGIN([xosd])
VLC_ADD_LIBS([xosd],[-lxosd ${X_LIBS} ${X_PRE_LIBS} -lX11])
VLC_ADD_CFLAGS([xosd],[${X_CFLAGS}])
],[
AC_MSG_ERROR([Xlib is required with xosd.])
])
])
)
fi
dnl
dnl Framebuffer (overlay) plugin
dnl
...
...
modules/LIST
View file @
5adefde4
...
...
@@ -389,7 +389,6 @@ $Id$
* xcb_xv: a XVideo video output using XCB
* xdg_screensaver: xdg-utils screensaver inhibition
* xml: LibXML xml parser
* xosd: X On Screen Display interface
* xscreensaver: Xscreensaver inhibition
* yuv: yuv video output
* yuv_rgb_neon: yuv->RGB chroma converter for NEON devices
...
...
modules/notify/Modules.am
View file @
5adefde4
...
...
@@ -6,7 +6,6 @@ LIBTOOL=@LIBTOOL@ --tag=CC
SOURCES_msn = msn.c
SOURCES_growl = growl.m
SOURCES_notify = notify.c
SOURCES_xosd = xosd.c
SOURCES_telepathy = telepathy.c
if HAVE_WIN32
...
...
modules/notify/xosd.c
deleted
100644 → 0
View file @
760668e7
/*****************************************************************************
* xosd.c : X On Screen Display interface
*****************************************************************************
* Copyright (C) 2001 the VideoLAN team
* $Id$
*
* Authors: Loïc Minier <lool@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_playlist.h>
#include <vlc_input.h>
#include <vlc_interface.h>
#include <vlc_xlib.h>
#include <xosd.h>
/*****************************************************************************
* intf_sys_t: description and status of rc interface
*****************************************************************************/
struct
intf_sys_t
{
xosd
*
p_osd
;
/**< libxosd handle */
bool
b_need_update
;
/**< Update display ? */
vlc_mutex_t
lock
;
/**< state lock */
vlc_cond_t
cond
;
/**< update condition variable */
vlc_thread_t
thread
;
/**< interface thread handle */
};
#define MAX_LINE_LENGTH 256
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
*
Run
(
void
*
);
static
int
PlaylistNext
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
oval
,
vlc_value_t
nval
,
void
*
param
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define POSITION_TEXT N_("Flip vertical position")
#define POSITION_LONGTEXT N_("Display XOSD output at the bottom of the " \
"screen instead of the top.")
#define TXT_OFS_TEXT N_("Vertical offset")
#define TXT_OFS_LONGTEXT N_("Vertical offset between the border of the screen "\
"and the displayed text (in pixels, defaults to "\
"30 pixels)." )
#define SHD_OFS_TEXT N_("Shadow offset")
#define SHD_OFS_LONGTEXT N_("Offset between the text and the shadow (in " \
"pixels, defaults to 2 pixels)." )
#define FONT_TEXT N_("Font")
#define FONT_LONGTEXT N_("Font used to display text in the XOSD output.")
#define COLOUR_TEXT N_("Color")
#define COLOUR_LONGTEXT N_("Color used to display text in the XOSD output.")
vlc_module_begin
()
set_category
(
CAT_INTERFACE
)
set_subcategory
(
SUBCAT_INTERFACE_CONTROL
)
set_description
(
N_
(
"XOSD interface"
)
)
set_shortname
(
"XOSD"
)
add_bool
(
"xosd-position"
,
true
,
POSITION_TEXT
,
POSITION_LONGTEXT
,
true
)
add_integer
(
"xosd-text-offset"
,
30
,
TXT_OFS_TEXT
,
TXT_OFS_LONGTEXT
,
true
)
add_integer
(
"xosd-shadow-offset"
,
2
,
SHD_OFS_TEXT
,
SHD_OFS_LONGTEXT
,
true
)
add_string
(
"xosd-font"
,
"-adobe-helvetica-bold-r-normal-*-*-160-*-*-p-*-iso8859-1"
,
FONT_TEXT
,
FONT_LONGTEXT
,
true
)
add_string
(
"xosd-colour"
,
"LawnGreen"
,
COLOUR_TEXT
,
COLOUR_LONGTEXT
,
true
)
set_capability
(
"interface"
,
10
)
set_callbacks
(
Open
,
Close
)
vlc_module_end
()
/*****************************************************************************
* Open: initialize and create stuff
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
;
xosd
*
p_osd
;
char
*
psz_font
,
*
psz_colour
;
if
(
!
vlc_xlib_init
(
p_this
))
return
VLC_EGENERIC
;
if
(
getenv
(
"DISPLAY"
)
==
NULL
)
{
msg_Err
(
p_intf
,
"no display, please set the DISPLAY variable"
);
return
VLC_EGENERIC
;
}
/* Allocate instance and initialize some members */
p_sys
=
p_intf
->
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
/* Initialize library */
psz_font
=
var_InheritString
(
p_intf
,
"xosd-font"
);
psz_colour
=
var_InheritString
(
p_intf
,
"xosd-colour"
);
p_osd
=
xosd_create
(
1
);
if
(
p_osd
==
NULL
)
{
msg_Err
(
p_intf
,
"couldn't initialize libxosd"
);
free
(
psz_colour
);
free
(
psz_font
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
p_sys
->
p_osd
=
p_osd
;
/* Set user preferences */
xosd_set_outline_colour
(
p_osd
,
"black"
);
xosd_set_font
(
p_osd
,
psz_font
);
xosd_set_colour
(
p_osd
,
psz_colour
);
xosd_set_timeout
(
p_osd
,
3
);
xosd_set_pos
(
p_osd
,
var_InheritBool
(
p_intf
,
"xosd-position"
)
?
XOSD_bottom:
XOSD_top
);
xosd_set_horizontal_offset
(
p_osd
,
var_InheritInteger
(
p_intf
,
"xosd-text-offset"
)
);
xosd_set_vertical_offset
(
p_osd
,
var_InheritInteger
(
p_intf
,
"xosd-text-offset"
)
);
xosd_set_shadow_offset
(
p_osd
,
var_InheritInteger
(
p_intf
,
"xosd-shadow-offset"
));
/* Initialize to NULL */
xosd_display
(
p_osd
,
0
,
XOSD_string
,
"XOSD interface initialized"
);
free
(
psz_colour
);
free
(
psz_font
);
// Initialize mutex and condition variable before adding the callbacks
vlc_mutex_init
(
&
p_sys
->
lock
);
vlc_cond_init
(
&
p_sys
->
cond
);
p_sys
->
b_need_update
=
true
;
if
(
vlc_clone
(
&
p_sys
->
thread
,
VLC_THREAD_PRIORITY_LOW
,
Run
,
p_intf
)
)
goto
error
;
// Add the callbacks
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
var_AddCallback
(
p_playlist
,
"item-current"
,
PlaylistNext
,
p_this
);
var_AddCallback
(
p_playlist
,
"item-change"
,
PlaylistNext
,
p_this
);
p_intf
->
pf_run
=
NULL
;
return
VLC_SUCCESS
;
error:
xosd_destroy
(
p_sys
->
p_osd
);
vlc_cond_destroy
(
&
p_sys
->
cond
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
/*****************************************************************************
* Close: destroy interface stuff
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
vlc_cancel
(
p_sys
->
thread
);
var_DelCallback
(
p_playlist
,
"item-current"
,
PlaylistNext
,
p_this
);
var_DelCallback
(
p_playlist
,
"item-change"
,
PlaylistNext
,
p_this
);
vlc_join
(
p_sys
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_sys
->
cond
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
/* Uninitialize library */
xosd_destroy
(
p_sys
->
p_osd
);
/* Destroy structure */
free
(
p_sys
);
}
/*****************************************************************************
* Run: xosd thread
*****************************************************************************
* This part of the interface runs in a separate thread
*****************************************************************************/
static
void
*
Run
(
void
*
data
)
{
intf_thread_t
*
p_intf
=
data
;
playlist_t
*
p_playlist
;
playlist_item_t
*
p_item
=
NULL
;
char
*
psz_display
=
NULL
;
int
cancel
=
vlc_savecancel
();
for
(
;;
)
{
// Wait for a signal
vlc_restorecancel
(
cancel
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
mutex_cleanup_push
(
&
p_intf
->
p_sys
->
lock
);
while
(
!
p_intf
->
p_sys
->
b_need_update
)
vlc_cond_wait
(
&
p_intf
->
p_sys
->
cond
,
&
p_intf
->
p_sys
->
lock
);
p_intf
->
p_sys
->
b_need_update
=
false
;
vlc_cleanup_run
();
// Compute the signal
cancel
=
vlc_savecancel
();
p_playlist
=
pl_Get
(
p_intf
);
PL_LOCK
;
// If the playlist is empty don't do anything
if
(
playlist_IsEmpty
(
p_playlist
)
)
{
PL_UNLOCK
;
continue
;
}
free
(
psz_display
);
int
i_status
=
playlist_Status
(
p_playlist
);
if
(
i_status
==
PLAYLIST_STOPPED
)
{
psz_display
=
strdup
(
_
(
"Stop"
));
}
else
if
(
i_status
==
PLAYLIST_PAUSED
)
{
psz_display
=
strdup
(
_
(
"Pause"
));
}
else
{
p_item
=
playlist_CurrentPlayingItem
(
p_playlist
);
if
(
!
p_item
)
{
psz_display
=
NULL
;
PL_UNLOCK
;
continue
;
}
input_item_t
*
p_input
=
p_item
->
p_input
;
mtime_t
i_duration
=
input_item_GetDuration
(
p_input
);
if
(
i_duration
!=
-
1
)
{
char
psz_durationstr
[
MSTRTIME_MAX_SIZE
];
secstotimestr
(
psz_durationstr
,
i_duration
/
1000000
);
if
(
asprintf
(
&
psz_display
,
"%s (%s)"
,
p_input
->
psz_name
,
psz_durationstr
)
==
-
1
)
psz_display
=
NULL
;
}
else
psz_display
=
strdup
(
p_input
->
psz_name
);
}
PL_UNLOCK
;
/* Display */
xosd_display
(
p_intf
->
p_sys
->
p_osd
,
0
,
/* first line */
XOSD_string
,
psz_display
);
}
}
static
int
PlaylistNext
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
oval
,
vlc_value_t
nval
,
void
*
param
)
{
(
void
)
p_this
;
(
void
)
psz_variable
;
(
void
)
oval
;
(
void
)
nval
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
param
;
// Send the signal using the condition variable
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
p_intf
->
p_sys
->
b_need_update
=
true
;
vlc_cond_signal
(
&
p_intf
->
p_sys
->
cond
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
return
VLC_SUCCESS
;
}
po/POTFILES.in
View file @
5adefde4
...
...
@@ -964,7 +964,6 @@ modules/notify/growl.m
modules/notify/msn.c
modules/notify/notify.c
modules/notify/telepathy.c
modules/notify/xosd.c
modules/packetizer/copy.c
modules/packetizer/dirac.c
modules/packetizer/flac.c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment