Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
aaf2ac90
Commit
aaf2ac90
authored
Mar 08, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed libvlc "object:" snapshot hack.
parent
ae9c402f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
56 deletions
+16
-56
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+16
-56
No files found.
src/video_output/vout_intf.c
View file @
aaf2ac90
...
...
@@ -702,35 +702,7 @@ error:
msg_Err
(
p_vout
,
"could not save snapshot"
);
return
VLC_EGENERIC
;
}
/**
* This function will write a snapshot to memory using a snapshot_t structure
*/
static
void
VoutMemorySnapshot
(
vout_thread_t
*
p_vout
,
snapshot_t
*
p_snapshot
,
const
block_t
*
p_image
,
const
video_format_t
*
p_fmt
)
{
VLC_UNUSED
(
p_vout
);
/* TODO fix that ugliness */
vlc_mutex_lock
(
&
p_snapshot
->
p_mutex
);
p_snapshot
->
i_width
=
p_image
?
p_fmt
->
i_width
:
0
;
p_snapshot
->
i_height
=
p_image
?
p_fmt
->
i_height
:
0
;
p_snapshot
->
date
=
p_image
?
p_image
->
i_pts
:
0
;
p_snapshot
->
i_datasize
=
0
;
p_snapshot
->
p_data
=
NULL
;
if
(
p_image
)
{
p_snapshot
->
p_data
=
malloc
(
p_image
->
i_buffer
);
if
(
p_snapshot
->
p_data
)
{
p_snapshot
->
i_datasize
=
p_image
->
i_buffer
;
memcpy
(
p_snapshot
->
p_data
,
p_image
->
p_buffer
,
p_image
->
i_buffer
);
}
}
vlc_cond_signal
(
&
p_snapshot
->
p_condvar
);
vlc_mutex_unlock
(
&
p_snapshot
->
p_mutex
);
}
/**
* This function will display the name and a PIP of the provided snapshot
*/
...
...
@@ -811,9 +783,6 @@ static void VoutSaveSnapshot( vout_thread_t *p_vout )
char
*
psz_format
=
var_GetNonEmptyString
(
p_vout
,
"snapshot-format"
);
char
*
psz_prefix
=
var_GetNonEmptyString
(
p_vout
,
"snapshot-prefix"
);
void
*
p_obj
;
const
bool
b_embedded
=
psz_path
&&
sscanf
(
psz_path
,
"object:%p"
,
&
p_obj
)
>
0
;
/* */
picture_t
*
p_picture
;
block_t
*
p_image
;
...
...
@@ -823,19 +792,11 @@ static void VoutSaveSnapshot( vout_thread_t *p_vout )
* XXX it will cause trouble with low fps video (< 2fps) */
if
(
vout_GetSnapshot
(
p_vout
,
&
p_image
,
&
p_picture
,
&
fmt
,
psz_format
,
500
*
1000
)
)
{
if
(
b_embedded
)
VoutMemorySnapshot
(
p_vout
,
p_obj
,
NULL
,
NULL
);
p_picture
=
NULL
;
p_image
=
NULL
;
goto
exit
;
}
if
(
b_embedded
)
{
VoutMemorySnapshot
(
p_vout
,
p_obj
,
p_image
,
&
fmt
);
}
else
{
if
(
!
psz_path
)
{
psz_path
=
VoutSnapshotGetDefaultDirectory
();
...
...
@@ -859,7 +820,6 @@ static void VoutSaveSnapshot( vout_thread_t *p_vout )
vout_thread with libvlc_media_player or its input_thread */
var_SetString
(
p_vout
->
p_libvlc
,
"vout-snapshottaken"
,
psz_filename
);
free
(
psz_filename
);
}
exit:
if
(
p_image
)
...
...
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