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
6c4aa108
Commit
6c4aa108
authored
Jul 25, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No functionnal changes (vout).
parent
2b5b0dc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
35 deletions
+37
-35
src/video_output/display.c
src/video_output/display.c
+7
-7
src/video_output/video_output.c
src/video_output/video_output.c
+24
-24
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+6
-4
No files found.
src/video_output/display.c
View file @
6c4aa108
...
...
@@ -1567,12 +1567,12 @@ void vout_SendDisplayEventMouse(vout_thread_t *vout, const vlc_mouse_t *m)
if
(
vout
->
p
->
p_spu
&&
spu_ProcessMouse
(
vout
->
p
->
p_spu
,
m
,
&
vout
->
p
->
display
.
vd
->
source
))
return
;
vlc_mutex_lock
(
&
vout
->
p
->
vfilter_
lock
);
if
(
vout
->
p
->
vfilter_
chain
)
{
if
(
!
filter_chain_MouseFilter
(
vout
->
p
->
vfilter_
chain
,
&
tmp
,
m
))
vlc_mutex_lock
(
&
vout
->
p
->
filter
.
lock
);
if
(
vout
->
p
->
filter
.
chain
)
{
if
(
!
filter_chain_MouseFilter
(
vout
->
p
->
filter
.
chain
,
&
tmp
,
m
))
m
=
&
tmp
;
}
vlc_mutex_unlock
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_unlock
(
&
vout
->
p
->
filter
.
lock
);
if
(
vlc_mouse_HasMoved
(
&
vout
->
p
->
mouse
,
m
))
{
vout_SendEventMouseMoved
(
vout
,
m
->
i_x
,
m
->
i_y
);
...
...
@@ -1605,14 +1605,14 @@ static void DummyVoutSendDisplayEventMouse(vout_thread_t *vout, vlc_mouse_t *fal
if
(
!
vout
->
p
)
{
p
.
mouse
=
*
fallback
;
vlc_mutex_init
(
&
p
.
vfilter_
lock
);
p
.
vfilter_
chain
=
NULL
;
vlc_mutex_init
(
&
p
.
filter
.
lock
);
p
.
filter
.
chain
=
NULL
;
p
.
p_spu
=
NULL
;
vout
->
p
=
&
p
;
}
vout_SendDisplayEventMouse
(
vout
,
m
);
if
(
vout
->
p
==
&
p
)
{
vlc_mutex_destroy
(
&
p
.
vfilter_
lock
);
vlc_mutex_destroy
(
&
p
.
filter
.
lock
);
*
fallback
=
p
.
mouse
;
vout
->
p
=
NULL
;
}
...
...
src/video_output/video_output.c
View file @
6c4aa108
...
...
@@ -125,7 +125,7 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
/* Initialize locks */
vlc_mutex_init
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_init
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_init
(
&
vout
->
p
->
filter
.
lock
);
vlc_mutex_init
(
&
vout
->
p
->
spu_lock
);
/* Attach the new object now so we can use var inheritance below */
...
...
@@ -247,7 +247,7 @@ static void VoutDestructor(vlc_object_t *object)
/* Destroy the locks */
vlc_mutex_destroy
(
&
vout
->
p
->
spu_lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
filter
.
lock
);
vout_control_Clean
(
&
vout
->
p
->
control
);
/* */
...
...
@@ -559,9 +559,9 @@ static picture_t *ThreadDisplayGetDecodedPicture(vout_thread_t *vout,
const
bool
is_paused
=
vout
->
p
->
pause
.
is_on
;
bool
redisplay
=
is_paused
&&
!
now
&&
vout
->
p
->
displayed
.
decoded
;
mtime_t
v
filter_delay
=
0
;
mtime_t
filter_delay
=
0
;
for
(
int
i
=
0
;
i
<
VOUT_FILTER_DELAYS
;
i
++
)
vfilter_delay
=
__MAX
(
vfilter_delay
,
vout
->
p
->
vfilter_
delay
[
i
]);
filter_delay
=
__MAX
(
filter_delay
,
vout
->
p
->
filter
.
delay
[
i
]);
/* FIXME/XXX we must redisplay the last decoded picture (because
* of potential vout updated, or filters update or SPU update)
...
...
@@ -578,7 +578,7 @@ static picture_t *ThreadDisplayGetDecodedPicture(vout_thread_t *vout,
*
is_forced
=
peek
->
b_force
||
is_paused
||
now
;
*
deadline
=
(
*
is_forced
?
date
:
peek
->
date
)
-
vout_chrono_GetHigh
(
&
vout
->
p
->
render
)
-
v
filter_delay
;
filter_delay
;
picture_Release
(
peek
);
}
else
{
redisplay
=
true
;
...
...
@@ -593,7 +593,7 @@ static picture_t *ThreadDisplayGetDecodedPicture(vout_thread_t *vout,
}
/* */
*
is_forced
=
true
;
*
deadline
=
date
-
vout_chrono_GetHigh
(
&
vout
->
p
->
render
)
-
v
filter_delay
;
*
deadline
=
date
-
vout_chrono_GetHigh
(
&
vout
->
p
->
render
)
-
filter_delay
;
}
if
(
*
deadline
>
VOUT_MWAIT_TOLERANCE
)
*
deadline
-=
VOUT_MWAIT_TOLERANCE
;
...
...
@@ -658,14 +658,14 @@ static int ThreadDisplayPicture(vout_thread_t *vout,
picture_t
*
filtered
=
NULL
;
if
(
decoded
)
{
vlc_mutex_lock
(
&
vout
->
p
->
vfilter_
lock
);
filtered
=
filter_chain_VideoFilter
(
vout
->
p
->
vfilter_
chain
,
decoded
);
vlc_mutex_lock
(
&
vout
->
p
->
filter
.
lock
);
filtered
=
filter_chain_VideoFilter
(
vout
->
p
->
filter
.
chain
,
decoded
);
//assert(filtered == decoded); // TODO implement
vlc_mutex_unlock
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_unlock
(
&
vout
->
p
->
filter
.
lock
);
if
(
!
filtered
)
continue
;
vout
->
p
->
vfilter_delay
[
vout
->
p
->
vfilter_
delay_index
]
=
decoded
->
date
-
filtered
->
date
;
vout
->
p
->
vfilter_delay_index
=
(
vout
->
p
->
vfilter_
delay_index
+
1
)
%
VOUT_FILTER_DELAYS
;
vout
->
p
->
filter
.
delay
[
vout
->
p
->
filter
.
delay_index
]
=
decoded
->
date
-
filtered
->
date
;
vout
->
p
->
filter
.
delay_index
=
(
vout
->
p
->
filter
.
delay_index
+
1
)
%
VOUT_FILTER_DELAYS
;
}
/*
...
...
@@ -812,18 +812,18 @@ static void ThreadChangeFilters(vout_thread_t *vout, const char *filters)
es_format_Init
(
&
fmt
,
VIDEO_ES
,
vout
->
p
->
original
.
i_chroma
);
fmt
.
video
=
vout
->
p
->
original
;
vlc_mutex_lock
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_lock
(
&
vout
->
p
->
filter
.
lock
);
filter_chain_Reset
(
vout
->
p
->
vfilter_
chain
,
&
fmt
,
&
fmt
);
if
(
filter_chain_AppendFromString
(
vout
->
p
->
vfilter_
chain
,
filter_chain_Reset
(
vout
->
p
->
filter
.
chain
,
&
fmt
,
&
fmt
);
if
(
filter_chain_AppendFromString
(
vout
->
p
->
filter
.
chain
,
filters
)
<
0
)
msg_Err
(
vout
,
"Video filter chain creation failed"
);
vlc_mutex_unlock
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_unlock
(
&
vout
->
p
->
filter
.
lock
);
vout
->
p
->
vfilter_
delay_index
=
0
;
vout
->
p
->
filter
.
delay_index
=
0
;
for
(
int
i
=
0
;
i
<
VOUT_FILTER_DELAYS
;
i
++
)
vout
->
p
->
vfilter_
delay
[
i
]
=
0
;
vout
->
p
->
filter
.
delay
[
i
]
=
0
;
}
static
void
ThreadChangeSubFilters
(
vout_thread_t
*
vout
,
const
char
*
filters
)
...
...
@@ -837,9 +837,9 @@ static void ThreadChangeSubMargin(vout_thread_t *vout, int margin)
static
void
ThreadFilterFlush
(
vout_thread_t
*
vout
)
{
vlc_mutex_lock
(
&
vout
->
p
->
vfilter_
lock
);
filter_chain_VideoFlush
(
vout
->
p
->
vfilter_
chain
);
vlc_mutex_unlock
(
&
vout
->
p
->
vfilter_
lock
);
vlc_mutex_lock
(
&
vout
->
p
->
filter
.
lock
);
filter_chain_VideoFlush
(
vout
->
p
->
filter
.
chain
);
vlc_mutex_unlock
(
&
vout
->
p
->
filter
.
lock
);
}
static
void
ThreadChangePause
(
vout_thread_t
*
vout
,
bool
is_paused
,
mtime_t
date
)
...
...
@@ -1008,12 +1008,12 @@ static int ThreadStart(vout_thread_t *vout, const vout_display_state_t *state)
vout
->
p
->
display_pool
=
NULL
;
vout
->
p
->
private_pool
=
NULL
;
vout
->
p
->
vfilter_
chain
=
vout
->
p
->
filter
.
chain
=
filter_chain_New
(
vout
,
"video filter2"
,
false
,
VoutVideoFilterAllocationSetup
,
NULL
,
vout
);
vout
->
p
->
vfilter_
delay_index
=
0
;
vout
->
p
->
filter
.
delay_index
=
0
;
for
(
int
i
=
0
;
i
<
VOUT_FILTER_DELAYS
;
i
++
)
vout
->
p
->
vfilter_
delay
[
i
]
=
0
;
vout
->
p
->
filter
.
delay
[
i
]
=
0
;
vout_display_state_t
state_default
;
if
(
!
state
)
{
...
...
@@ -1049,7 +1049,7 @@ static int ThreadStart(vout_thread_t *vout, const vout_display_state_t *state)
static
void
ThreadStop
(
vout_thread_t
*
vout
,
vout_display_state_t
*
state
)
{
/* Destroy the video filters2 */
filter_chain_Delete
(
vout
->
p
->
vfilter_
chain
);
filter_chain_Delete
(
vout
->
p
->
filter
.
chain
);
/* Destroy translation tables */
if
(
vout
->
p
->
display
.
vd
)
{
...
...
src/video_output/vout_internal.h
View file @
6c4aa108
...
...
@@ -130,10 +130,12 @@ struct vout_thread_sys_t
bool
is_late_dropped
;
/* Video filter2 chain */
vlc_mutex_t
vfilter_lock
;
filter_chain_t
*
vfilter_chain
;
unsigned
vfilter_delay_index
;
mtime_t
vfilter_delay
[
VOUT_FILTER_DELAYS
];
struct
{
vlc_mutex_t
lock
;
filter_chain_t
*
chain
;
unsigned
delay_index
;
mtime_t
delay
[
VOUT_FILTER_DELAYS
];
}
filter
;
/* */
vlc_mouse_t
mouse
;
...
...
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