Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d799a0ae
Commit
d799a0ae
authored
Mar 02, 2005
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove debug messages, correct automatic positioning when an mosaic-order
is specified
parent
281e0776
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
modules/video_filter/mosaic.c
modules/video_filter/mosaic.c
+27
-10
No files found.
modules/video_filter/mosaic.c
View file @
d799a0ae
...
@@ -174,7 +174,6 @@ static int CreateFilter( vlc_object_t *p_this )
...
@@ -174,7 +174,6 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys
->
ppsz_order
=
NULL
;
p_sys
->
ppsz_order
=
NULL
;
psz_order
=
var_CreateGetString
(
p_filter
->
p_libvlc
,
"mosaic-order"
);
psz_order
=
var_CreateGetString
(
p_filter
->
p_libvlc
,
"mosaic-order"
);
fprintf
(
stderr
,
"psz_order : %s (%p)
\n
"
,
psz_order
,
psz_order
);
if
(
psz_order
[
0
]
!=
0
)
if
(
psz_order
[
0
]
!=
0
)
{
{
i_index
=
0
;
i_index
=
0
;
...
@@ -192,11 +191,6 @@ static int CreateFilter( vlc_object_t *p_this )
...
@@ -192,11 +191,6 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys
->
i_order_length
=
i_index
;
p_sys
->
i_order_length
=
i_index
;
}
}
for
(
i_index
=
0
;
i_index
<
p_sys
->
i_order_length
;
i_index
++
)
{
fprintf
(
stderr
,
"%d/%d : %s
\n
"
,
i_index
,
p_sys
->
i_order_length
,
p_sys
->
ppsz_order
[
i_index
]
);
}
var_AddCallback
(
p_filter
->
p_libvlc
,
"mosaic-alpha"
,
var_AddCallback
(
p_filter
->
p_libvlc
,
"mosaic-alpha"
,
MosaicCallback
,
p_sys
);
MosaicCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc
,
"mosaic-height"
,
var_AddCallback
(
p_filter
->
p_libvlc
,
"mosaic-height"
,
...
@@ -231,10 +225,20 @@ static void DestroyFilter( vlc_object_t *p_this )
...
@@ -231,10 +225,20 @@ static void DestroyFilter( vlc_object_t *p_this )
{
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
int
i_index
;
image_HandlerDelete
(
p_sys
->
p_image
);
image_HandlerDelete
(
p_sys
->
p_image
);
image_HandlerDelete
(
p_sys
->
p_image2
);
image_HandlerDelete
(
p_sys
->
p_image2
);
if
(
p_sys
->
i_order_length
)
{
for
(
i_index
=
0
;
i_index
<
p_sys
->
i_order_length
;
i_index
++
)
{
free
(
p_sys
->
ppsz_order
[
i_index
]
);
}
free
(
p_sys
->
ppsz_order
);
}
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-alpha"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-alpha"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-height"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-height"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-width"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"mosaic-width"
);
...
@@ -295,7 +299,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
...
@@ -295,7 +299,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if
(
p_sys
->
i_pos
==
0
)
/* use automatic positioning */
if
(
p_sys
->
i_pos
==
0
)
/* use automatic positioning */
{
{
int
i_numpics
=
0
;
int
i_numpics
=
p_sys
->
i_order_length
;
/* keep slots and all */
for
(
i_index
=
0
;
for
(
i_index
=
0
;
i_index
<
p_picture_vout
->
i_picture_num
;
i_index
<
p_picture_vout
->
i_picture_num
;
i_index
++
)
i_index
++
)
...
@@ -303,6 +307,22 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
...
@@ -303,6 +307,22 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if
(
p_picture_vout
->
p_pic
[
i_index
].
i_status
if
(
p_picture_vout
->
p_pic
[
i_index
].
i_status
==
PICTURE_VOUT_E_OCCUPIED
)
{
==
PICTURE_VOUT_E_OCCUPIED
)
{
i_numpics
++
;
i_numpics
++
;
if
(
p_sys
->
i_order_length
&&
p_picture_vout
->
p_pic
[
i_index
].
psz_id
!=
0
){
/* we also want to leave slots for images given in mosaic-order
that are not available in p_vout_picture */
int
i
;
for
(
i
=
0
;
i
<
p_sys
->
i_order_length
;
i
++
)
{
if
(
!
strcmp
(
p_sys
->
ppsz_order
[
i
],
p_picture_vout
->
p_pic
[
i_index
].
psz_id
)
)
{
i_numpics
--
;
break
;
}
}
}
}
}
}
}
p_sys
->
i_rows
=
((
int
)
ceil
(
sqrt
(
(
float
)
i_numpics
)));
p_sys
->
i_rows
=
((
int
)
ceil
(
sqrt
(
(
float
)
i_numpics
)));
...
@@ -352,8 +372,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
...
@@ -352,8 +372,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
i_row
=
(
i_real_index
/
p_sys
->
i_cols
)
%
p_sys
->
i_rows
;
i_row
=
(
i_real_index
/
p_sys
->
i_cols
)
%
p_sys
->
i_rows
;
i_col
=
i_real_index
%
p_sys
->
i_cols
;
i_col
=
i_real_index
%
p_sys
->
i_cols
;
/* Convert the images */
/* Convert the images */
/* fprintf (stderr, "Input image %ix%i %4.4s\n",
/* fprintf (stderr, "Input image %ix%i %4.4s\n",
p_picture_vout->p_pic[i_index].p_picture->format.i_width,
p_picture_vout->p_pic[i_index].p_picture->format.i_width,
...
@@ -479,7 +497,6 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
...
@@ -479,7 +497,6 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
void
*
p_data
)
void
*
p_data
)
{
{
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_data
;
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_data
;
fprintf
(
stderr
,
"Callback"
);
if
(
!
strcmp
(
psz_var
,
"mosaic-alpha"
)
)
if
(
!
strcmp
(
psz_var
,
"mosaic-alpha"
)
)
{
{
msg_Dbg
(
p_this
,
"Changing alpha from %d/255 to %d/255"
,
msg_Dbg
(
p_this
,
"Changing alpha from %d/255 to %d/255"
,
...
...
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