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
340272f8
Commit
340272f8
authored
Feb 05, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify input_ressource_RequestVout to allow avoiding recycling.
parent
00b6b762
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
src/input/decoder.c
src/input/decoder.c
+3
-7
src/input/ressource.c
src/input/ressource.c
+8
-6
src/input/ressource.h
src/input/ressource.h
+1
-1
No files found.
src/input/decoder.c
View file @
340272f8
...
...
@@ -2030,7 +2030,7 @@ static void DeleteDecoder( decoder_t * p_dec )
vout_ChangePause
(
p_owner
->
p_vout
,
false
,
mdate
()
);
/* */
input_ressource_RequestVout
(
p_owner
->
p_input
->
p
->
p_ressource
,
p_owner
->
p_vout
,
NULL
);
input_ressource_RequestVout
(
p_owner
->
p_input
->
p
->
p_ressource
,
p_owner
->
p_vout
,
NULL
,
true
);
input_SendEventVout
(
p_owner
->
p_input
);
}
...
...
@@ -2110,11 +2110,7 @@ static vout_thread_t *aout_request_vout( void *p_private,
decoder_t
*
p_dec
=
p_private
;
input_thread_t
*
p_input
=
p_dec
->
p_owner
->
p_input
;
p_vout
=
input_ressource_RequestVout
(
p_input
->
p
->
p_ressource
,
p_vout
,
p_fmt
);
/* TODO it would be better to give b_recyle to input_ressource_RequestVout
* as here we are not sure of which vout we destroy */
if
(
!
b_recyle
)
input_ressource_TerminateVout
(
p_input
->
p
->
p_ressource
);
p_vout
=
input_ressource_RequestVout
(
p_input
->
p
->
p_ressource
,
p_vout
,
p_fmt
,
b_recyle
);
input_SendEventVout
(
p_input
);
return
p_vout
;
...
...
@@ -2293,7 +2289,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
vlc_mutex_unlock
(
&
p_owner
->
lock
);
p_vout
=
input_ressource_RequestVout
(
p_owner
->
p_input
->
p
->
p_ressource
,
p_vout
,
&
p_dec
->
fmt_out
.
video
);
p_vout
,
&
p_dec
->
fmt_out
.
video
,
true
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
p_owner
->
p_vout
=
p_vout
;
...
...
src/input/ressource.c
View file @
340272f8
...
...
@@ -177,7 +177,8 @@ static void DisplayVoutTitle( input_ressource_t *p_ressource,
free
(
psz_nowplaying
);
}
static
vout_thread_t
*
RequestVout
(
input_ressource_t
*
p_ressource
,
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
)
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
,
bool
b_recycle
)
{
if
(
!
p_vout
&&
!
p_fmt
)
{
...
...
@@ -232,9 +233,10 @@ static vout_thread_t *RequestVout( input_ressource_t *p_ressource,
const
int
i_vout_active
=
p_ressource
->
i_vout
;
vlc_mutex_unlock
(
&
p_ressource
->
lock_vout
);
if
(
p_ressource
->
p_vout_free
||
i_vout_active
>
0
)
if
(
p_ressource
->
p_vout_free
||
i_vout_active
>
0
||
!
b_recycle
)
{
msg_Dbg
(
p_ressource
->
p_input
,
"detroying vout (already one saved or active)"
);
if
(
b_recycle
)
msg_Dbg
(
p_ressource
->
p_input
,
"detroying vout (already one saved or active)"
);
vout_CloseAndRelease
(
p_vout
);
}
else
...
...
@@ -388,10 +390,10 @@ void input_ressource_SetInput( input_ressource_t *p_ressource, input_thread_t *p
}
vout_thread_t
*
input_ressource_RequestVout
(
input_ressource_t
*
p_ressource
,
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
)
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
,
bool
b_recycle
)
{
vlc_mutex_lock
(
&
p_ressource
->
lock
);
vout_thread_t
*
p_ret
=
RequestVout
(
p_ressource
,
p_vout
,
p_fmt
);
vout_thread_t
*
p_ret
=
RequestVout
(
p_ressource
,
p_vout
,
p_fmt
,
b_recycle
);
vlc_mutex_unlock
(
&
p_ressource
->
lock
);
return
p_ret
;
...
...
@@ -406,7 +408,7 @@ void input_ressource_HoldVouts( input_ressource_t *p_ressource, vout_thread_t **
}
void
input_ressource_TerminateVout
(
input_ressource_t
*
p_ressource
)
{
input_ressource_RequestVout
(
p_ressource
,
NULL
,
NULL
);
input_ressource_RequestVout
(
p_ressource
,
NULL
,
NULL
,
false
);
}
bool
input_ressource_HasVout
(
input_ressource_t
*
p_ressource
)
{
...
...
src/input/ressource.h
View file @
340272f8
...
...
@@ -60,7 +60,7 @@ aout_instance_t *input_ressource_HoldAout( input_ressource_t *p_ressource );
/**
* This function handles vout request.
*/
vout_thread_t
*
input_ressource_RequestVout
(
input_ressource_t
*
,
vout_thread_t
*
,
video_format_t
*
);
vout_thread_t
*
input_ressource_RequestVout
(
input_ressource_t
*
,
vout_thread_t
*
,
video_format_t
*
,
bool
b_recycle
);
/**
* This function return one of the current vout if any.
...
...
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