Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
d7aca869
Commit
d7aca869
authored
6 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
goom: keep track of video format
parent
91324233
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/visualization/goom.c
+12
-14
12 additions, 14 deletions
modules/visualization/goom.c
with
12 additions
and
14 deletions
modules/visualization/goom.c
+
12
−
14
View file @
d7aca869
...
...
@@ -79,9 +79,8 @@ vlc_module_end ()
typedef
struct
{
vlc_thread_t
thread
;
video_format_t
fmt
;
int
i_width
;
int
i_height
;
vout_thread_t
*
p_vout
;
int
i_speed
;
...
...
@@ -111,22 +110,20 @@ static int Open( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
goom_thread_t
*
p_thread
;
video_format_t
fmt
;
/* Create goom thread */
p_filter
->
p_sys
=
p_thread
=
calloc
(
1
,
sizeof
(
*
p_thread
)
);
const
int
width
=
p_thread
->
i_width
=
var_InheritInteger
(
p_filter
,
"goom-width"
);
const
int
height
=
p_thread
->
i_height
=
var_InheritInteger
(
p_filter
,
"goom-height"
);
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
const
int
width
=
var_InheritInteger
(
p_filter
,
"goom-width"
);
const
int
height
=
var_InheritInteger
(
p_filter
,
"goom-height"
);
fmt
.
i_width
=
fmt
.
i_visible_width
=
width
;
fmt
.
i_height
=
fmt
.
i_visible_height
=
height
;
fmt
.
i_chroma
=
VLC_CODEC_RGB32
;
fmt
.
i_sar_num
=
fmt
.
i_sar_den
=
1
;
p_thread
->
fmt
.
i_width
=
p_thread
->
fmt
.
i_visible_width
=
width
;
p_thread
->
fmt
.
i_height
=
p_thread
->
fmt
.
i_visible_height
=
height
;
p_thread
->
fmt
.
i_chroma
=
VLC_CODEC_RGB32
;
p_thread
->
fmt
.
i_sar_num
=
p_thread
->
fmt
.
i_sar_den
=
1
;
p_thread
->
p_vout
=
aout_filter_RequestVout
(
p_filter
,
NULL
,
&
fmt
);
p_thread
->
p_vout
=
aout_filter_RequestVout
(
p_filter
,
NULL
,
&
p_thread
->
fmt
);
if
(
p_thread
->
p_vout
==
NULL
)
{
msg_Err
(
p_filter
,
"no suitable vout module"
);
...
...
@@ -280,7 +277,7 @@ static void *Thread( void *p_thread_data )
PluginInfo
*
p_plugin_info
;
int
canc
=
vlc_savecancel
();
p_plugin_info
=
goom_init
(
p_thread
->
i_width
,
p_thread
->
i_height
);
p_plugin_info
=
goom_init
(
p_thread
->
fmt
.
i_width
,
p_thread
->
fmt
.
i_height
);
for
(
;;
)
{
...
...
@@ -319,7 +316,8 @@ static void *Thread( void *p_thread_data )
if
(
unlikely
(
p_pic
==
NULL
)
)
continue
;
memcpy
(
p_pic
->
p
[
0
].
p_pixels
,
plane
,
p_thread
->
i_width
*
p_thread
->
i_height
*
4
);
memcpy
(
p_pic
->
p
[
0
].
p_pixels
,
plane
,
p_thread
->
fmt
.
i_width
*
p_thread
->
fmt
.
i_height
*
4
);
p_pic
->
date
=
date_Get
(
&
i_pts
)
+
GOOM_DELAY
;
vout_PutPicture
(
p_thread
->
p_vout
,
p_pic
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment