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
1431ff2d
Commit
1431ff2d
authored
Oct 01, 2018
by
Dave Rice
Committed by
Marton Balint
Oct 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: add options to specify window position
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
416804fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ffplay.texi
doc/ffplay.texi
+4
-0
ffplay.c
fftools/ffplay.c
+5
-1
No files found.
doc/ffplay.texi
View file @
1431ff2d
...
...
@@ -74,6 +74,10 @@ as 100.
Force format.
@item -window
_
title @var
{
title
}
Set window title (default is the input filename).
@item -left @var
{
title
}
Set the x position for the left of the window (default is a centered window).
@item -top @var
{
title
}
Set the y position for the top of the window (default is a centered window).
@item -loop @var
{
number
}
Loops movie playback <number> times. 0 means forever.
@item -showmode @var
{
mode
}
...
...
fftools/ffplay.c
View file @
1431ff2d
...
...
@@ -314,6 +314,8 @@ static int default_width = 640;
static
int
default_height
=
480
;
static
int
screen_width
=
0
;
static
int
screen_height
=
0
;
static
int
screen_left
=
SDL_WINDOWPOS_CENTERED
;
static
int
screen_top
=
SDL_WINDOWPOS_CENTERED
;
static
int
audio_disable
;
static
int
video_disable
;
static
int
subtitle_disable
;
...
...
@@ -1346,7 +1348,7 @@ static int video_open(VideoState *is)
SDL_SetWindowTitle
(
window
,
window_title
);
SDL_SetWindowSize
(
window
,
w
,
h
);
SDL_SetWindowPosition
(
window
,
SDL_WINDOWPOS_CENTERED
,
SDL_WINDOWPOS_CENTERED
);
SDL_SetWindowPosition
(
window
,
screen_left
,
screen_top
);
if
(
is_full_screen
)
SDL_SetWindowFullscreen
(
window
,
SDL_WINDOW_FULLSCREEN_DESKTOP
);
SDL_ShowWindow
(
window
);
...
...
@@ -3602,6 +3604,8 @@ static const OptionDef options[] = {
{
"framedrop"
,
OPT_BOOL
|
OPT_EXPERT
,
{
&
framedrop
},
"drop frames when cpu is too slow"
,
""
},
{
"infbuf"
,
OPT_BOOL
|
OPT_EXPERT
,
{
&
infinite_buffer
},
"don't limit the input buffer size (useful with realtime streams)"
,
""
},
{
"window_title"
,
OPT_STRING
|
HAS_ARG
,
{
&
window_title
},
"set window title"
,
"window title"
},
{
"left"
,
OPT_INT
|
HAS_ARG
|
OPT_EXPERT
,
{
&
screen_left
},
"set the x position for the left of the window"
,
"x pos"
},
{
"top"
,
OPT_INT
|
HAS_ARG
|
OPT_EXPERT
,
{
&
screen_top
},
"set the y position for the top of the window"
,
"y pos"
},
#if CONFIG_AVFILTER
{
"vf"
,
OPT_EXPERT
|
HAS_ARG
,
{
.
func_arg
=
opt_add_vfilter
},
"set video filters"
,
"filter_graph"
},
{
"af"
,
OPT_STRING
|
HAS_ARG
,
{
&
afilters
},
"set audio filters"
,
"filter_graph"
},
...
...
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