lavu: Add av_gettime_relative

Since av_gettime() is used in a number of places where actual
real time clock is required, the monotonic clock introduced in
ebef9f5a5 would have consequences that are hard to handle. Instead
split it into a separate function that can be used in the cases
where only relative time is desired.

On platform where no monotonic clock is available, the difference
between the two av_gettime functions is not clear, and one could
mistakenly use the relative clock where an absolute one is
required. Therefore add an offset, to make it evident that the
time returned from av_gettime_relative never is actual current
real time, even though it is based on av_gettime.

Based on a patch by Olivier Langlois.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavc: Use av_gettime_relative

Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
tools: Use av_gettime_relative

Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
avplay: Use av_gettime_relative

Signed-off-by: Martin Storsjö <martin@martin.st>
avconv: Use av_gettime_relative

Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Use av_gettime_relative

The ones left using av_gettime are NTP timestamps (for RTCP,
which is specified to send the actual current realtime clock
in RTCP SR packets), and the NUT muxer timestamper, which is
documented as using wallclock time.

Signed-off-by: Martin Storsjö <martin@martin.st>
mp3dec: fix reading the Xing tag

The quality scale field is only supposed to be present if the fourth bit
is set. In practice, lame always sets it, but other tools might not.

CC:libav-stable@libav.org
doc: reword the mp3 muxer documentation

Make it more structured.
avconv: copy stream-level side data when streamcopying
mp3enc: write full LAME frame

Most importantly, it contains the encoder delay and replaygain info.
Merge commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5'

* commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5':
  lavu: Add av_gettime_relative

Conflicts:
	libavutil/time.c
	libavutil/time.h
	libavutil/version.h

See: 0eec06ed8747923faa6a98e474f224d922dc487d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '6fdf35fe35d8c1c467708238100648a7a47c930d'

* commit '6fdf35fe35d8c1c467708238100648a7a47c930d':
  lavc: Use av_gettime_relative

See: b052bccbe4b5533c3f11fddb14df59fb72dbf463
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e205429fcf9de3182bce2f4cfd1d6401596a8666'

* commit 'e205429fcf9de3182bce2f4cfd1d6401596a8666':
  tools: Use av_gettime_relative

See: 41120e6e40e34a840d194883a95c57a6e91b1093
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '248d8fb60c59c8e044d9c8f78f23383b7cdecf72'

* commit '248d8fb60c59c8e044d9c8f78f23383b7cdecf72':
  avplay: Use av_gettime_relative

Conflicts:
	ffplay.c

See: 0ca0b4c29cf750cbb15732cddbe16723a66afda8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'd0c093021943e9b9c23528b12cd61ca2a5b01b4f'

* commit 'd0c093021943e9b9c23528b12cd61ca2a5b01b4f':
  avconv: Use av_gettime_relative

Conflicts:
	ffmpeg.c

See: 76191c08f88fd66cf9198afc0c4a809c4c0336d4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea'

* commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea':
  lavf: Use av_gettime_relative

Conflicts:
	libavformat/hls.c

See: f78bc96b7c1c74caf99a7139cf81ce1110404965
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '99143140dea12363af680d02e23cb42cfe191679'

* commit '99143140dea12363af680d02e23cb42cfe191679':
  mp3dec: fix reading the Xing tag

Conflicts:
	libavformat/mp3dec.c

See: 19ff479f694ddccc1fd1fa00eff94f96ca82671b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'c63418e0a3afbcdbc59fd65c270d45efafe092ce'

* commit 'c63418e0a3afbcdbc59fd65c270d45efafe092ce':
  doc: reword the mp3 muxer documentation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '88b32673db39440422a73ec3047d3326c96b4fb2'

* commit '88b32673db39440422a73ec3047d3326c96b4fb2':
  avconv: copy stream-level side data when streamcopying

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ef363ebd596da18f889a7d4845023a23dfac84c9'

* commit 'ef363ebd596da18f889a7d4845023a23dfac84c9':
  mp3enc: write full LAME frame

Conflicts:
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>