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
a11bf0bd
Commit
a11bf0bd
authored
Jul 25, 2002
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed gettime to av_gettime()
Originally committed as revision 805 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2302dd13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
ffm.c
libav/ffm.c
+1
-1
grab.c
libav/grab.c
+3
-11
No files found.
libav/ffm.c
View file @
a11bf0bd
...
@@ -178,7 +178,7 @@ static int ffm_write_header(AVFormatContext *s)
...
@@ -178,7 +178,7 @@ static int ffm_write_header(AVFormatContext *s)
if
(
ffm_nopts
)
if
(
ffm_nopts
)
fst
->
pts
=
0
;
fst
->
pts
=
0
;
else
else
fst
->
pts
=
gettime
();
fst
->
pts
=
av_
gettime
();
}
}
/* flush until end of block reached */
/* flush until end of block reached */
...
...
libav/grab.c
View file @
a11bf0bd
...
@@ -148,7 +148,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
...
@@ -148,7 +148,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
val
=
1
;
val
=
1
;
ioctl
(
video_fd
,
VIDIOCCAPTURE
,
&
val
);
ioctl
(
video_fd
,
VIDIOCCAPTURE
,
&
val
);
s
->
time_frame
=
gettime
();
s
->
time_frame
=
av_
gettime
();
s
->
use_mmap
=
0
;
s
->
use_mmap
=
0
;
}
else
{
}
else
{
video_buf
=
mmap
(
0
,
gb_buffers
.
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
video_fd
,
0
);
video_buf
=
mmap
(
0
,
gb_buffers
.
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
video_fd
,
0
);
...
@@ -157,7 +157,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
...
@@ -157,7 +157,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
goto
fail
;
goto
fail
;
}
}
gb_frame
=
0
;
gb_frame
=
0
;
s
->
time_frame
=
gettime
();
s
->
time_frame
=
av_
gettime
();
/* start to grab the first frame */
/* start to grab the first frame */
gb_buf
.
frame
=
gb_frame
%
gb_buffers
.
frames
;
gb_buf
.
frame
=
gb_frame
%
gb_buffers
.
frames
;
...
@@ -249,14 +249,6 @@ static int v4l_mm_read_picture(VideoData *s, UINT8 *buf)
...
@@ -249,14 +249,6 @@ static int v4l_mm_read_picture(VideoData *s, UINT8 *buf)
while
(
ioctl
(
s
->
fd
,
VIDIOCSYNC
,
&
gb_frame
)
<
0
&&
while
(
ioctl
(
s
->
fd
,
VIDIOCSYNC
,
&
gb_frame
)
<
0
&&
(
errno
==
EAGAIN
||
errno
==
EINTR
));
(
errno
==
EAGAIN
||
errno
==
EINTR
));
/*
gettimeofday(&tv_e, 0);
delay = (tv_e.tv_sec - tv_s.tv_sec) * 1000000 + tv_e.tv_usec - tv_s.tv_usec;
if (delay > 10000)
printf("VIDIOCSYNC took %d us\n", delay);
*/
ptr
=
video_buf
+
gb_buffers
.
offsets
[
gb_frame
];
ptr
=
video_buf
+
gb_buffers
.
offsets
[
gb_frame
];
memcpy
(
buf
,
ptr
,
s
->
frame_size
);
memcpy
(
buf
,
ptr
,
s
->
frame_size
);
...
@@ -280,7 +272,7 @@ static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
...
@@ -280,7 +272,7 @@ static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
/* wait based on the frame rate */
/* wait based on the frame rate */
for
(
first
=
1
;;
first
=
0
)
{
for
(
first
=
1
;;
first
=
0
)
{
curtime
=
gettime
();
curtime
=
av_
gettime
();
delay
=
s
->
time_frame
-
curtime
;
delay
=
s
->
time_frame
-
curtime
;
if
(
delay
<=
0
)
{
if
(
delay
<=
0
)
{
if
(
delay
<
-
per_frame
)
{
if
(
delay
<
-
per_frame
)
{
...
...
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