aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-07-25 16:05:25 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-07-25 16:05:25 +0000
commita11bf0bd61af26f0faa4b5073337a583fe2bbd13 (patch)
treee9a3434deb5c864e4ba86cbf6ab91db3d2ad3fe6
parent2302dd13197f57662f475e337d3ca10118879082 (diff)
downloadffmpeg-a11bf0bd61af26f0faa4b5073337a583fe2bbd13.tar.gz
renamed gettime to av_gettime()
Originally committed as revision 805 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libav/ffm.c2
-rw-r--r--libav/grab.c14
2 files changed, 4 insertions, 12 deletions
diff --git a/libav/ffm.c b/libav/ffm.c
index 1d1564a639..c6033c5bfc 100644
--- a/libav/ffm.c
+++ b/libav/ffm.c
@@ -178,7 +178,7 @@ static int ffm_write_header(AVFormatContext *s)
if (ffm_nopts)
fst->pts = 0;
else
- fst->pts = gettime();
+ fst->pts = av_gettime();
}
/* flush until end of block reached */
diff --git a/libav/grab.c b/libav/grab.c
index acef019178..86a9ea07c6 100644
--- a/libav/grab.c
+++ b/libav/grab.c
@@ -148,7 +148,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
val = 1;
ioctl(video_fd, VIDIOCCAPTURE, &val);
- s->time_frame = gettime();
+ s->time_frame = av_gettime();
s->use_mmap = 0;
} else {
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)
goto fail;
}
gb_frame = 0;
- s->time_frame = gettime();
+ s->time_frame = av_gettime();
/* start to grab the first frame */
gb_buf.frame = gb_frame % gb_buffers.frames;
@@ -249,14 +249,6 @@ static int v4l_mm_read_picture(VideoData *s, UINT8 *buf)
while (ioctl(s->fd, VIDIOCSYNC, &gb_frame) < 0 &&
(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];
memcpy(buf, ptr, s->frame_size);
@@ -280,7 +272,7 @@ static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
/* wait based on the frame rate */
for(first = 1;; first = 0) {
- curtime = gettime();
+ curtime = av_gettime();
delay = s->time_frame - curtime;
if (delay <= 0) {
if (delay < -per_frame) {