Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
f1353ce2
Commit
f1353ce2
authored
Dec 28, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/xcbgrab: capture the full desktop if video_size is not specified
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
f6845269
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
indevs.texi
doc/indevs.texi
+1
-1
version.h
libavdevice/version.h
+1
-1
xcbgrab.c
libavdevice/xcbgrab.c
+6
-6
No files found.
doc/indevs.texi
View file @
f1353ce2
...
...
@@ -1532,7 +1532,7 @@ ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_siz
@end example
@item video_size
Set the video frame size. Default
value is @code{vga}
.
Set the video frame size. Default
is the full desktop
.
@item grab_x
@item grab_y
...
...
libavdevice/version.h
View file @
f1353ce2
...
...
@@ -29,7 +29,7 @@
#define LIBAVDEVICE_VERSION_MAJOR 58
#define LIBAVDEVICE_VERSION_MINOR 9
#define LIBAVDEVICE_VERSION_MICRO 10
1
#define LIBAVDEVICE_VERSION_MICRO 10
2
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \
...
...
libavdevice/xcbgrab.c
View file @
f1353ce2
...
...
@@ -70,7 +70,6 @@ typedef struct XCBGrabContext {
int
region_border
;
int
centered
;
const
char
*
video_size
;
const
char
*
framerate
;
int
has_shm
;
...
...
@@ -85,7 +84,7 @@ static const AVOption options[] = {
{
"y"
,
"Initial y coordinate."
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"grab_x"
,
"Initial x coordinate."
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"grab_y"
,
"Initial y coordinate."
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"video_size"
,
"A string describing frame size, such as 640x480 or hd720."
,
OFFSET
(
video_size
),
AV_OPT_TYPE_STRING
,
{.
str
=
"vga"
},
0
,
0
,
D
},
{
"video_size"
,
"A string describing frame size, such as 640x480 or hd720."
,
OFFSET
(
width
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
NULL
},
0
,
0
,
D
},
{
"framerate"
,
""
,
OFFSET
(
framerate
),
AV_OPT_TYPE_STRING
,
{.
str
=
"ntsc"
},
0
,
0
,
D
},
{
"draw_mouse"
,
"Draw the mouse pointer."
,
OFFSET
(
draw_mouse
),
AV_OPT_TYPE_INT
,
{
.
i64
=
1
},
0
,
1
,
D
},
{
"follow_mouse"
,
"Move the grabbing region when the mouse pointer reaches within specified amount of pixels to the edge of region."
,
...
...
@@ -555,10 +554,6 @@ static int create_stream(AVFormatContext *s)
if
(
!
st
)
return
AVERROR
(
ENOMEM
);
ret
=
av_parse_video_size
(
&
c
->
width
,
&
c
->
height
,
c
->
video_size
);
if
(
ret
<
0
)
return
ret
;
ret
=
av_parse_video_rate
(
&
st
->
avg_frame_rate
,
c
->
framerate
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -570,6 +565,11 @@ static int create_stream(AVFormatContext *s)
if
(
!
geo
)
return
AVERROR_EXTERNAL
;
if
(
!
c
->
width
||
!
c
->
height
)
{
c
->
width
=
geo
->
width
;
c
->
height
=
geo
->
height
;
}
if
(
c
->
x
+
c
->
width
>
geo
->
width
||
c
->
y
+
c
->
height
>
geo
->
height
)
{
av_log
(
s
,
AV_LOG_ERROR
,
...
...
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