aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-22 22:34:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-22 22:34:02 +0200
commite847f4128543432a77fb8f85c313646a406c76f6 (patch)
treec23fd3d3cd7904fae57c6a3e7395e10e58ae5579 /libavformat
parent492cc9bcc4a50b4213648c1b8dcb7c28d17ea8f7 (diff)
parent9ee3334840c0d8564ca73dbfd6cd5a01bcdca79b (diff)
downloadffmpeg-e847f4128543432a77fb8f85c313646a406c76f6.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: libspeexenc: add supported sample rates and channel layouts. Replace usleep() calls with av_usleep() lavu: add av_usleep() function utvideo: mark interlaced frames as such utvideo: Fix interlaced prediction for RGB utvideo. cosmetics: do not use full path for local headers lavu/file: include unistd.h only when available configure: check for unistd.h log: include unistd.h only when needed lavf: include libavutil/time.h instead of redeclaring av_gettime() Conflicts: configure doc/APIchanges ffmpeg.c ffplay.c libavcodec/utvideo.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h8
-rw-r--r--libavformat/avio.c5
-rw-r--r--libavformat/hls.c4
-rw-r--r--libavformat/hlsproto.c4
-rw-r--r--libavformat/rtmphttp.c5
5 files changed, 12 insertions, 14 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index efab990f16..143c48e17d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -201,6 +201,10 @@
#include "avio.h"
#include "libavformat/version.h"
+#if FF_API_AV_GETTIME
+#include "libavutil/time.h"
+#endif
+
struct AVFormatContext;
@@ -1854,10 +1858,6 @@ void av_dump_format(AVFormatContext *ic,
const char *url,
int is_output);
-#if FF_API_AV_GETTIME
-int64_t av_gettime(void);
-#endif
-
/**
* Return in 'buf' the path with '%d' replaced by a number.
*
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 8b7e495e55..9dca8679e3 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -19,11 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <unistd.h>
-
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
+#include "libavutil/time.h"
#include "os_support.h"
#include "avformat.h"
#if CONFIG_NETWORK
@@ -268,7 +267,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
if (fast_retries)
fast_retries--;
else
- usleep(1000);
+ av_usleep(1000);
} else if (ret < 1)
return ret < 0 ? ret : len;
if (ret)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4b5cd07422..40c417a199 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -30,9 +30,9 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
+#include "libavutil/time.h"
#include "avformat.h"
#include "internal.h"
-#include <unistd.h>
#include "avio_internal.h"
#include "url.h"
@@ -407,7 +407,7 @@ reload:
while (av_gettime() - v->last_load_time < reload_interval) {
if (ff_check_interrupt(c->interrupt_callback))
return AVERROR_EXIT;
- usleep(100*1000);
+ av_usleep(100*1000);
}
/* Enough time has elapsed since the last reload */
goto reload;
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index 8c25689f91..95bd047877 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -26,11 +26,11 @@
*/
#include "libavutil/avstring.h"
+#include "libavutil/time.h"
#include "avformat.h"
#include "internal.h"
#include "url.h"
#include "version.h"
-#include <unistd.h>
/*
* An apple http stream consists of a playlist with media segment files,
@@ -308,7 +308,7 @@ retry:
while (av_gettime() - s->last_load_time < reload_interval) {
if (ff_check_interrupt(&h->interrupt_callback))
return AVERROR_EXIT;
- usleep(100*1000);
+ av_usleep(100*1000);
}
goto retry;
}
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 5eb5007eb0..4f94859c5e 100644
--- a/libavformat/rtmphttp.c
+++ b/libavformat/rtmphttp.c
@@ -24,11 +24,10 @@
* RTMP HTTP protocol
*/
-#include <unistd.h>
-
#include "libavutil/avstring.h"
#include "libavutil/intfloat.h"
#include "libavutil/opt.h"
+#include "libavutil/time.h"
#include "internal.h"
#include "http.h"
@@ -126,7 +125,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size)
if (rt->nb_bytes_read == 0) {
/* Wait 50ms before retrying to read a server reply in
* order to reduce the number of idle requets. */
- usleep(50000);
+ av_usleep(50000);
}
if ((ret = rtmp_http_write(h, "", 1)) < 0)