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
d21fb144
Commit
d21fb144
authored
Sep 02, 2003
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the configuration system, that is what it is there for
parent
7bb574fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
91 deletions
+22
-91
modules/visualization/visual/effects.c
modules/visualization/visual/effects.c
+6
-88
modules/visualization/visual/visual.c
modules/visualization/visual/visual.c
+16
-3
No files found.
modules/visualization/visual/effects.c
View file @
d21fb144
...
...
@@ -2,7 +2,7 @@
* effects.c : Effects for the visualization system
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: effects.c,v 1.
3 2003/08/31 16:01:14 zorglub
Exp $
* $Id: effects.c,v 1.
4 2003/09/02 22:06:51 sigmunau
Exp $
*
* Authors: Clment Stenac <zorglub@via.ecp.fr>
*
...
...
@@ -30,74 +30,6 @@
#include "fft.h"
#define PEAK_SPEED 1
/*****************************************************************************
* Argument list parsers *
*****************************************************************************/
int
args_getint
(
char
*
psz_parse
,
char
*
name
,
const
int
defaut
)
{
char
*
psz_eof
;
int
i_value
;
if
(
psz_parse
!=
NULL
)
{
while
(
1
)
{
if
(
!
strncmp
(
psz_parse
,
name
,
strlen
(
name
)
)
)
{
psz_parse
+=
strlen
(
name
);
psz_eof
=
strchr
(
psz_parse
,
','
);
if
(
!
psz_eof
)
psz_eof
=
psz_parse
+
strlen
(
psz_parse
);
if
(
psz_eof
)
{
*
psz_eof
=
'\0'
;
}
i_value
=
atoi
(
++
psz_parse
);
psz_parse
=
psz_eof
;
psz_parse
++
;
return
i_value
;
}
if
(
*
psz_parse
)
psz_parse
++
;
else
break
;
}
}
return
defaut
;
}
char
*
args_getpsz
(
char
*
psz_parse
,
char
*
name
,
const
char
*
defaut
)
{
char
*
psz_eof
;
char
*
psz_value
;
if
(
psz_parse
!=
NULL
)
{
while
(
1
)
{
if
(
!
strncmp
(
psz_parse
,
name
,
strlen
(
name
)
)
)
{
psz_parse
+=
strlen
(
name
);
psz_eof
=
strchr
(
psz_parse
,
','
);
if
(
!
psz_eof
)
psz_eof
=
psz_parse
+
strlen
(
psz_parse
);
if
(
psz_eof
)
{
*
psz_eof
=
'\0'
;
}
psz_value
=
strdup
(
++
psz_parse
);
psz_parse
=
psz_eof
;
psz_parse
++
;
return
psz_value
;
}
if
(
*
psz_parse
)
psz_parse
++
;
else
break
;
}
}
return
strdup
(
defaut
);
}
/*****************************************************************************
* dummy_Run
...
...
@@ -162,24 +94,10 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
}
p_buffs
=
p_s16_buff
;
if
(
p_effect
->
psz_args
)
{
psz_parse
=
strdup
(
p_effect
->
psz_args
);
i_nb_bands
=
args_getint
(
psz_parse
,
"nb"
,
80
);
psz_parse
=
strdup
(
p_effect
->
psz_args
);
i_separ
=
args_getint
(
psz_parse
,
"separ"
,
1
);
psz_parse
=
strdup
(
p_effect
->
psz_args
);
i_amp
=
args_getint
(
psz_parse
,
"amp"
,
3
);
psz_parse
=
strdup
(
p_effect
->
psz_args
);
i_peak
=
args_getint
(
psz_parse
,
"peaks"
,
1
);
}
else
{
i_nb_bands
=
80
;
i_separ
=
1
;
i_amp
=
3
;
i_peak
=
1
;
}
i_nb_bands
=
config_GetInt
(
p_aout
,
"visual-nb"
);
i_separ
=
config_GetInt
(
p_aout
,
"visual-separ"
);
i_amp
=
config_GetInt
(
p_aout
,
"visual-amp"
);
i_peak
=
config_GetInt
(
p_aout
,
"visual-peaks"
);
if
(
i_nb_bands
==
20
)
{
...
...
@@ -468,7 +386,7 @@ int random_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
if
(
p_effect
->
psz_args
)
{
psz_parse
=
strdup
(
p_effect
->
psz_args
);
i_nb_plots
=
args_getint
(
psz_parse
,
"nb"
,
200
);
i_nb_plots
=
config_GetInt
(
p_aout
,
"visual-nb"
);
}
else
{
...
...
modules/visualization/visual/visual.c
View file @
d21fb144
...
...
@@ -2,7 +2,7 @@
* visual.c : Visualisation system
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: visual.c,v 1.
2 2003/08/29 16:56:43 zorglub
Exp $
* $Id: visual.c,v 1.
3 2003/09/02 22:06:51 sigmunau
Exp $
*
* Authors: Clment Stenac <zorglub@via.ecp.fr>
*
...
...
@@ -54,15 +54,28 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
#define WIDTH_LONGTEXT N_( \
"The width of the effects video window, in pixels." )
#define NB_TEXT N_( "Number of bands" )
#define NB_LONGTEXT N_( \
"Number of bands used by spectrum analizer, should be 20 or 80" )
static
char
*
effect_list
[]
=
{
"dummy"
,
"random"
,
"scope"
,
"spectrum"
,
NULL
};
vlc_module_begin
();
add_category_hint
(
N_
(
"visualizer"
)
,
NULL
,
VLC_FALSE
);
set_description
(
_
(
"visualizer filter"
)
);
add_string
(
"effect-list"
,
"dummy"
,
NULL
,
add_string
_from_list
(
"effect-list"
,
"dummy"
,
effect_list
,
NULL
,
ELIST_TEXT
,
ELIST_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"effect-width"
,
VOUT_WIDTH
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"effect-height"
,
VOUT_HEIGHT
,
NULL
,
HEIGHT_TEXT
,
HEIGHT_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"visual-nb"
,
80
,
NULL
,
NB_TEXT
,
NB_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"visual-separ"
,
1
,
NULL
,
NB_TEXT
,
NB_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"visual-amp"
,
3
,
NULL
,
NB_TEXT
,
NB_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"visual-peaks"
,
VLC_TRUE
,
NULL
,
NB_TEXT
,
NB_LONGTEXT
,
VLC_FALSE
);
set_capability
(
"audio filter"
,
0
);
set_callbacks
(
Open
,
Close
);
add_shortcut
(
"visualizer"
);
...
...
@@ -313,7 +326,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
{
if
(
p_aout
->
b_die
)
return
;
msleep
(
VOUT_OUTMEM_SLEEP
);
msleep
(
2
);
}
/* Blank the picture */
...
...
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