Commit Graph

35 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt ee77ee77a1 avformat: Remove avformat and avio headers from protocols
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:17:55 +02:00
Andreas Rheinhardt e7bd47e657 Remove obsolete version.h inclusions
These have mostly been added because of FF_API_*; yet when these were
removed, removing the header has been forgotten.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:34:31 +02:00
Steven Liu 6080c5e24f avformat/hlsproto: update comment of file description
reference link to rfc8216

Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2020-12-28 11:09:19 +08:00
Andreas Rheinhardt 82bf41f3ab avformat: Replace ffurl_close() by ffurl_closep() where appropriate
It avoids leaving dangling pointers behind in memory.

Also remove redundant checks for whether the URLContext to be closed is
already NULL.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-25 13:11:36 +02:00
caohui ee1c63eb82 lavf/hlsproto: Replace a wrong eol comma with a semicolon. 2019-01-23 23:17:03 +01:00
Jun Zhao 52623bc26f lavf/hlsproto: use ff_get_chomp_line
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-12 16:04:58 +08:00
Derek Buitenhuis f8e89d8a29 Merge commit 'fab8156b2f30666adabe227b3d7712fd193873b1'
* commit 'fab8156b2f30666adabe227b3d7712fd193873b1':
  avio: Copy URLContext generic options into child URLContexts

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-21 15:55:09 +01:00
Martin Storsjö fab8156b2f avio: Copy URLContext generic options into child URLContexts
Since all URLContexts have the same AVOptions, such AVOptions
will be applied on the outermost context only and removed from the
dict, while they probably make sense on all contexts.

This makes sure that rw_timeout gets propagated to the innermost
URLContext (to make sure it gets passed to the tcp protocol, when
opening a http connection for instance).

Alternatively, such matching options would be kept in the dict
and only removed after the ffurl_connect call.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:19 +02:00
Derek Buitenhuis 93629735d7 avformat: Add a protocol blacklisting API
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-03-04 16:13:42 +00:00
Derek Buitenhuis 9c75148e6e Merge commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d'
This commit also disables the async fate test, because it
used internal APIs in a non-kosher way, which no longer
exists.

* commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d':
  lavf: reorganize URLProtocols

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-29 16:51:10 +00:00
Anton Khirnov 8c0ceafb0f urlprotocol: receive a list of protocols from the caller
This way, the decisions about which protocols are available for use in
any given situations can be delegated to the caller.
2016-02-22 11:45:31 +01:00
Anton Khirnov 2758cdedfb lavf: reorganize URLProtocols
Instead of a linked list constructed at av_register_all(), store them
in a constant array of pointers.

Since no registration is necessary now, this removes some global state
from lavf. This will also allow the urlprotocol layer caller to limit
the available protocols in a simple and flexible way in the following
commits.
2016-02-22 11:30:58 +01:00
Michael Niedermayer fe3fed0b14 Update demuxers and protocols for protocol whitelist support
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-02 04:16:50 +01:00
Michael Niedermayer 0c00e734ef Merge commit '7915e6741dbe1cf3a8781cead3e68a7666de14f4'
* commit '7915e6741dbe1cf3a8781cead3e68a7666de14f4':
  hlsproto: Properly close avio buffer in case of error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-23 22:27:48 +01:00
Vittorio Giovara 7915e6741d hlsproto: Properly close avio buffer in case of error
Fix a memory leak.

CC: libav-stable@libav.org
Bug-Id: CID 717999
2015-01-23 14:55:03 +00:00
Michael Niedermayer 59ca6e2586 avformat/hlsproto: Use av_freep, to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 15:07:50 +01:00
Michael Niedermayer 2c5ae57776 Merge commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea'
* commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea':
  lavf: Use av_gettime_relative

Conflicts:
	libavformat/hls.c

