Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lyndon Brown
VLC
Commits
e4b105bd
Commit
e4b105bd
authored
4 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
snapshot: store the picture chain using vlc_picture_chain_t
parent
39b79bfe
No related branches found
Branches containing commit
Tags
1.0.0-pre2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_output/snapshot.c
+7
-10
7 additions, 10 deletions
src/video_output/snapshot.c
with
7 additions
and
10 deletions
src/video_output/snapshot.c
+
7
−
10
View file @
e4b105bd
...
...
@@ -46,9 +46,7 @@ struct vout_snapshot {
bool
is_available
;
int
request_count
;
picture_t
*
picture
;
picture_t
*
tail
;
vlc_picture_chain_t
pics
;
};
vout_snapshot_t
*
vout_snapshot_New
(
void
)
...
...
@@ -62,8 +60,7 @@ vout_snapshot_t *vout_snapshot_New(void)
snap
->
is_available
=
true
;
snap
->
request_count
=
0
;
snap
->
picture
=
NULL
;
snap
->
tail
=
NULL
;
vlc_picture_chain_Init
(
&
snap
->
pics
);
return
snap
;
}
...
...
@@ -72,8 +69,8 @@ void vout_snapshot_Destroy(vout_snapshot_t *snap)
if
(
snap
==
NULL
)
return
;
while
(
snap
->
pic
ture
)
{
picture_t
*
picture
=
vlc_picture_chain_PopFront
(
&
snap
->
pic
ture
);
while
(
!
vlc_picture_chain_IsEmpty
(
&
snap
->
pic
s
)
)
{
picture_t
*
picture
=
vlc_picture_chain_PopFront
(
&
snap
->
pic
s
.
front
);
picture_Release
(
picture
);
}
...
...
@@ -107,11 +104,11 @@ picture_t *vout_snapshot_Get(vout_snapshot_t *snap, vlc_tick_t timeout)
snap
->
request_count
++
;
/* */
while
(
snap
->
is_available
&&
!
snap
->
pic
ture
&&
while
(
snap
->
is_available
&&
vlc_picture_chain_IsEmpty
(
&
snap
->
pic
s
)
&&
vlc_cond_timedwait
(
&
snap
->
wait
,
&
snap
->
lock
,
deadline
)
==
0
);
/* */
picture_t
*
picture
=
vlc_picture_chain_PopFront
(
&
snap
->
pic
ture
);
picture_t
*
picture
=
vlc_picture_chain_PopFront
(
&
snap
->
pic
s
.
front
);
if
(
!
picture
&&
snap
->
request_count
>
0
)
snap
->
request_count
--
;
...
...
@@ -151,7 +148,7 @@ void vout_snapshot_Set(vout_snapshot_t *snap,
video_format_CopyCrop
(
&
dup
->
format
,
fmt
);
snap
->
tail
=
vlc_picture_chain_Append
(
&
snap
->
pic
ture
,
snap
->
tail
,
dup
);
snap
->
pics
.
tail
=
vlc_picture_chain_Append
(
&
snap
->
pic
s
.
front
,
snap
->
pics
.
tail
,
dup
);
snap
->
request_count
--
;
}
vlc_cond_broadcast
(
&
snap
->
wait
);
...
...
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