Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ec981015
Commit
ec981015
authored
Jan 29, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add boolean option "snapshot-preview" to enable/disable the snapshot's
preview display in the top left corner of the screen.
parent
5345654a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
23 deletions
+39
-23
src/libvlc.h
src/libvlc.h
+7
-0
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+32
-23
No files found.
src/libvlc.h
View file @
ec981015
...
@@ -297,6 +297,11 @@ static char *ppsz_align_descriptions[] =
...
@@ -297,6 +297,11 @@ static char *ppsz_align_descriptions[] =
"Allows you to specify the image format in which the video snapshots will " \
"Allows you to specify the image format in which the video snapshots will " \
"be stored.")
"be stored.")
#define SNAP_PREVIEW_TEXT N_("Display video snapshot preview")
#define SNAP_PREVIEW_LONGTEXT N_( \
"Enable / disable displaying the snapshot preview in the screen's to " \
" left corner.")
#define CROP_TEXT N_("Video cropping")
#define CROP_TEXT N_("Video cropping")
#define CROP_LONGTEXT N_( \
#define CROP_LONGTEXT N_( \
"This will force the cropping of the source video. " \
"This will force the cropping of the source video. " \
...
@@ -1106,6 +1111,8 @@ vlc_module_begin();
...
@@ -1106,6 +1111,8 @@ vlc_module_begin();
add_string
(
"snapshot-format"
,
"png"
,
NULL
,
SNAP_FORMAT_TEXT
,
add_string
(
"snapshot-format"
,
"png"
,
NULL
,
SNAP_FORMAT_TEXT
,
SNAP_FORMAT_LONGTEXT
,
VLC_FALSE
);
SNAP_FORMAT_LONGTEXT
,
VLC_FALSE
);
change_string_list
(
ppsz_snap_formats
,
NULL
,
0
);
change_string_list
(
ppsz_snap_formats
,
NULL
,
0
);
add_bool
(
"snapshot-preview"
,
VLC_TRUE
,
NULL
,
SNAP_PREVIEW_TEXT
,
SNAP_PREVIEW_LONGTEXT
,
VLC_FALSE
);
set_section
(
N_
(
"Window properties"
),
NULL
);
set_section
(
N_
(
"Window properties"
),
NULL
);
add_integer
(
"width"
,
-
1
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"width"
,
-
1
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
VLC_TRUE
);
...
...
src/video_output/vout_intf.c
View file @
ec981015
...
@@ -185,6 +185,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
...
@@ -185,6 +185,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
/* Create a few object variables we'll need later on */
/* Create a few object variables we'll need later on */
var_Create
(
p_vout
,
"snapshot-path"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"snapshot-path"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"snapshot-format"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"snapshot-format"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"snapshot-preview"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"width"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"width"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"height"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"height"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"align"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"align"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
...
@@ -568,6 +569,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -568,6 +569,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
msg_Dbg
(
p_vout
,
"snapshot taken (%s)"
,
psz_filename
);
msg_Dbg
(
p_vout
,
"snapshot taken (%s)"
,
psz_filename
);
free
(
psz_filename
);
free
(
psz_filename
);
if
(
var_GetBool
(
p_vout
,
"snapshot-preview"
)
)
{
/* Inject a subpicture with the snapshot */
/* Inject a subpicture with the snapshot */
memset
(
&
fmt_out
,
0
,
sizeof
(
fmt_out
)
);
memset
(
&
fmt_out
,
0
,
sizeof
(
fmt_out
)
);
fmt_out
.
i_chroma
=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
fmt_out
.
i_chroma
=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
...
@@ -591,10 +594,16 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -591,10 +594,16 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
p_subpic
->
i_original_picture_height
=
p_vout
->
render
.
i_height
*
4
;
p_subpic
->
i_original_picture_height
=
p_vout
->
render
.
i_height
*
4
;
p_subpic
->
p_region
=
spu_CreateRegion
(
p_vout
->
p_spu
,
&
fmt_out
);
p_subpic
->
p_region
=
spu_CreateRegion
(
p_vout
->
p_spu
,
&
fmt_out
);
vout_CopyPicture
(
p_image
->
p_parent
,
&
p_subpic
->
p_region
->
picture
,
p_pif
);
vout_CopyPicture
(
p_image
->
p_parent
,
&
p_subpic
->
p_region
->
picture
,
p_pif
);
p_pif
->
pf_release
(
p_pif
);
p_pif
->
pf_release
(
p_pif
);
spu_DisplaySubpicture
(
p_vout
->
p_spu
,
p_subpic
);
spu_DisplaySubpicture
(
p_vout
->
p_spu
,
p_subpic
);
}
else
{
image_HandlerDelete
(
p_image
);
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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