Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
411f7141
Commit
411f7141
authored
May 08, 2018
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/sdl2 : add option to define if the window quit action is available
parent
644130bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
outdevs.texi
doc/outdevs.texi
+5
-0
sdl2.c
libavdevice/sdl2.c
+3
-1
No files found.
doc/outdevs.texi
View file @
411f7141
...
...
@@ -396,6 +396,11 @@ downscaled according to the aspect ratio.
@item window_fullscreen
Set fullscreen mode when non-zero value is provided.
Default value is zero.
@item window_enable_quit
Enable quit action (using window button or keyboard key)
when non-zero value is provided.
Default value is 1 (enable quit action)
@end table
@subsection Interactive commands
...
...
libavdevice/sdl2.c
View file @
411f7141
...
...
@@ -42,6 +42,7 @@ typedef struct {
int
window_width
,
window_height
;
/**< size of the window */
int
window_fullscreen
;
int
window_borderless
;
int
enable_quit_action
;
SDL_Texture
*
texture
;
int
texture_fmt
;
...
...
@@ -277,7 +278,7 @@ static int sdl2_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
if
(
quit
)
{
if
(
quit
&&
sdl
->
enable_quit_action
)
{
sdl2_write_trailer
(
s
);
return
AVERROR
(
EIO
);
}
...
...
@@ -338,6 +339,7 @@ static const AVOption options[] = {
{
"window_size"
,
"set SDL window forced size"
,
OFFSET
(
window_width
),
AV_OPT_TYPE_IMAGE_SIZE
,
{
.
str
=
NULL
},
0
,
0
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"window_fullscreen"
,
"set SDL window fullscreen"
,
OFFSET
(
window_fullscreen
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"window_borderless"
,
"set SDL window border off"
,
OFFSET
(
window_borderless
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"window_enable_quit"
,
"set if quit action is available"
,
OFFSET
(
enable_quit_action
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
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