See: f78bc96b7c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-24 12:40:36 +02:00
Martin Storsjö 6df9d9b55d 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>
2014-10-24 09:53:45 +03:00
James Almer d34ec64a22 replace calls to url_feof() with avio_feof()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Michael Niedermayer ef1544740e Merge commit 'a2b7eeeb06471979ee39fd3075a04633222678a6'
* commit 'a2b7eeeb06471979ee39fd3075a04633222678a6':
  hlsproto: Store all durations in AV_TIME_BASE

Conflicts:
	libavformat/hlsproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 10:19:20 +02:00
Martin Storsjö a2b7eeeb06 hlsproto: Store all durations in AV_TIME_BASE
Also parse segment durations as floating point, which is allowed
since HLS version 3.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-29 20:15:50 +03:00
Michael Niedermayer 1c60956c80 Merge commit 'c7e044c61bb08b3a6e1e8063e8f4449c88b01201'
* commit 'c7e044c61bb08b3a6e1e8063e8f4449c88b01201':
  lavf: remove disabled FF_API_APPLEHTTP_PROTO cruft

Conflicts:
	libavformat/allformats.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 12:21:43 +01:00
Anton Khirnov c7e044c61b lavf: remove disabled FF_API_APPLEHTTP_PROTO cruft 2013-03-11 18:22:54 +01:00
Reimar Döffinger efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Reimar Döffinger 88d55b827d Remove incorrect use of ctype.h functions.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-03-03 21:44:10 +01:00
Diego Biurrun 511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Michael Niedermayer 8fb8d539a4 hlsproto: fix integer overflow
Fixes CID703743
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 23:24:03 +02:00
Lou Logan b22ecbc6a5 cosmetics: various spelling fixes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-06 17:08:22 +02:00
Michael Niedermayer e847f41285 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>
2012-06-22 22:34:02 +02:00
Mans Rullgard 896bb0d742 Replace usleep() calls with av_usleep()
This reduces the dependency on unistd.h which is not available
on all systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:36 +01:00
Michael Niedermayer c980be9e3a Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  CDXL demuxer and decoder
  hls: Re-add legacy applehttp name to preserve interface compatibility.
  hlsproto: Rename the functions and context
  hlsproto: Encourage users to try the hls demuxer instead of the proto
  doc: Move the hls protocol section into the right place
  libavformat: Rename the applehttp protocol to hls
  hls: Rename the functions and context
  libavformat: Rename the applehttp demuxer to hls
  rtpdec: Support H263 in RFC 2190 format
  rv30: check block type validity
  ttadec: CRC checking
  movenc: Support muxing VC1
  avconv: Don't split out inline sequence headers when stream copying VC1
  rv34: handle size changes during frame multithreading
  rv40: prevent undefined signed overflow in rv40_loop_filter()
  rv34: use AVERROR return values in ff_rv34_decode_frame()
  rv34: use uint16_t for RV34DecContext.deblock_coefs
  librtmp: Add "lib" prefix to librtmp URLProtocol declarations.
  movenc: Use defines instead of hardcoded numbers for RTCP types
  smjpegdec: implement seeking
  ...

Conflicts:
	Changelog
	doc/general.texi
	libavcodec/avcodec.h
	libavcodec/rv30.c
	libavcodec/tta.c
	libavcodec/version.h
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/version.h
	libswscale/x86/swscale_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-15 01:52:14 +01:00
Martin Storsjö 8c62d83fe5 hlsproto: Rename the functions and context
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 9cb9c6c42d hlsproto: Encourage users to try the hls demuxer instead of the proto
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 8bdab32f4e libavformat: Rename the applehttp protocol to hls
Keep the old protocol name around for backwards compatibility
until the next bump.

Deprecate the method of implicitly assuming the nested protocol.
For applehttp://server/path, it might have felt logical, but
supporting hls://server/path isn't quite as intuitive. Therefore
only support hls+http://server/path from now on.

Using this protocol at all is discouraged, since the hls demuxer
is more complete and fits into the architecture better. There
have been cases where the protocol implementation worked better
than the demuxer, but this should no longer be the case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00