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
0addc828
Commit
0addc828
authored
Jul 26, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/x11grab: use AV_OPT_TYPE_VIDEO_RATE
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
a4b899f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
x11grab.c
libavdevice/x11grab.c
+3
-8
No files found.
libavdevice/x11grab.c
View file @
0addc828
...
@@ -76,7 +76,7 @@ struct x11grab {
...
@@ -76,7 +76,7 @@ struct x11grab {
int
draw_mouse
;
/**< Set by a private option. */
int
draw_mouse
;
/**< Set by a private option. */
int
follow_mouse
;
/**< Set by a private option. */
int
follow_mouse
;
/**< Set by a private option. */
int
show_region
;
/**< set by a private option. */
int
show_region
;
/**< set by a private option. */
char
*
framerate
;
/**< Set by a private option. */
AVRational
framerate
;
/**< Set by a private option. */
Cursor
c
;
Cursor
c
;
Window
region_win
;
/**< This is used by show_region option. */
Window
region_win
;
/**< This is used by show_region option. */
...
@@ -167,7 +167,6 @@ x11grab_read_header(AVFormatContext *s1)
...
@@ -167,7 +167,6 @@ x11grab_read_header(AVFormatContext *s1)
int
use_shm
;
int
use_shm
;
char
*
dpyname
,
*
offset
;
char
*
dpyname
,
*
offset
;
int
ret
=
0
;
int
ret
=
0
;
AVRational
framerate
;
dpyname
=
av_strdup
(
s1
->
filename
);
dpyname
=
av_strdup
(
s1
->
filename
);
if
(
!
dpyname
)
if
(
!
dpyname
)
...
@@ -185,10 +184,6 @@ x11grab_read_header(AVFormatContext *s1)
...
@@ -185,10 +184,6 @@ x11grab_read_header(AVFormatContext *s1)
*
offset
=
0
;
*
offset
=
0
;
}
}
if
((
ret
=
av_parse_video_rate
(
&
framerate
,
x11grab
->
framerate
))
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"Could not parse framerate: %s.
\n
"
,
x11grab
->
framerate
);
goto
out
;
}
av_log
(
s1
,
AV_LOG_INFO
,
"device: %s -> display: %s x: %d y: %d width: %d height: %d
\n
"
,
av_log
(
s1
,
AV_LOG_INFO
,
"device: %s -> display: %s x: %d y: %d width: %d height: %d
\n
"
,
s1
->
filename
,
dpyname
,
x_off
,
y_off
,
x11grab
->
width
,
x11grab
->
height
);
s1
->
filename
,
dpyname
,
x_off
,
y_off
,
x11grab
->
width
,
x11grab
->
height
);
...
@@ -309,7 +304,7 @@ x11grab_read_header(AVFormatContext *s1)
...
@@ -309,7 +304,7 @@ x11grab_read_header(AVFormatContext *s1)
x11grab
->
frame_size
=
x11grab
->
width
*
x11grab
->
height
*
image
->
bits_per_pixel
/
8
;
x11grab
->
frame_size
=
x11grab
->
width
*
x11grab
->
height
*
image
->
bits_per_pixel
/
8
;
x11grab
->
dpy
=
dpy
;
x11grab
->
dpy
=
dpy
;
x11grab
->
time_base
=
av_inv_q
(
framerate
);
x11grab
->
time_base
=
av_inv_q
(
x11grab
->
framerate
);
x11grab
->
time_frame
=
av_gettime
()
/
av_q2d
(
x11grab
->
time_base
);
x11grab
->
time_frame
=
av_gettime
()
/
av_q2d
(
x11grab
->
time_base
);
x11grab
->
x_off
=
x_off
;
x11grab
->
x_off
=
x_off
;
x11grab
->
y_off
=
y_off
;
x11grab
->
y_off
=
y_off
;
...
@@ -603,7 +598,7 @@ static const AVOption options[] = {
...
@@ -603,7 +598,7 @@ static const AVOption options[] = {
{
"centered"
,
"keep the mouse pointer at the center of grabbing region when following"
,
{
"centered"
,
"keep the mouse pointer at the center of grabbing region when following"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
-
1
},
INT_MIN
,
INT_MAX
,
DEC
,
"follow_mouse"
},
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
-
1
},
INT_MIN
,
INT_MAX
,
DEC
,
"follow_mouse"
},
{
"framerate"
,
"set video frame rate"
,
OFFSET
(
framerate
),
AV_OPT_TYPE_
STRING
,
{.
str
=
"ntsc"
},
0
,
0
,
DEC
},
{
"framerate"
,
"set video frame rate"
,
OFFSET
(
framerate
),
AV_OPT_TYPE_
VIDEO_RATE
,
{.
str
=
"ntsc"
},
0
,
0
,
DEC
},
{
"show_region"
,
"show the grabbing region"
,
OFFSET
(
show_region
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
DEC
},
{
"show_region"
,
"show the grabbing region"
,
OFFSET
(
show_region
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
DEC
},
{
"video_size"
,
"set video frame size"
,
OFFSET
(
width
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"vga"
},
0
,
0
,
DEC
},
{
"video_size"
,
"set video frame size"
,
OFFSET
(
width
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"vga"
},
0
,
0
,
DEC
},
{
NULL
},
{
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