Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
64052e01
Commit
64052e01
authored
Aug 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshost: avoid vlc_object_get (this is still a really ugly hack)
parent
111ce502
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_audio_video.c
+1
-1
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+5
-14
No files found.
src/control/mediacontrol_audio_video.c
View file @
64052e01
...
...
@@ -84,7 +84,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
vlc_object_release
(
p_input
);
RAISE_NULL
(
mediacontrol_InternalException
,
"Out of memory"
);
}
snprintf
(
path
,
255
,
"object:%
d"
,
p_cache
->
i_object_id
);
snprintf
(
path
,
255
,
"object:%
ju"
,
(
uintmax_t
)(
uintptr_t
)
p_cache
);
var_SetString
(
p_vout
,
"snapshot-path"
,
path
);
var_SetString
(
p_vout
,
"snapshot-format"
,
"png"
);
...
...
src/video_output/vout_intf.c
View file @
64052e01
...
...
@@ -456,28 +456,19 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
val
.
psz_string
=
0
;
}
/* Embedded snapshot : if snapshot-path == object:object
-id
, then
/* Embedded snapshot : if snapshot-path == object:object
_ptr
, then
create a snapshot_t* and store it in
object
(object-id)
->p_private, then unlock and signal the
object
_ptr
->p_private, then unlock and signal the
waiting object.
*/
if
(
val
.
psz_string
&&
!
strncmp
(
val
.
psz_string
,
"object:"
,
7
)
)
uintmax_t
i_id
;
if
(
val
.
psz_string
&&
sscanf
(
val
.
psz_string
,
"object:%ju"
,
&
i_id
)
>
0
)
{
int
i_id
;
vlc_object_t
*
p_dest
;
vlc_object_t
*
p_dest
=
(
vlc_object_t
*
)(
uintptr_t
)
i_id
;
block_t
*
p_block
;
snapshot_t
*
p_snapshot
;
int
i_size
;
/* Destination object-id is following object: */
i_id
=
atoi
(
&
val
.
psz_string
[
7
]
);
p_dest
=
(
vlc_object_t
*
)
vlc_object_get
(
i_id
);
if
(
!
p_dest
)
{
msg_Err
(
p_vout
,
"Cannot find calling object"
);
image_HandlerDelete
(
p_image
);
return
VLC_EGENERIC
;
}
/* Object must be locked. We will unlock it once we get the
snapshot and written it to p_private */
p_dest
->
p_private
=
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