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
26d4cf78
Commit
26d4cf78
authored
May 05, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved out text_style_* to src/misc/text_style.c
parent
2383257e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
60 deletions
+91
-60
src/Makefile.am
src/Makefile.am
+1
-0
src/misc/text_style.c
src/misc/text_style.c
+90
-0
src/video_output/video_text.c
src/video_output/video_text.c
+0
-60
No files found.
src/Makefile.am
View file @
26d4cf78
...
...
@@ -456,6 +456,7 @@ SOURCES_libvlc_common = \
misc/filter_chain.c
\
misc/http_auth.c
\
misc/sql.c
\
misc/text_style.c
\
$(NULL)
SOURCES_libvlc_httpd
=
\
...
...
src/misc/text_style.c
0 → 100644
View file @
26d4cf78
/*****************************************************************************
* text_style.c
*****************************************************************************
* Copyright (C) 1999-2010 the VideoLAN team
* $Id$
*
* Author: basOS G <noxelia 4t gmail , com>
*
* 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_text_style.h>
/* */
text_style_t
*
text_style_New
(
void
)
{
text_style_t
*
p_style
=
calloc
(
1
,
sizeof
(
*
p_style
)
);
if
(
!
p_style
)
return
NULL
;
/* initialize to default text style */
p_style
->
psz_fontname
=
NULL
;
p_style
->
i_font_size
=
22
;
p_style
->
i_font_color
=
0xffffff
;
p_style
->
i_font_alpha
=
0xff
;
p_style
->
i_style_flags
=
STYLE_OUTLINE
;
p_style
->
i_outline_color
=
0x000000
;
p_style
->
i_outline_alpha
=
0xff
;
p_style
->
i_shadow_color
=
0x000000
;
p_style
->
i_shadow_alpha
=
0xff
;
p_style
->
i_background_color
=
0xffffff
;
p_style
->
i_background_alpha
=
0x80
;
p_style
->
i_karaoke_background_color
=
0xffffff
;
p_style
->
i_karaoke_background_alpha
=
0xff
;
p_style
->
i_outline_width
=
1
;
p_style
->
i_shadow_width
=
0
;
p_style
->
i_spacing
=
-
1
;
return
p_style
;
}
text_style_t
*
text_style_Copy
(
text_style_t
*
p_dst
,
const
text_style_t
*
p_src
)
{
if
(
!
p_src
)
return
p_dst
;
/* */
*
p_dst
=
*
p_src
;
if
(
p_src
->
psz_fontname
)
p_dst
->
psz_fontname
=
strdup
(
p_src
->
psz_fontname
);
return
p_dst
;
}
text_style_t
*
text_style_Duplicate
(
const
text_style_t
*
p_src
)
{
if
(
!
p_src
)
return
NULL
;
text_style_t
*
p_dst
=
calloc
(
1
,
sizeof
(
*
p_dst
)
);
if
(
p_dst
)
text_style_Copy
(
p_dst
,
p_src
);
return
p_dst
;
}
void
text_style_Delete
(
text_style_t
*
p_style
)
{
if
(
p_style
)
free
(
p_style
->
psz_fontname
);
free
(
p_style
);
}
src/video_output/video_text.c
View file @
26d4cf78
...
...
@@ -155,63 +155,3 @@ void vout_OSDMessage( vlc_object_t *p_caller, int i_channel,
}
}
/* */
text_style_t
*
text_style_New
(
void
)
{
text_style_t
*
p_style
=
calloc
(
1
,
sizeof
(
*
p_style
)
);
if
(
!
p_style
)
return
NULL
;
/* initialize to default text style */
p_style
->
psz_fontname
=
NULL
;
p_style
->
i_font_size
=
22
;
p_style
->
i_font_color
=
0xffffff
;
p_style
->
i_font_alpha
=
0xff
;
p_style
->
i_style_flags
=
STYLE_OUTLINE
;
p_style
->
i_outline_color
=
0x000000
;
p_style
->
i_outline_alpha
=
0xff
;
p_style
->
i_shadow_color
=
0x000000
;
p_style
->
i_shadow_alpha
=
0xff
;
p_style
->
i_background_color
=
0xffffff
;
p_style
->
i_background_alpha
=
0x80
;
p_style
->
i_karaoke_background_color
=
0xffffff
;
p_style
->
i_karaoke_background_alpha
=
0xff
;
p_style
->
i_outline_width
=
1
;
p_style
->
i_shadow_width
=
0
;
p_style
->
i_spacing
=
-
1
;
return
p_style
;
}
text_style_t
*
text_style_Copy
(
text_style_t
*
p_dst
,
const
text_style_t
*
p_src
)
{
if
(
!
p_src
)
return
p_dst
;
/* */
*
p_dst
=
*
p_src
;
if
(
p_src
->
psz_fontname
)
p_dst
->
psz_fontname
=
strdup
(
p_src
->
psz_fontname
);
return
p_dst
;
}
text_style_t
*
text_style_Duplicate
(
const
text_style_t
*
p_src
)
{
if
(
!
p_src
)
return
NULL
;
text_style_t
*
p_dst
=
calloc
(
1
,
sizeof
(
*
p_dst
)
);
if
(
p_dst
)
text_style_Copy
(
p_dst
,
p_src
);
return
p_dst
;
}
void
text_style_Delete
(
text_style_t
*
p_style
)
{
if
(
p_style
)
free
(
p_style
->
psz_fontname
);
free
(
p_style
);
}
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