Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f0ffeb17
Commit
f0ffeb17
authored
Mar 22, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Strings review in misc/ except dummy and win32text (Refs:#438)
parent
04cfc6a3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
80 deletions
+90
-80
modules/misc/freetype.c
modules/misc/freetype.c
+27
-18
modules/misc/gnutls.c
modules/misc/gnutls.c
+10
-8
modules/misc/growl.c
modules/misc/growl.c
+4
-8
modules/misc/logger.c
modules/misc/logger.c
+7
-4
modules/misc/msn.c
modules/misc/msn.c
+3
-3
modules/misc/rtsp.c
modules/misc/rtsp.c
+24
-22
modules/misc/svg.c
modules/misc/svg.c
+11
-9
modules/misc/xml/libxml.c
modules/misc/xml/libxml.c
+0
-2
modules/misc/xml/xtag.c
modules/misc/xml/xtag.c
+4
-6
No files found.
modules/misc/freetype.c
View file @
f0ffeb17
...
@@ -81,28 +81,35 @@ static int SetFontSize( filter_t *, int );
...
@@ -81,28 +81,35 @@ static int SetFontSize( filter_t *, int );
* Module descriptor
* Module descriptor
*****************************************************************************/
*****************************************************************************/
#define FONT_TEXT N_("Font")
#define FONT_TEXT N_("Font")
#define FONT_LONGTEXT N_("F
ont filenam
e")
#define FONT_LONGTEXT N_("F
ilename for the font you want to us
e")
#define FONTSIZE_TEXT N_("Font size in pixels")
#define FONTSIZE_TEXT N_("Font size in pixels")
#define FONTSIZE_LONGTEXT N_("The size of the fonts used by the osd module. " \
#define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \
"that will be rendered on the video. " \
"If set to something different than 0 this option will override the " \
"If set to something different than 0 this option will override the " \
"relative font size " )
"relative font size. " )
#define OPACITY_TEXT N_("Opacity, 0..255")
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("The opacity (inverse of transparency) of " \
#define OPACITY_LONGTEXT N_("The opacity (inverse of transparency) of the " \
"overlay text. 0 = transparent, 255 = totally opaque. " )
"text that will be rendered on the video. 0 = transparent, " \
#define COLOR_TEXT N_("Text Default Color")
"255 = totally opaque. " )
#define COLOR_LONGTEXT N_("The color of overlay text. 1 byte for each color, "\
#define COLOR_TEXT N_("Text default color")
"hexadecimal. #000000 = all colors off, 0xFF0000 = just Red, " \
#define COLOR_LONGTEXT N_("The color of the text that will be rendered on "\
"0xFFFFFF = all color on [White]" )
"the video. This must be an hexadecimal (like HTML colors). The first two "\
#define FONTSIZER_TEXT N_("Font size")
"chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\
#define FONTSIZER_LONGTEXT N_("The size of the fonts used by the osd module" )
" #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )
#define FONTSIZER_TEXT N_("Relative font size")
#define FONTSIZER_LONGTEXT N_("This is the relative default size of the " \
"fonts that will be rendered on the video. If absolute font size is set, "\
"relative size will be overriden." )
static
int
pi_sizes
[]
=
{
20
,
18
,
16
,
12
,
6
};
static
int
pi_sizes
[]
=
{
20
,
18
,
16
,
12
,
6
};
static
char
*
ppsz_sizes_text
[]
=
{
N_
(
"Smaller"
),
N_
(
"Small"
),
N_
(
"Normal"
),
static
char
*
ppsz_sizes_text
[]
=
{
N_
(
"Smaller"
),
N_
(
"Small"
),
N_
(
"Normal"
),
N_
(
"Large"
),
N_
(
"Larger"
)
};
N_
(
"Large"
),
N_
(
"Larger"
)
};
#define YUVP_TEXT N_("Use yuvp renderer")
#define YUVP_TEXT N_("Use YUVP renderer")
#define YUVP_LONGTEXT N_("Render into paletized YUV. Needed to encode into dvbsubs")
#define YUVP_LONGTEXT N_("This renders the font using \"paletized YUV\". " \
"This option is only needed if you want to encode into DVB subtitles" )
#define EFFECT_TEXT N_("Font Effect")
#define EFFECT_TEXT N_("Font Effect")
#define EFFECT_LONGTEXT N_("Select effects to apply to rendered text")
#define EFFECT_LONGTEXT N_("It is possible to apply effects to the rendered" \
"text to improve rendering." )
#define EFFECT_BACKGROUND 1
#define EFFECT_BACKGROUND 1
#define EFFECT_OUTLINE 2
#define EFFECT_OUTLINE 2
...
@@ -279,7 +286,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -279,7 +286,7 @@ static int Create( vlc_object_t *p_this )
i_error
=
FT_Select_Charmap
(
p_sys
->
p_face
,
ft_encoding_unicode
);
i_error
=
FT_Select_Charmap
(
p_sys
->
p_face
,
ft_encoding_unicode
);
if
(
i_error
)
if
(
i_error
)
{
{
msg_Err
(
p_filter
,
"
F
ont has no unicode translation table"
);
msg_Err
(
p_filter
,
"
f
ont has no unicode translation table"
);
goto
error
;
goto
error
;
}
}
...
@@ -873,13 +880,15 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -873,13 +880,15 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
i_error
=
FT_Load_Glyph
(
face
,
i_glyph_index
,
FT_LOAD_DEFAULT
);
i_error
=
FT_Load_Glyph
(
face
,
i_glyph_index
,
FT_LOAD_DEFAULT
);
if
(
i_error
)
if
(
i_error
)
{
{
msg_Err
(
p_filter
,
"FT_Load_Glyph returned %d"
,
i_error
);
msg_Err
(
p_filter
,
"Unable to render text (FT_Load_Glyph returned"
" %d"
,
i_error
);
goto
error
;
goto
error
;
}
}
i_error
=
FT_Get_Glyph
(
glyph
,
&
tmp_glyph
);
i_error
=
FT_Get_Glyph
(
glyph
,
&
tmp_glyph
);
if
(
i_error
)
if
(
i_error
)
{
{
msg_Err
(
p_filter
,
"FT_Get_Glyph returned %d"
,
i_error
);
msg_Err
(
p_filter
,
"Unable to render text (FT_Get_Glyph returned "
%
d
", i_error );
goto error;
goto error;
}
}
FT_Glyph_Get_CBox( tmp_glyph, ft_glyph_bbox_pixels, &glyph_size );
FT_Glyph_Get_CBox( tmp_glyph, ft_glyph_bbox_pixels, &glyph_size );
...
...
modules/misc/gnutls.c
View file @
f0ffeb17
...
@@ -66,27 +66,29 @@ static void Close( vlc_object_t * );
...
@@ -66,27 +66,29 @@ static void Close( vlc_object_t * );
#define DH_BITS_TEXT N_("Diffie-Hellman prime bits")
#define DH_BITS_TEXT N_("Diffie-Hellman prime bits")
#define DH_BITS_LONGTEXT N_( \
#define DH_BITS_LONGTEXT N_( \
"Allows you to modify the Diffie-Hellman prime's number of bits " \
"This allows you to modify the Diffie-Hellman prime's number of bits, " \
"(used for TLS or SSL-based server-side encryption)." )
"used for TLS or SSL-based server-side encryption. This is generally " \
"not needed." )
#define CACHE_EXPIRATION_TEXT N_("Expiration time for resumed TLS sessions")
#define CACHE_EXPIRATION_TEXT N_("Expiration time for resumed TLS sessions")
#define CACHE_EXPIRATION_LONGTEXT N_( \
#define CACHE_EXPIRATION_LONGTEXT N_( \
"
Defines the delay before resumed TLS sessions will be expired "
\
"
It is possible to cache the resumed TLS sessions. This is the expiration "
\
"
(in seconds)
." )
"
time of the sessions stored in this cache, in seconds
." )
#define CACHE_SIZE_TEXT N_("Number of resumed TLS sessions")
#define CACHE_SIZE_TEXT N_("Number of resumed TLS sessions")
#define CACHE_SIZE_LONGTEXT N_( \
#define CACHE_SIZE_LONGTEXT N_( \
"
Allows you to modify
the maximum number of resumed TLS sessions that " \
"
This is
the maximum number of resumed TLS sessions that " \
"the cache will hold." )
"the cache will hold." )
#define CHECK_CERT_TEXT N_("Check TLS/SSL server certificate validity")
#define CHECK_CERT_TEXT N_("Check TLS/SSL server certificate validity")
#define CHECK_CERT_LONGTEXT N_( \
#define CHECK_CERT_LONGTEXT N_( \
"
Ensures that
server certificate is valid " \
"
This ensures that the
server certificate is valid " \
"(i.e. signed by an approved Certificat
e
Authority)." )
"(i.e. signed by an approved Certificat
ion
Authority)." )
#define CHECK_HOSTNAME_TEXT N_("Check TLS/SSL server hostname in certificate")
#define CHECK_HOSTNAME_TEXT N_("Check TLS/SSL server hostname in certificate")
#define CHECK_HOSTNAME_LONGTEXT N_( \
#define CHECK_HOSTNAME_LONGTEXT N_( \
"Ensures that server hostname in certificate match requested host name." )
"This ensures that the server hostname in certificate matches the " \
"requested host name." )
vlc_module_begin
();
vlc_module_begin
();
set_shortname
(
"GnuTLS"
);
set_shortname
(
"GnuTLS"
);
...
...
modules/misc/growl.c
View file @
f0ffeb17
...
@@ -58,14 +58,13 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset );
...
@@ -58,14 +58,13 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset );
*****************************************************************************/
*****************************************************************************/
#define SERVER_DEFAULT "127.0.0.1"
#define SERVER_DEFAULT "127.0.0.1"
#define SERVER_TEXT N_("Growl server")
#define SERVER_TEXT N_("Growl server")
#define SERVER_LONGTEXT N_("Growl server receiving notifications.")
#define SERVER_LONGTEXT N_("This is the host to which Growl notifications " \
"will be sent. By default, notifications are sent locally." )
#define PASS_DEFAULT ""
#define PASS_DEFAULT ""
#define PASS_TEXT N_("Growl password")
#define PASS_TEXT N_("Growl password")
#define PASS_LONGTEXT N_("Growl password on the server.")
#define PASS_LONGTEXT N_("Growl password on the server.")
#define PORT_TEXT N_("Growl UDP port")
#define PORT_TEXT N_("Growl UDP port")
#define PORT_LONGTEXT N_("Growl UPD port on the server.")
#define PORT_LONGTEXT N_("Growl UDP port on the server.")
#define TTL_TEXT N_("Growl TTL")
#define TTL_LONGTEXT N_("Growl TTL.")
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INTERFACE
);
set_category
(
CAT_INTERFACE
);
...
@@ -79,8 +78,6 @@ vlc_module_begin();
...
@@ -79,8 +78,6 @@ vlc_module_begin();
PASS_TEXT
,
PASS_LONGTEXT
,
VLC_FALSE
);
PASS_TEXT
,
PASS_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"growl-port"
,
9887
,
NULL
,
add_integer
(
"growl-port"
,
9887
,
NULL
,
PORT_TEXT
,
PORT_LONGTEXT
,
VLC_TRUE
);
PORT_TEXT
,
PORT_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"growl-ttl"
,
12
,
NULL
,
TTL_TEXT
,
TTL_LONGTEXT
,
VLC_TRUE
);
set_capability
(
"interface"
,
0
);
set_capability
(
"interface"
,
0
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
...
@@ -281,7 +278,6 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
...
@@ -281,7 +278,6 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
char
*
psz_password
=
config_GetPsz
(
p_intf
,
"growl-password"
);
char
*
psz_password
=
config_GetPsz
(
p_intf
,
"growl-password"
);
char
*
psz_server
=
config_GetPsz
(
p_intf
,
"growl-server"
);
char
*
psz_server
=
config_GetPsz
(
p_intf
,
"growl-server"
);
int
i_port
=
config_GetInt
(
p_intf
,
"growl-port"
);
int
i_port
=
config_GetInt
(
p_intf
,
"growl-port"
);
int
i_ttl
=
config_GetInt
(
p_intf
,
"growl-ttl"
);
strcpy
(
(
char
*
)(
p_data
+
i_offset
),
psz_password
);
strcpy
(
(
char
*
)(
p_data
+
i_offset
),
psz_password
);
i
=
i_offset
+
strlen
(
psz_password
);
i
=
i_offset
+
strlen
(
psz_password
);
...
@@ -298,7 +294,7 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
...
@@ -298,7 +294,7 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
p_data
[
i_offset
++
]
=
(
md5
.
p_digest
[
i
]
>>
24
)
&
0xFF
;
p_data
[
i_offset
++
]
=
(
md5
.
p_digest
[
i
]
>>
24
)
&
0xFF
;
}
}
i_handle
=
net_ConnectUDP
(
p_this
,
psz_server
,
i_port
,
i_ttl
);
i_handle
=
net_ConnectUDP
(
p_this
,
psz_server
,
i_port
,
0
);
if
(
i_handle
==
-
1
)
if
(
i_handle
==
-
1
)
{
{
msg_Err
(
p_this
,
"failed to open a connection (udp)"
);
msg_Err
(
p_this
,
"failed to open a connection (udp)"
);
...
...
modules/misc/logger.c
View file @
f0ffeb17
...
@@ -117,9 +117,12 @@ static char *mode_list_text[] = { N_("Text"), "HTML"
...
@@ -117,9 +117,12 @@ static char *mode_list_text[] = { N_("Text"), "HTML"
#define LOGMODE_TEXT N_("Log format")
#define LOGMODE_TEXT N_("Log format")
#ifdef HAVE_SYSLOG_H
#ifdef HAVE_SYSLOG_H
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are \"text\" (default), \"html\", and \"syslog\".")
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are " \
"\"text\" (default), \"html\", and \"syslog\" (special mode to send to " \
"syslog instead of file.")
#else
#else
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are \"text\" (default) and \"html\".")
#define LOGMODE_LONGTEXT N_("Specify the log format. Available choices are " \
\"text\" (default) and \"html\".")
#endif
#endif
vlc_module_begin
();
vlc_module_begin
();
...
@@ -180,7 +183,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -180,7 +183,7 @@ static int Open( vlc_object_t *p_this )
#endif
#endif
else
else
{
{
msg_
Err
(
p_intf
,
"invalid log mode `%s', using `text'"
,
psz_mode
);
msg_
Warn
(
p_intf
,
"invalid log mode `%s', using `text'"
,
psz_mode
);
p_intf
->
p_sys
->
i_mode
=
MODE_TEXT
;
p_intf
->
p_sys
->
i_mode
=
MODE_TEXT
;
}
}
...
@@ -202,7 +205,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -202,7 +205,7 @@ static int Open( vlc_object_t *p_this )
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
{
{
msg_Err
(
p_this
,
"
psz_homedir is null
"
);
msg_Err
(
p_this
,
"
Unable to find home directory
"
);
return
-
1
;
return
-
1
;
}
}
psz_file
=
(
char
*
)
malloc
(
sizeof
(
"/"
LOG_DIR
"/"
LOG_FILE_HTML
)
+
psz_file
=
(
char
*
)
malloc
(
sizeof
(
"/"
LOG_DIR
"/"
LOG_FILE_HTML
)
+
...
...
modules/misc/msn.c
View file @
f0ffeb17
...
@@ -61,14 +61,14 @@ static int SendToMSN( char * psz_msg );
...
@@ -61,14 +61,14 @@ static int SendToMSN( char * psz_msg );
*****************************************************************************/
*****************************************************************************/
#define FORMAT_DEFAULT "{0} - {1}"
#define FORMAT_DEFAULT "{0} - {1}"
#define FORMAT_TEXT N_("MSN Title format string")
#define FORMAT_TEXT N_("MSN Title format string")
#define FORMAT_LONGTEXT N_("
MSN Title format string.
" \
#define FORMAT_LONGTEXT N_("
Format of the string to send to MSN
" \
"{0}
artist, {1} title, {2} album
")
"{0}
Artist, {1} Title, {2} Album. Defaults to \"Artist - Title\" ({0} - {1}).
")
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INTERFACE
);
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_CONTROL
);
set_subcategory
(
SUBCAT_INTERFACE_CONTROL
);
set_shortname
(
N_
(
"MSN"
)
);
set_shortname
(
N_
(
"MSN"
)
);
set_description
(
_
(
"MSN
Title Plugin
"
)
);
set_description
(
_
(
"MSN
Now-Playing
"
)
);
add_string
(
"msn-format"
,
FORMAT_DEFAULT
,
NULL
,
add_string
(
"msn-format"
,
FORMAT_DEFAULT
,
NULL
,
FORMAT_TEXT
,
FORMAT_LONGTEXT
,
VLC_FALSE
);
FORMAT_TEXT
,
FORMAT_LONGTEXT
,
VLC_FALSE
);
...
...
modules/misc/rtsp.c
View file @
f0ffeb17
...
@@ -45,15 +45,16 @@
...
@@ -45,15 +45,16 @@
static
int
Open
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define HOST_TEXT N_( "
H
ost address" )
#define HOST_TEXT N_( "
RTSP h
ost address" )
#define HOST_LONGTEXT N_( \
#define HOST_LONGTEXT N_( \
"You can set the address, port and path the rtsp interface will bind to." \
"This defines the address, port and path the RTSP VOD server will listen " \
"\nSyntax is address:port/path. Default is to bind to any address "\
"on.\nSyntax is address:port/path. The default is to listen on all "\
"on port 554, with no path." )
"interfaces (address 0.0.0.0), on port 554, with no path.\n To listen " \
"only on the local interface, use \"localhost\" as address." )
#define THROTLE_TEXT N_( "Maximum number of connections" )
#define THROTLE_TEXT N_( "Maximum number of connections" )
#define THROTLE_LONGTEXT N_( "
Limit the number of connection
s " \
#define THROTLE_LONGTEXT N_( "
This limits the maximum number of client
s " \
"t
o a maximum. (0 = unlimited, N = maximum clients)"
)
"t
hat can connect to the RTSP VOD. 0 means no limit."
)
vlc_module_begin
();
vlc_module_begin
();
set_shortname
(
_
(
"RTSP VoD"
)
);
set_shortname
(
_
(
"RTSP VoD"
)
);
...
@@ -64,7 +65,8 @@ vlc_module_begin();
...
@@ -64,7 +65,8 @@ vlc_module_begin();
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
add_shortcut
(
"rtsp"
);
add_shortcut
(
"rtsp"
);
add_string
(
"rtsp-host"
,
NULL
,
NULL
,
HOST_TEXT
,
HOST_LONGTEXT
,
VLC_TRUE
);
add_string
(
"rtsp-host"
,
NULL
,
NULL
,
HOST_TEXT
,
HOST_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"rtsp-throtle-users"
,
0
,
NULL
,
THROTLE_TEXT
,
THROTLE_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"rtsp-throttle-users"
,
0
,
NULL
,
THROTLE_TEXT
,
THROTLE_LONGTEXT
,
VLC_TRUE
);
vlc_module_end
();
vlc_module_end
();
/*****************************************************************************
/*****************************************************************************
...
@@ -160,7 +162,7 @@ struct vod_sys_t
...
@@ -160,7 +162,7 @@ struct vod_sys_t
httpd_host_t
*
p_rtsp_host
;
httpd_host_t
*
p_rtsp_host
;
char
*
psz_path
;
char
*
psz_path
;
int
i_port
;
int
i_port
;
int
i_throtle_users
;
int
i_throt
t
le_users
;
int
i_connections
;
int
i_connections
;
/* List of media */
/* List of media */
...
@@ -217,16 +219,16 @@ static int Open( vlc_object_t *p_this )
...
@@ -217,16 +219,16 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_sys
)
goto
error
;
if
(
!
p_sys
)
goto
error
;
p_sys
->
p_rtsp_host
=
0
;
p_sys
->
p_rtsp_host
=
0
;
var_Create
(
p_this
,
"rtsp-throtle-users"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
"rtsp-throt
t
le-users"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_sys
->
i_throtle_users
=
var_GetInteger
(
p_this
,
"rtsp-throtle-users"
);
p_sys
->
i_throt
t
le_users
=
var_GetInteger
(
p_this
,
"rtsp-throtle-users"
);
msg_Dbg
(
p_this
,
"
Allowing up to %d connections"
,
p_sys
->
i_thro
tle_users
);
msg_Dbg
(
p_this
,
"
allowing up to %d connections"
,
p_sys
->
i_throt
tle_users
);
p_sys
->
i_connections
=
0
;
p_sys
->
i_connections
=
0
;
p_sys
->
p_rtsp_host
=
p_sys
->
p_rtsp_host
=
httpd_HostNew
(
VLC_OBJECT
(
p_vod
),
url
.
psz_host
,
url
.
i_port
);
httpd_HostNew
(
VLC_OBJECT
(
p_vod
),
url
.
psz_host
,
url
.
i_port
);
if
(
!
p_sys
->
p_rtsp_host
)
if
(
!
p_sys
->
p_rtsp_host
)
{
{
msg_Err
(
p_vod
,
"cannot create
http
server (%s:%i)"
,
msg_Err
(
p_vod
,
"cannot create
RTSP
server (%s:%i)"
,
url
.
psz_host
,
url
.
i_port
);
url
.
psz_host
,
url
.
i_port
);
goto
error
;
goto
error
;
}
}
...
@@ -262,7 +264,7 @@ static void Close( vlc_object_t * p_this )
...
@@ -262,7 +264,7 @@ static void Close( vlc_object_t * p_this )
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
httpd_HostDelete
(
p_sys
->
p_rtsp_host
);
httpd_HostDelete
(
p_sys
->
p_rtsp_host
);
var_Destroy
(
p_this
,
"rtsp-throtle-users"
);
var_Destroy
(
p_this
,
"rtsp-throt
t
le-users"
);
/* TODO delete medias */
/* TODO delete medias */
free
(
p_sys
->
psz_path
);
free
(
p_sys
->
psz_path
);
...
@@ -298,13 +300,13 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
...
@@ -298,13 +300,13 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
if
(
!
p_media
->
p_rtsp_url
)
if
(
!
p_media
->
p_rtsp_url
)
{
{
msg_Err
(
p_vod
,
"cannot create
http
url (%s)"
,
p_media
->
psz_rtsp_path
);
msg_Err
(
p_vod
,
"cannot create
RTSP
url (%s)"
,
p_media
->
psz_rtsp_path
);
free
(
p_media
->
psz_rtsp_path
);
free
(
p_media
->
psz_rtsp_path
);
free
(
p_media
);
free
(
p_media
);
return
NULL
;
return
NULL
;
}
}
msg_Dbg
(
p_vod
,
"created
rtsp
url: %s"
,
p_media
->
psz_rtsp_path
);
msg_Dbg
(
p_vod
,
"created
RTSP
url: %s"
,
p_media
->
psz_rtsp_path
);
asprintf
(
&
p_media
->
psz_rtsp_control_v4
,
asprintf
(
&
p_media
->
psz_rtsp_control_v4
,
"a=control:rtsp://%%s:%d%s/trackID=%%d
\r\n
"
,
"a=control:rtsp://%%s:%d%s/trackID=%%d
\r\n
"
,
...
@@ -497,7 +499,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
...
@@ -497,7 +499,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
if
(
!
p_es
->
p_rtsp_url
)
if
(
!
p_es
->
p_rtsp_url
)
{
{
msg_Err
(
p_vod
,
"cannot create
http
url (%s)"
,
psz_urlc
);
msg_Err
(
p_vod
,
"cannot create
RTSP
url (%s)"
,
psz_urlc
);
free
(
psz_urlc
);
free
(
psz_urlc
);
free
(
p_es
);
free
(
p_es
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -601,7 +603,7 @@ static rtsp_client_t *RtspClientNew( vod_media_t *p_media, char *psz_session )
...
@@ -601,7 +603,7 @@ static rtsp_client_t *RtspClientNew( vod_media_t *p_media, char *psz_session )
p_media
->
p_vod
->
p_sys
->
i_connections
++
;
p_media
->
p_vod
->
p_sys
->
i_connections
++
;
msg_Dbg
(
p_media
->
p_vod
,
"new session: %s, connections: %d"
,
msg_Dbg
(
p_media
->
p_vod
,
"new session: %s, connections: %d"
,
psz_session
,
p_media
->
p_vod
->
p_sys
->
i_throtle_users
);
psz_session
,
p_media
->
p_vod
->
p_sys
->
i_throt
t
le_users
);
return
p_rtsp
;
return
p_rtsp
;
}
}
...
@@ -625,7 +627,7 @@ static void RtspClientDel( vod_media_t *p_media, rtsp_client_t *p_rtsp )
...
@@ -625,7 +627,7 @@ static void RtspClientDel( vod_media_t *p_media, rtsp_client_t *p_rtsp )
{
{
p_media
->
p_vod
->
p_sys
->
i_connections
--
;
p_media
->
p_vod
->
p_sys
->
i_connections
--
;
msg_Dbg
(
p_media
->
p_vod
,
"closing session: %s, connections: %d"
,
msg_Dbg
(
p_media
->
p_vod
,
"closing session: %s, connections: %d"
,
p_rtsp
->
psz_session
,
p_media
->
p_vod
->
p_sys
->
i_throtle_users
);
p_rtsp
->
psz_session
,
p_media
->
p_vod
->
p_sys
->
i_throt
t
le_users
);
while
(
p_rtsp
->
i_es
--
)
while
(
p_rtsp
->
i_es
--
)
{
{
...
@@ -699,8 +701,8 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
...
@@ -699,8 +701,8 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
psz_session
=
httpd_MsgGet
(
query
,
"Session"
);
psz_session
=
httpd_MsgGet
(
query
,
"Session"
);
if
(
!
psz_session
||
!*
psz_session
)
if
(
!
psz_session
||
!*
psz_session
)
{
{
if
(
(
p_vod
->
p_sys
->
i_throtle_users
>
0
)
&&
if
(
(
p_vod
->
p_sys
->
i_throt
t
le_users
>
0
)
&&
(
p_vod
->
p_sys
->
i_connections
>=
p_vod
->
p_sys
->
i_throtle_users
)
)
(
p_vod
->
p_sys
->
i_connections
>=
p_vod
->
p_sys
->
i_throt
t
le_users
)
)
{
{
answer
->
i_status
=
503
;
answer
->
i_status
=
503
;
answer
->
psz_status
=
strdup
(
"Too many connections"
);
answer
->
psz_status
=
strdup
(
"Too many connections"
);
...
@@ -956,8 +958,8 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
...
@@ -956,8 +958,8 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
psz_session
=
httpd_MsgGet
(
query
,
"Session"
);
psz_session
=
httpd_MsgGet
(
query
,
"Session"
);
if
(
!
psz_session
||
!*
psz_session
)
if
(
!
psz_session
||
!*
psz_session
)
{
{
if
(
(
p_vod
->
p_sys
->
i_throtle_users
>
0
)
&&
if
(
(
p_vod
->
p_sys
->
i_throt
t
le_users
>
0
)
&&
(
p_vod
->
p_sys
->
i_connections
>=
p_vod
->
p_sys
->
i_throtle_users
)
)
(
p_vod
->
p_sys
->
i_connections
>=
p_vod
->
p_sys
->
i_throt
t
le_users
)
)
{
{
answer
->
i_status
=
503
;
answer
->
i_status
=
503
;
answer
->
psz_status
=
strdup
(
"Too many connections"
);
answer
->
psz_status
=
strdup
(
"Too many connections"
);
...
...
modules/misc/svg.c
View file @
f0ffeb17
...
@@ -62,7 +62,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -62,7 +62,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
*****************************************************************************/
*****************************************************************************/
#define TEMPLATE_TEXT N_( "SVG template file" )
#define TEMPLATE_TEXT N_( "SVG template file" )
#define TEMPLATE_LONGTEXT N_( "Location of a file holding a SVG template for automatic string conversion" )
#define TEMPLATE_LONGTEXT N_( "Location of a file holding a SVG template "\
"for automatic string conversion" )
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INPUT
);
set_category
(
CAT_INPUT
);
...
@@ -125,7 +126,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -125,7 +126,7 @@ static int Create( vlc_object_t *p_this )
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
if
(
!
p_sys
)
if
(
!
p_sys
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -133,7 +134,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -133,7 +134,7 @@ static int Create( vlc_object_t *p_this )
p_sys
->
psz_template
=
svg_GetTemplate
(
p_this
);
p_sys
->
psz_template
=
svg_GetTemplate
(
p_this
);
if
(
!
p_sys
->
psz_template
)
if
(
!
p_sys
->
psz_template
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -168,7 +169,8 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
...
@@ -168,7 +169,8 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
file
=
utf8_fopen
(
psz_filename
,
"rt"
);
file
=
utf8_fopen
(
psz_filename
,
"rt"
);
if
(
!
file
)
if
(
!
file
)
{
{
msg_Warn
(
p_this
,
"SVG template file %s does not exist."
,
psz_filename
);
msg_Warn
(
p_this
,
"SVG template file %s does not exist."
,
psz_filename
);
psz_template
=
NULL
;
psz_template
=
NULL
;
}
}
else
else
...
@@ -197,7 +199,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
...
@@ -197,7 +199,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
psz_template
=
malloc
(
s
.
st_size
+
42
);
psz_template
=
malloc
(
s
.
st_size
+
42
);
if
(
!
psz_template
)
if
(
!
psz_template
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
return
NULL
;
return
NULL
;
}
}
memset
(
psz_template
,
0
,
s
.
st_size
+
1
);
memset
(
psz_template
,
0
,
s
.
st_size
+
1
);
...
@@ -400,7 +402,7 @@ static void svg_RenderPicture( filter_t *p_filter,
...
@@ -400,7 +402,7 @@ static void svg_RenderPicture( filter_t *p_filter,
&
error
);
&
error
);
if
(
error
!=
NULL
)
if
(
error
!=
NULL
)
{
{
msg_Err
(
p_filter
,
"
Error in handle_write
: %s
\n
"
,
error
->
message
);
msg_Err
(
p_filter
,
"
error while rendering SVG
: %s
\n
"
,
error
->
message
);
return
;
return
;
}
}
rsvg_handle_close
(
p_handle
,
&
error
);
rsvg_handle_close
(
p_handle
,
&
error
);
...
@@ -425,7 +427,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -425,7 +427,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg
=
(
svg_rendition_t
*
)
malloc
(
sizeof
(
svg_rendition_t
)
);
p_svg
=
(
svg_rendition_t
*
)
malloc
(
sizeof
(
svg_rendition_t
)
);
if
(
!
p_svg
)
if
(
!
p_svg
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -440,7 +442,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -440,7 +442,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg
->
psz_text
=
strdup
(
psz_string
);
p_svg
->
psz_text
=
strdup
(
psz_string
);
if
(
!
p_svg
->
psz_text
)
if
(
!
p_svg
->
psz_text
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
free
(
p_svg
);
free
(
p_svg
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -454,7 +456,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -454,7 +456,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
p_svg
->
psz_text
=
malloc
(
length
+
1
);
p_svg
->
psz_text
=
malloc
(
length
+
1
);
if
(
!
p_svg
->
psz_text
)
if
(
!
p_svg
->
psz_text
)
{
{
msg_Err
(
p_filter
,
"
O
ut of memory"
);
msg_Err
(
p_filter
,
"
o
ut of memory"
);
free
(
p_svg
);
free
(
p_svg
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
...
modules/misc/xml/libxml.c
View file @
f0ffeb17
...
@@ -38,8 +38,6 @@ static int Open ( vlc_object_t * );
...
@@ -38,8 +38,6 @@ static int Open ( vlc_object_t * );
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_ADVANCED
);
set_subcategory
(
SUBCAT_ADVANCED_XML
);
set_description
(
_
(
"XML Parser (using libxml2)"
)
);
set_description
(
_
(
"XML Parser (using libxml2)"
)
);
set_capability
(
"xml"
,
10
);
set_capability
(
"xml"
,
10
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
...
...
modules/misc/xml/xtag.c
View file @
f0ffeb17
...
@@ -85,8 +85,6 @@ static int Open ( vlc_object_t * );
...
@@ -85,8 +85,6 @@ static int Open ( vlc_object_t * );
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_ADVANCED
);
set_subcategory
(
SUBCAT_ADVANCED_XML
);
set_description
(
_
(
"Simple XML Parser"
)
);
set_description
(
_
(
"Simple XML Parser"
)
);
set_capability
(
"xml"
,
5
);
set_capability
(
"xml"
,
5
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
...
@@ -172,7 +170,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
...
@@ -172,7 +170,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
/* Open and read file */
/* Open and read file */
p_buffer
=
malloc
(
i_buffer
);
p_buffer
=
malloc
(
i_buffer
);
if
(
p_buffer
==
NULL
)
{
if
(
p_buffer
==
NULL
)
{
msg_Err
(
p_xml
,
"
ENOMEM: alloc buffer
"
);
msg_Err
(
p_xml
,
"
out of memory
"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -182,7 +180,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
...
@@ -182,7 +180,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
i_buffer
+=
i_size
;
i_buffer
+=
i_size
;
p_new
=
realloc
(
p_buffer
,
i_buffer
);
p_new
=
realloc
(
p_buffer
,
i_buffer
);
if
(
!
p_new
)
{
if
(
!
p_new
)
{
msg_Err
(
p_xml
,
"
ENOMEM: realloc buffer
"
);
msg_Err
(
p_xml
,
"
out of memory
"
);
free
(
p_buffer
);
free
(
p_buffer
);
return
NULL
;
return
NULL
;
}
}
...
@@ -192,7 +190,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
...
@@ -192,7 +190,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
if
(
i_pos
+
i_size
==
0
)
if
(
i_pos
+
i_size
==
0
)
{
{
msg_Dbg
(
p_xml
,
"empty
xml
"
);
msg_Dbg
(
p_xml
,
"empty
XML
"
);
free
(
p_buffer
);
free
(
p_buffer
);
return
0
;
return
0
;
}
}
...
@@ -200,7 +198,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
...
@@ -200,7 +198,7 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
p_root
=
xtag_new_parse
(
p_buffer
,
i_buffer
);
p_root
=
xtag_new_parse
(
p_buffer
,
i_buffer
);
if
(
!
p_root
)
if
(
!
p_root
)
{
{
msg_Warn
(
p_xml
,
"couldn't parse
xml
"
);
msg_Warn
(
p_xml
,
"couldn't parse
XML
"
);
free
(
p_buffer
);
free
(
p_buffer
);
return
0
;
return
0
;
}
}
...
...
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