Commit 701bb8a6 authored by Lyndon Brown's avatar Lyndon Brown Committed by Jean-Baptiste Kempf
Browse files

spu: move common defines to new shared header

note that in the logo case, an extra note is added to the end of the pos
x/y longtext, requiring an override.

position texts tweaked to make generic.
parent 9ed2f419
spudir = $(pluginsdir)/spu
noinst_HEADERS += spu/common.h
# sub filters
libsubsdelay_plugin_la_SOURCES = spu/subsdelay.c
spu_LTLIBRARIES = libsubsdelay_plugin.la
......
......@@ -31,6 +31,8 @@
#include <string.h>
#include <math.h>
#include "common.h"
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
......@@ -41,17 +43,8 @@
* Module descriptor
*****************************************************************************/
#define POSX_TEXT N_("X offset")
#define POSX_LONGTEXT N_("X offset, from top-left, or from relative position." )
#define POSY_TEXT N_("Y offset")
#define POSY_LONGTEXT N_("Y offset, from top-left, or from relative position." )
#define TRANS_TEXT N_("Transparency")
#define TRANS_LONGTEXT N_("Transparency (from 0 for full transparency to 255 for full opacity).")
#define POS_TEXT N_("Position")
#define POS_LONGTEXT N_(\
"Set the position on the video " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, e.g. 6 = top-right).")
#define BARWIDTH_TEXT N_("Bar width in pixel")
#define BARWIDTH_LONGTEXT N_("Width in pixel of each bar in the BarGraph to be displayed." )
#define BARHEIGHT_TEXT N_("Bar Height in pixel")
......@@ -59,12 +52,6 @@
#define CFG_PREFIX "audiobargraph_v-"
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
static int OpenSub (filter_t *);
static int OpenVideo(filter_t *);
static void Close (filter_t *);
......
/*****************************************************************************
* common.h : common spu defines
*****************************************************************************
* Copyright (C) 2021 VLC authors and VideoLAN
*
* 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 Lesser General Public License for more details.
*
* 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.
*****************************************************************************/
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("Opacity (inverse of transparency), " \
"from 0 for fully transparent to 255 for fully opaque." )
#define POSX_TEXT N_("X offset")
#define POSY_TEXT N_("Y offset")
#define POSX_LONGTEXT N_("X offset, from top-left, or from relative position." )
#define POSY_LONGTEXT N_("Y offset, from top-left, or from relative position." )
#define POS_TEXT N_("Position")
#define POS_LONGTEXT N_( \
"Set the position on the video " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, e.g. 6 = top-right).")
/* Excluding absolute, these values correspond to SUBPICTURE_ALIGN_* flags */
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
......@@ -30,6 +30,8 @@
#endif
#include <assert.h>
#include "common.h"
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
......@@ -55,31 +57,17 @@
#define DELAY_TEXT N_("Display time in ms")
#define DELAY_LONGTEXT N_("Individual image display time of 0 - 60000 ms.")
#define POSX_TEXT N_("X offset")
#undef POSX_LONGTEXT
#undef POSY_LONGTEXT
#define POSX_LONGTEXT N_("X offset, from top-left, or from relative position. " \
"You can move the logo by left-clicking it." )
#define POSY_TEXT N_("Y offset")
#define POSY_LONGTEXT N_("Y offset, from top-left, or from relative position. " \
"You can move the logo by left-clicking it." )
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("Opacity (inverse of transparency), " \
"from 0 for fully transparent to 255 for fully opaque." )
#define POS_TEXT N_("Position")
#define POS_LONGTEXT N_( \
"Set the position on the video " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, e.g. 6 = top-right).")
#define LOGO_HELP N_("Use a local picture as logo on the video")
#define CFG_PREFIX "logo-"
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
static int OpenSub ( filter_t * );
static int OpenVideo( filter_t * );
static void Close ( filter_t * );
......
......@@ -32,6 +32,8 @@
#include <errno.h>
#include "common.h"
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
......@@ -93,10 +95,6 @@ typedef struct
"%M = minute, %S = second, ...)" )
#define FILE_TEXT N_("Text file")
#define FILE_LONGTEXT N_("File to read the marquee text from.")
#define POSX_TEXT N_("X offset")
#define POSX_LONGTEXT N_("X offset, from top-left, or from relative position." )
#define POSY_TEXT N_("Y offset")
#define POSY_LONGTEXT N_("Y offset, from top-left, or from relative position." )
#define TIMEOUT_TEXT N_("Timeout")
#define TIMEOUT_LONGTEXT N_("Number of milliseconds the marquee must remain " \
"displayed. Default value is " \
......@@ -105,9 +103,6 @@ typedef struct
#define REFRESH_LONGTEXT N_("Number of milliseconds between string updates. " \
"This is mainly useful when using meta data " \
"or time format string sequences.")
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("Opacity (inverse of transparency), " \
"from 0 for fully transparent to 255 for fully opaque." )
#define SIZE_TEXT N_("Font size, pixels")
#define SIZE_LONGTEXT N_("Font size, in pixels. Default is 0 (use default " \
"font size)." )
......@@ -118,18 +113,6 @@ typedef struct
"chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\
" #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )
#define POS_TEXT N_("Position")
#define POS_LONGTEXT N_( \
"Set the position on the video " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, e.g. 6 = top-right).")
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
#define CFG_PREFIX "marq-"
#define MARQUEE_HELP N_("Display text above the video")
......
......@@ -36,6 +36,8 @@
#include <time.h>
#include "common.h"
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
......@@ -139,14 +141,6 @@ typedef struct
#define IMAGE_TEXT N_("Feed images")
#define IMAGE_LONGTEXT N_("Display feed images if available.")
#define POSX_TEXT N_("X offset")
#define POSX_LONGTEXT N_("X offset, from top-left, or from relative position." )
#define POSY_TEXT N_("Y offset")
#define POSY_LONGTEXT N_("Y offset, from top-left, or from relative position." )
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("Opacity (inverse of transparency), " \
"from 0 for fully transparent to 255 for fully opaque." )
#define SIZE_TEXT N_("Font size, pixels")
#define SIZE_LONGTEXT N_("Font size, in pixels. Default is 0 (use default " \
"font size)." )
......@@ -157,23 +151,11 @@ typedef struct
"chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\
" #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )
#define POS_TEXT N_("Position")
#define POS_LONGTEXT N_( \
"Set the position on the video " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, e.g. 6 = top-right).")
#define TITLE_TEXT N_("Title display mode")
#define TITLE_LONGTEXT N_("Title display mode. Default is 0 (hidden) if the feed has an image and feed images are enabled, 1 otherwise.")
#define RSS_HELP N_("Display a RSS or ATOM Feed on your video")
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
enum title_modes {
default_title=-1,
hide_title,
......
......@@ -1176,6 +1176,7 @@ modules/services_discovery/upnp.cpp
modules/services_discovery/windrive.c
modules/services_discovery/xcb_apps.c
modules/spu/audiobargraph_v.c
modules/spu/common.h
modules/spu/dynamicoverlay/dynamicoverlay.c
modules/spu/logo.c
modules/spu/marq.c
......
Supports Markdown
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