| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
| |
I'd rather duplicate some trivial code, rather than split functions in
the middle with ifdefs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently, this is always _really_ monotonic, despite what the Linux
manpages say. So this should be much better than gettimeofday(). (At
times there were kernel bugs which broke the monotonic property.)
From the perspective of the player, time can still be discontinuous
(you could just stop the process with ^Z), but at least it's guaranteed
to be monotonic without further hacks required.
Also note that clock_gettime() returns the time in nanoseconds. We want
microseconds only, because that's the unit we chose internally. Another
problem is that nanoseconds can wrap pretty quickly (less than 300 years
in 63 bits), so it's just better to use microseconds. The devision won't
make the code that much slower (compilers can avoid a real division).
Note: this expects that the system provides clock_gettime() as well as
CLOCK_MONOTONIC. Both are optional according to POSIX. The only system
I know which doesn't have these, OSX, has seperate timer code anyway,
but I still don't know whether more obscure (yet supported) platforms
have a problem with this, so I'm playing safely. But this still expects
that CLOCK_MONOTONIC always works at runtime if it's defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure followed 5 different convetions of defines because the next guy
always wanted to introduce a new better way to uniform it[1]. For an
hypothetic feature 'hurr' you could have had:
* #define HAVE_HURR 1 / #undef HAVE_DURR
* #define HAVE_HURR / #undef HAVE_DURR
* #define CONFIG_HURR 1 / #undef CONFIG_DURR
* #define HAVE_HURR 1 / #define HAVE_DURR 0
* #define CONFIG_HURR 1 / #define CONFIG_DURR 0
All is now uniform and uses:
* #define HAVE_HURR 1
* #define HAVE_DURR 0
We like definining to 0 as opposed to `undef` bcause it can help spot typos
and is very helpful when doing big reorganizations in the code.
[1]: http://xkcd.com/927/ related
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make OS specific timer code export a mp_raw_time_us() function, and
add generic implementations of GetTimer()/GetTimerMS() using this
function. New mpv code is supposed to call mp_time_us() in situations
where precision is absolutely needed, or mp_time_s() otherwise.
Make it so that mp_time_us() will return a value near program start.
We don't set it to 0 though to avoid confusion with relative vs.
absolute time. Instead, pick an arbitrary offset.
Move the test program in timer-darwin.c to timer.c, and modify it to
work with the generic timer functions.
|
|
|
|
| |
This was unreferenced and useless.
|
|
|
|
| |
As by mplayer-svn commit 33972. Their BeOS removal was more thorough.
|
| |
|
|\ |
|
| |
| |
| |
| | |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29198 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|\| |
|
| |
| |
| |
| | |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28779 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the conflicts are trivial.
Conflicts:
Makefile
cfg-mplayer.h
input/input.c
libmenu/vf_menu.c
libmpcodecs/dec_video.c
libmpcodecs/vf_expand.c
libmpcodecs/vf_vo.c
libmpdemux/demux_mkv.c
libmpdemux/demuxer.c
libmpdemux/demuxer.h
libvo/vo_directfb2.c
libvo/vo_gl.c
libvo/vo_winvidix.c
libvo/vo_xv.c
libvo/vo_xvidix.c
libvo/vo_xvmc.c
libvo/x11_common.c
mplayer.c
osdep/timer-linux.c
stream/cache2.c
|
| |
| |
| |
| | |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| |
| |
| |
| | |
Delete some commented out or otherwise unused lines.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the code calculating time delta since last query out of the
platform-specific drivers and into mplayer.c. The platform-specific
drivers now return absolute values only.
The way the code in timer-darwin.c uses doubles in wrapping arithmetic
looks questionable and this change might make problems in it more
visible.
|
|/
|
|
|
| |
timer_name was a (non-const) pointer to a const char array. Make the
symbol the array itself.
|
|
|
|
| |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25538 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25129 b3059339-0415-0410-9bf9-f77b7e298cf2
|