1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

410 Commits

Author SHA1 Message Date
Diego Biurrun
046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Diego Biurrun
e6ff064845 Eliminate pointless '#if 1' statements without matching '#else'. 2011-04-26 20:18:27 +02:00
Diego Biurrun
89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Diego Biurrun
43fb279f56 Replace more FFmpeg instances by Libav or ffmpeg. 2011-04-23 19:12:23 +02:00
Stefano Sabatini
55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini
59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov
761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov
c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +02:00
Anton Khirnov
f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Anton Khirnov
403ee835e7 avio: make url_open_dyn_packet_buf internal.
It doesn't look fit to be a part of the public API.

Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
2011-04-03 22:47:32 +02:00
Anton Khirnov
6dc7d80de7 avio: avio_ prefix for url_close_dyn_buf 2011-04-03 22:47:05 +02:00
Anton Khirnov
b92c545282 avio: avio_ prefix for url_open_dyn_buf 2011-04-03 22:46:56 +02:00
Anton Khirnov
8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov
83fddaeb81 avio: deprecate url_open_buf
It's only used in one place and does the same thing as
avio_alloc_context.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov
d9d86e00b2 avio: avio_ prefix for url_fprintf
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov
22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Martin Storsjö
28c4741a66 libavformat: Remove FF_NETERRNO()
Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR()
error codes. Provide fallback definitions of other errno.h network
errors, mapping them to the corresponding winsock errors.

This eases catching these error codes in common code, without having
to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN).

This fixes roundup issue 2614, unbreaking blocking network IO on
windows.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 07:21:31 -05:00
Anton Khirnov
77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Martin Storsjö
c2ca851b23 ffserver: Try matching the RTSP url without a trailing slash
If the client sends PLAY/PAUSE requests with the same url as
specified in Content-Base, these requests may have urls with
trailing slashes.
2011-02-17 23:18:46 +01:00
Anton Khirnov
ab0287fcbd Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:35:18 +01:00
Anton Khirnov
9fcae9735e Replace remaining uses of parse_date with av_parse_time.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:57 +00:00
Nicolas George
6741f7c9be ffserver: set the sample aspect ratio
Hi.

It seems that ffserver sets sample_aspect_ratio to an invalid value and lavf
rejects it.

I am not sure what I am doing here, but the attached patch actually solves
something: using the following config:

CustomLog -
NoDaemon
RTSPPort 5454
<Stream test1-rtsp.mpg>
Format rtp
File "/tmp/test1-rtsp.mpg"
</Stream>

it allows a somewhat old ffplay (unaffected by the content-base issue I
spoke of in another thread) to play the stream.

Without it, ffserver logs this and closes the stream:

Wed Feb 16 14:52:14 2011 [rtp @ 0x1399de0]Aspect ratio mismatch between encoder and muxer layer

Regards,

--
  Nicolas George

From 1b89c3c2164335060e87567b27deb0d354e0a814 Mon Sep 17 00:00:00 2001
From: Nicolas George <nicolas.george@normalesup.org>
Date: Wed, 16 Feb 2011 14:44:31 +0100
Subject: [PATCH] ffserver: set the sample aspect ratio.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
2011-02-17 00:37:00 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Mans Rullgard
efa6ce9982 ffserver: put gcc attribute under proper ifdef 2011-01-24 22:09:37 +00:00
Reinhard Tartler
305ca590cf ffserver: cleanup
remove the trivial function do_switch_stream as it doesn't help to make
the code easier to understand.
2011-01-23 08:53:40 +01:00
Luca Barbato
2a12706710 Unbreak ffserver
Make sure the sample_aspect_ratio is 0 and not 0/0.

Originally committed as revision 26254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 18:48:45 +00:00
Martin Storsjö
77223c5388 rtsp: Pass the method name to ff_rtsp_parse_line
Originally committed as revision 26191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:10:12 +00:00
Stefano Sabatini
6e872935db Implement get_preset_file() in cmdutils.h and use it to factorize code
from ffmpeg.c and ffserver.c.

Originally committed as revision 25679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 23:07:04 +00:00
Aurelien Jacobs
aff8810172 ffserver: use a local MAX_STREAMS limit
Originally committed as revision 25495 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:09:54 +00:00
Aurelien Jacobs
9389b925f1 ffserver: fix prepare_sdp_description() to dynamically allocate streams
Originally committed as revision 25494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:09:05 +00:00
Stefano Sabatini
126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00
Howard Chu
0aee2a57c8 Also use 503 for bandwidth limit exceeded
Originally committed as revision 24107 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-08 09:21:24 +00:00
Howard Chu
2a22187f39 Fix "server too busy" status code
Originally committed as revision 24105 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-08 08:59:53 +00:00
Måns Rullgård
f3bfe388b5 Make ff_url_split() public
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 14:16:46 +00:00
Martin Storsjö
5634f30c4a ffserver: Use avcodec_copy_context instead of manually copying an AVCodecContext
Originally committed as revision 23692 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 06:45:05 +00:00
Howard Chu
d9aac26761 When reading a stream, should retry on EAGAIN instead of just failing. Also,
when reading a live feed, should retry regardless of whether any client has
opened the stream.

Originally committed as revision 23621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-16 01:12:26 +00:00
Howard Chu
8190f62f9b Support presets in ffserver.conf
Originally committed as revision 23524 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 09:55:30 +00:00
Martin Storsjö
f475f35fdd ffserver: Calculate cur_pts using first_pts as origin instead of ist->start_time
This fixes cases where ist->start_time wasn't initialized. This also makes
cur_pts calculated against the same origin for all streams.

Originally committed as revision 23450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-03 20:58:22 +00:00
Martin Storsjö
3b963552bc ffserver: Allow floating point audio bit rates
This allows setting bit rates that aren't an exact multiple of 1000.

Originally committed as revision 23419 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-02 07:09:44 +00:00
Martin Storsjö
577ee94871 ffserver: Send a Content-Base header in the reply to RTSP DESCRIBE requests
This is needed for QuickTime Player to be able to connect properly.

Originally committed as revision 23325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 19:23:18 +00:00
Martin Storsjö
111c935980 ffserver: Fix one of the codec parameter checks
This is probably what was originally intended; the codec pointers are all NULL.

Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23295 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 20:24:39 +00:00
Martin Storsjö
a5ba4cedf2 ffserver: Fix streaming with more than one stream
Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23294 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 20:08:02 +00:00
Howard Chu
e175b55edf ffserver: Fix extradata handling
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:59:18 +00:00
Martin Storsjö
c966c91279 ffserver: Fix an out of bounds read
Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23292 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:23:31 +00:00
Martin Storsjö
9cc9a15510 ffserver: Fix another memory leak
Don't allocate st->codec, it will be overwritten by the memcpy a few
lines further down.

Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:12:00 +00:00
Howard Chu
ea4f8aabab ffserver: Plug some memory leaks
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23290 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:05:22 +00:00