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
1f02e8c0
Commit
1f02e8c0
authored
Apr 19, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visual: do not keep unused fields
parent
3c4189bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
22 deletions
+20
-22
modules/visualization/visual/visual.c
modules/visualization/visual/visual.c
+20
-22
No files found.
modules/visualization/visual/visual.c
View file @
1f02e8c0
...
...
@@ -175,9 +175,6 @@ struct filter_sys_t
{
vout_thread_t
*
p_vout
;
int
i_width
;
int
i_height
;
int
i_effect
;
visual_effect_t
**
effect
;
};
...
...
@@ -191,21 +188,20 @@ static int Open( vlc_object_t *p_this )
filter_sys_t
*
p_sys
;
char
*
psz_effects
,
*
psz_parser
;
video_format_t
fmt
;
p_sys
=
p_filter
->
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
if
(
unlikely
(
p_sys
==
NULL
)
)
return
VLC_EGENERIC
;
p_sys
->
i_height
=
var_InheritInteger
(
p_filter
,
"effect-height
"
);
p_sys
->
i_width
=
var_InheritInteger
(
p_filter
,
"effect-width"
);
/* No resolution under 400x532 */
if
(
p_sys
->
i_height
<
400
)
p_sys
->
i_height
=
400
;
if
(
p_sys
->
i_width
<
532
)
p_sys
->
i_width
=
532
;
/* Work on even dimensions */
if
(
(
p_sys
->
i_height
%
2
)
!=
0
)
p_sys
->
i_height
--
;
if
(
(
p_sys
->
i_width
%
2
)
!=
0
)
p_sys
->
i_width
--
;
int
width
=
var_InheritInteger
(
p_filter
,
"effect-width
"
);
int
height
=
var_InheritInteger
(
p_filter
,
"effect-width"
);
/* No resolution under 400x532 and no odd dimension */
if
(
width
<
532
)
width
=
532
;
width
&=
~
1
;
if
(
height
<
400
)
height
=
400
;
height
&=
~
1
;
p_sys
->
i_effect
=
0
;
p_sys
->
effect
=
NULL
;
...
...
@@ -220,8 +216,8 @@ static int Open( vlc_object_t *p_this )
p_effect
=
malloc
(
sizeof
(
visual_effect_t
)
);
if
(
!
p_effect
)
break
;
p_effect
->
i_width
=
p_sys
->
i_
width
;
p_effect
->
i_height
=
p_sys
->
i_
height
;
p_effect
->
i_width
=
width
;
p_effect
->
i_height
=
height
;
p_effect
->
i_nb_chans
=
aout_FormatNbChannels
(
&
p_filter
->
fmt_in
.
audio
);
p_effect
->
i_idx_left
=
0
;
p_effect
->
i_idx_right
=
__MIN
(
1
,
p_effect
->
i_nb_chans
-
1
);
...
...
@@ -295,13 +291,15 @@ static int Open( vlc_object_t *p_this )
}
/* Open the video output */
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
fmt
.
i_width
=
fmt
.
i_visible_width
=
p_sys
->
i_width
;
fmt
.
i_height
=
fmt
.
i_visible_height
=
p_sys
->
i_height
;
fmt
.
i_chroma
=
VLC_CODEC_I420
;
fmt
.
i_sar_num
=
fmt
.
i_sar_den
=
1
;
video_format_t
fmt
=
{
.
i_chroma
=
VLC_CODEC_I420
,
.
i_width
=
width
,
.
i_height
=
height
,
.
i_visible_width
=
width
,
.
i_visible_height
=
height
,
.
i_sar_num
=
1
,
.
i_sar_den
=
1
,
};
p_sys
->
p_vout
=
aout_filter_RequestVout
(
p_filter
,
NULL
,
&
fmt
);
if
(
p_sys
->
p_vout
==
NULL
)
{
...
...
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