]> rtime.felk.cvut.cz Git - frescor/streamer.git/blob - rt.c
Proper CPU contracts in streamer
[frescor/streamer.git] / rt.c
1 /*
2  *  Copyright (c) 2008 Luca Abeni
3  *
4  *  This is free software; see GPL.txt
5  */
6 /* FIXME: Dummy implementations!!! */
7 #include <stdio.h>
8 #include <libavformat/avformat.h>
9
10 static uint64_t start_time, start_time1;
11
12 void rt_job_start(uint64_t t)
13 {
14 extern int fps;
15 #if 1
16   t += (1000000ul / fps);       /* Hack to work around v4l2vd bug... */
17 #endif
18
19   start_time = t;
20   start_time1 = av_gettime();
21 }
22
23 void rt_job_end(void)
24 {
25   uint64_t t;
26
27   t = av_gettime();
28   printf("%Lu %Lu %Lu\t%Lu %Lu\n", start_time, start_time1, t, t - start_time, t - start_time1);
29 }