Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
e8867de1
Commit
e8867de1
authored
Oct 20, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
projectm: switch to filter_t
parent
19b95649
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
modules/visualization/projectm.cpp
modules/visualization/projectm.cpp
+12
-17
No files found.
modules/visualization/projectm.cpp
View file @
e8867de1
...
...
@@ -29,6 +29,7 @@
#include <vlc_plugin.h>
#include <vlc_aout.h>
#include <vlc_vout.h>
#include <vlc_filter.h>
#include <libprojectM/projectM.hpp>
...
...
@@ -52,7 +53,7 @@ static void Close ( vlc_object_t * );
vlc_module_begin
()
set_shortname
(
N_
(
"projectM"
))
set_description
(
N_
(
"libprojectM effect"
)
)
set_capability
(
"visualization"
,
0
)
set_capability
(
"visualization
2
"
,
0
)
set_category
(
CAT_AUDIO
)
set_subcategory
(
SUBCAT_AUDIO_VISUAL
)
add_file
(
"projectm-config"
,
"/usr/share/projectM/config.inp"
,
NULL
,
...
...
@@ -95,14 +96,13 @@ typedef struct
}
projectm_thread_t
;
struct
aout_
filter_sys_t
struct
filter_sys_t
{
projectm_thread_t
*
p_thread
;
};
static
void
DoWork
(
aout_instance_t
*
,
aout_filter_t
*
,
aout_buffer_t
*
,
aout_buffer_t
*
);
static
block_t
*
DoWork
(
filter_t
*
,
block_t
*
);
static
void
*
Thread
(
vlc_object_t
*
);
...
...
@@ -157,8 +157,8 @@ static int initOpenGL( projectm_thread_t *p_thread )
*/
static
int
Open
(
vlc_object_t
*
p_this
)
{
aout_filter_t
*
p_filter
=
(
aout_
filter_t
*
)
p_this
;
aout_filter_sys_t
*
p_sys
;
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
;
projectm_thread_t
*
p_thread
;
/* Test the audio format */
...
...
@@ -174,10 +174,9 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
p_filter
->
pf_do_work
=
DoWork
;
p_filter
->
b_in_place
=
true
;
p_filter
->
pf_audio_filter
=
DoWork
;
p_sys
=
p_filter
->
p_sys
=
(
aout_
filter_sys_t
*
)
malloc
(
sizeof
(
*
p_sys
)
);
p_sys
=
p_filter
->
p_sys
=
(
filter_sys_t
*
)
malloc
(
sizeof
(
*
p_sys
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
...
...
@@ -226,8 +225,8 @@ static int Open( vlc_object_t * p_this )
*/
static
void
Close
(
vlc_object_t
*
p_this
)
{
aout_filter_t
*
p_filter
=
(
aout_
filter_t
*
)
p_this
;
aout_
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
projectm_thread_t
*
p_thread
=
p_sys
->
p_thread
;
/* Stop the thread */
...
...
@@ -253,14 +252,10 @@ static void Close( vlc_object_t *p_this )
* @param p_in_buf: input buffer
* @param p_out_buf: output buffer
*/
static
void
DoWork
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
aout_buffer_t
*
p_in_buf
,
aout_buffer_t
*
p_out_buf
)
static
block_t
*
DoWork
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
)
{
projectm_thread_t
*
p_thread
=
p_filter
->
p_sys
->
p_thread
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_buffer
=
p_in_buf
->
i_buffer
;
vlc_mutex_lock
(
&
p_thread
->
lock
);
if
(
p_thread
->
i_buffer_size
>
0
)
{
...
...
@@ -273,7 +268,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
vlc_mutex_unlock
(
&
p_thread
->
lock
);
return
;
return
p_in_buf
;
}
...
...
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