Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8ebd2349
Commit
8ebd2349
authored
May 14, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Visualisation: fix preferences, warnings and cosmetics
parent
63e333c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
34 deletions
+42
-34
modules/visualization/projectm.cpp
modules/visualization/projectm.cpp
+42
-34
No files found.
modules/visualization/projectm.cpp
View file @
8ebd2349
/*****************************************************************************
* projectm: visualization module based on libprojectM
*****************************************************************************
* Copyright
(C) 2009
the VideoLAN team
* Copyright
© 2009-2011
the VideoLAN team
* $Id$
*
* Authors: Rémi Duraffort <ivoire@videolan.org>
* Laurent Aimar
*
* 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
...
...
@@ -39,7 +40,6 @@
#include <libprojectM/projectM.hpp>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -90,9 +90,9 @@ vlc_module_begin ()
add_directory
(
"projectm-preset-path"
,
"/usr/share/projectM/presets"
,
#endif
PRESET_PATH_TXT
,
PRESET_PATH_LONGTXT
,
true
)
add_
font
(
"projectm-title-font"
,
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf"
,
add_
loadfile
(
"projectm-title-font"
,
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf"
,
TITLE_FONT_TXT
,
TITLE_FONT_LONGTXT
,
true
)
add_
font
(
"projectm-menu-font"
,
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf"
,
add_
loadfile
(
"projectm-menu-font"
,
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf"
,
MENU_FONT_TXT
,
MENU_FONT_LONGTXT
,
true
)
#endif
add_integer
(
"projectm-width"
,
800
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
...
...
@@ -267,6 +267,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
static
int
VoutCallback
(
vlc_object_t
*
p_vout
,
char
const
*
psz_name
,
vlc_value_t
oldv
,
vlc_value_t
newv
,
void
*
p_data
)
{
VLC_UNUSED
(
p_vout
);
VLC_UNUSED
(
oldv
);
vout_display_t
*
p_vd
=
(
vout_display_t
*
)
p_data
;
if
(
!
strcmp
(
psz_name
,
"fullscreen"
)
)
...
...
@@ -284,11 +285,11 @@ static void *Thread( void *p_data )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_data
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
int
cancel
=
vlc_savecancel
();
video_format_t
fmt
;
vlc_gl_t
*
gl
;
int
i_last_width
=
0
;
int
i_last_height
=
0
;
unsigned
int
i_last_width
=
0
;
unsigned
int
i_last_height
=
0
;
locale_t
loc
;
locale_t
oldloc
;
...
...
@@ -302,6 +303,8 @@ static void *Thread( void *p_data )
projectM
::
Settings
settings
;
#endif
vlc_savecancel
();
/* Create the openGL provider */
p_sys
->
p_vout
=
(
vout_thread_t
*
)
vlc_object_create
(
p_filter
,
sizeof
(
vout_thread_t
)
);
...
...
@@ -345,8 +348,10 @@ static void *Thread( void *p_data )
goto
error
;
}
/* Work-around the projectM locale bug */
loc
=
newlocale
(
LC_NUMERIC_MASK
,
"C"
,
NULL
);
oldloc
=
uselocale
(
loc
);
/* Create the projectM object */
#ifndef HAVE_PROJECTM2
psz_config
=
var_InheritString
(
p_filter
,
"projectm-config"
);
...
...
@@ -362,6 +367,7 @@ static void *Thread( void *p_data )
free
(
psz_data_path
);
}
#endif
psz_title_font
=
var_InheritString
(
p_filter
,
"projectm-title-font"
);
psz_menu_font
=
var_InheritString
(
p_filter
,
"projectm-menu-font"
);
...
...
@@ -380,12 +386,14 @@ static void *Thread( void *p_data )
settings
.
aspectCorrection
=
1
;
settings
.
easterEgg
=
1
;
settings
.
shuffleEnabled
=
1
;
p_projectm
=
new
projectM
(
settings
);
free
(
psz_menu_font
);
free
(
psz_title_font
);
free
(
psz_preset_path
);
#endif
#endif
/* HAVE_PROJECTM2 */
p_sys
->
i_buffer_size
=
p_projectm
->
pcm
()
->
maxsamples
;
p_sys
->
p_buffer
=
(
float
*
)
calloc
(
p_sys
->
i_buffer_size
,
sizeof
(
float
)
);
...
...
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