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
13ed2b54
Commit
13ed2b54
authored
Dec 04, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_video_take_snapshot(): specify snapshot's height and width
parent
01e7e3eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
include/vlc/libvlc.h
include/vlc/libvlc.h
+5
-1
src/control/video.c
src/control/video.c
+3
-1
No files found.
include/vlc/libvlc.h
View file @
13ed2b54
...
...
@@ -822,11 +822,15 @@ VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, l
/**
* Take a snapshot of the current video window
* If i_width AND i_height is 0, original size is used
* if i_width XOR i_height is 0, original aspect-ratio is preserved
* \param p_input the input
* \param psz_filepath the path where to save the screenshot to
* \param i_width the snapshot's width
* \param i_height the snapshot's height
* \param p_exception an initialized exception
*/
VLC_PUBLIC_API
void
libvlc_video_take_snapshot
(
libvlc_media_instance_t
*
,
char
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
void
libvlc_video_take_snapshot
(
libvlc_media_instance_t
*
,
char
*
,
unsigned
int
,
unsigned
int
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_video_destroy
(
libvlc_media_instance_t
*
,
libvlc_exception_t
*
);
...
...
src/control/video.c
View file @
13ed2b54
...
...
@@ -127,7 +127,7 @@ void libvlc_toggle_fullscreen( libvlc_media_instance_t *p_mi,
void
libvlc_video_take_snapshot
(
libvlc_media_instance_t
*
p_mi
,
char
*
psz_filepath
,
libvlc_exception_t
*
p_e
)
unsigned
int
i_width
,
unsigned
int
i_height
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
input_thread_t
*
p_input_thread
;
...
...
@@ -144,6 +144,8 @@ libvlc_video_take_snapshot( libvlc_media_instance_t *p_mi, char *psz_filepath,
return
;
}
var_SetInteger
(
p_vout
,
"snapshot-width"
,
i_width
);
var_SetInteger
(
p_vout
,
"snapshot-height"
,
i_height
);
p_input_thread
=
(
input_thread_t
*
)
vlc_object_get
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
...
...
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