summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
Commit message (Collapse)AuthorAge
* avformat: Add max_probe_packets optionAndriy Gelman2019-11-03
| | | | | | | Allows user to set maximum number of buffered packets when probing a codec. It was a hard-coded parameter before this commit. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Don't suggest deprecated functionAndreas Rheinhardt2019-07-13
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat.h: Update the comment for AVInputFormat.flagsJun Zhao2019-03-26
| | | | | | | AVFMT_NOTIMESTAMPS may be using in AVInputFormat.flags for demuxing Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/avformat.h: update the comment from deprecated to new APISteven Liu2019-03-23
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* lavf: Constify AVProbeData* in av_probe_input_format().Carl Eugen Hoyos2019-03-20
|
* lavf/avformat: Add a warning that ff_const59 is not part of the public api.Carl Eugen Hoyos2019-03-20
|
* lavf: Constify AVInputFormat pointer.Carl Eugen Hoyos2019-03-20
|
* lavf: Constify AVOutputFormat pointer.Carl Eugen Hoyos2019-03-20
|
* avformat: deprecate unused MP4A_LATM flagGyan Doshi2018-06-13
| | | | | | | A generic lavf flag for AAC LATM packetization for the RTP muxer was added in ef409645f0 and then made inert 20 days later in 0832122880 when a private muxer option was added and the generic flag no longer read.
* avformat: add fields to AVProgram/AVStream for PMT change trackingAman Gupta2018-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These fields will allow the mpegts demuxer to expose details about the PMT/program which created the AVProgram and its AVStreams. In mpegts, a PMT which advertises streams has a version number which can be incremented at any time. When the version changes, the pids which correspond to each of it's streams can also change. Since ffmpeg creates a new AVStream per pid by default, an API user needs the ability to (a) detect when the PMT changed, and (b) tell which AVStream were added to replace earlier streams. This has been a long-standing issue with ffmpeg's handling of mpegts streams with PMT changes, and I found two related patches in the wild that attempt to solve the same problem: The first is in MythTV's ffmpeg fork, where they added a void (*streams_changed)(void*); to AVFormatContext and call it from their fork of the mpegts demuxer whenever the PMT changes. The second was proposed by XBMC in https://ffmpeg.org/pipermail/ffmpeg-devel/2012-December/135036.html, where they created a new AVMEDIA_TYPE_DATA stream with id=0 and attempted to send packets to it whenever the PMT changed. Signed-off-by: Aman Gupta <aman@tmm1.net>
* avformat/mpegts: tag video streams with still imagesAman Gupta2018-05-17
| | | | | | | | | | | | Parses the video_stream_descriptor (H.222 2.6.2) to look for the still_picture_flag. This is exposed to the user via a new AV_DISPOSITION_STILL_IMAGE. See for example https://tmm1.s3.amazonaws.com/music-choice.ts, whose video stream only updates every ~6 seconds. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add skip_estimate_duration_from_ptsAman Gupta2018-05-17
| | | | | | | | | | | | | | | | | | | For seekable mpegts streams, duration is calculated from pts by seeking to the end of the file for a pts and subtracting the initial pts to compute a duration. This can be expensive in terms of added latency during probe, especially when streaming over a network. This new option lets you skip the duration calculation, which is useful when you don't care about the value and want to save some overhead. This patch is particularly useful when dealing with live mpegts streams. Normally such streams are not seekable, so durations are not calculated. However in my case I am dealing with a seekable live mpegts stream (networked access to a .ts file which is still being appended to). Signed-off-by: Aman Gupta <aman@tmm1.net>
* lavf: move avpriv function definition to internal.hJosh de Kock2018-04-02
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* lavd: remove linked listsJosh de Kock2018-03-31
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* avformat/mpegts: set AV_DISPOSITION_DEPENDENT for mix_type=0 supplementary audioAman Gupta2018-02-23
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* lavf: add new API for iterating muxers and demuxersJosh de Kock2018-02-06
|
* avformat: deprecate AVFormatContext filename fieldMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: add url field to AVFormatContextMarton Balint2018-01-28
| | | | | | | | | This will replace the 1024 character limited filename field. Compatiblity for output contexts are provided by copying filename field to URL if URL is unset and by providing an internal function for muxers to set both url and filename at once. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat, hls: add a flag to signal unavailability of seekingwm42018-01-27
| | | | | | The seek function can just return an error if seeking is unavailable, but often this is too late. Add a flag that signals that the stream is unseekable, and use it in HLS.
* avformat: small AVFormatContext doxy cosmeticsJames Almer2018-01-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: small cosmetics after 6512ff72f9James Almer2018-01-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: make avformat_network_init() explicitly optionalwm42018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was sort of optional before - if you didn't call it, networking was initialized on demand, and an ugly warning was logged. Also, the doxygen comments threatened that it would be made strictly required one day. Make it explicitly optional. I would prefer to deprecate it fully, but there might still be legitimate reasons to use this. But the average user won't need it. This is needed only for two reasons: to initialize TLS libraries like OpenSSL and GnuTLS, and winsock. OpenSSL and GnuTLS were already silently initialized on demand if the global network init function was not called. They also have various thread-safety acrobatics, which make concurrent initialization within libavformat safe. In addition, the libraries are moving towards making their global init functions safe, which removes all need for central global init. In particular, GnuTLS 3.5.16 and OpenSSL 1.1.0g have been found to have safe init functions. In all cases, they use internal reference counters to avoid that the global uninit functions interfere with concurrent uses of the library by other API users who called global init. winsock should be thread-safe as well, and maintains an internal reference counter as well. Since we still support ancient TLS libraries, which do not have this fixed, and since it's unknown whether winsock and GnuTLS reinitialization is costly in any way, don't deprecate the libavformat functions yet.
* avformat: deprecate another ffserver API leftoverwm42018-01-16
|
* avformat/mux: stop delaying writing the headerJames Almer2017-12-06
| | | | | | | Every bitstream filter behaves as intended now, so there's no need to wait for the first packet of every stream. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove unnecessary AVStreamParseType enum offsetJames Almer2017-11-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: Look at the first 3 frames if timestamps indicate frame ↵Michael Niedermayer2017-11-11
| | | | | | | | reorder but decoder delay does not Fixes: Ticket6487 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: move priv_pts from AVStream to an internal structJames Almer2017-11-07
| | | | | | | It has no reason to be in a public header, even if defined as private. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat.h: fix pairs typoJames Almer2017-10-29
| | | | | Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: deprecate getters and setters for AVFormatContext and AVStream fieldsJames Almer2017-10-29
| | | | | | | The fields can be accessed directly, so these are not needed anymore. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: move public AVStream fields up in the structJames Almer2017-10-29
| | | | | | | Remove the silly second notice. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove use of deprecated AVFMT_FLAG_KEEP_SIDE_DATA flagJames Almer2017-10-29
| | | | | | | It has no effect whatsoever since the major bump. Replace the flag's documentation to reflect this as well. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf: Remove AVFMT_RAWPICTURE.Carl Eugen Hoyos2017-10-26
| | | | Deprecated since October 2015.
* avformat: remove dead av_stream_get_side_data() cruftJames Almer2017-10-22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '263358e0c9e7ffaa965fdbe986c8b18381d2b24a'James Almer2017-10-21
|\ | | | | | | | | | | | | * commit '263358e0c9e7ffaa965fdbe986c8b18381d2b24a': lavf: Drop deprecated AVFract type and related field Merged-by: James Almer <jamrial@gmail.com>
| * lavf: Drop deprecated AVFract type and related fieldVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 05/2014.
| * utils: Add av_stream_add_side_data()James Almer2016-11-23
| | | | | | | | | | | | | | | | Functionally similar to av_packet_add_side_data(). Allows the use of an already allocated buffer as stream side data. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | libavformat/avformat.h: Move docs inside of #ifMax Weber2017-06-30
| | | | | | | | | | | | | | Otherwise AVTimebaseSource gets av_apply_bitstream_filters' documentation in doxygen. Signed-off-by: Max Weber <mii7303@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec, avformat: deprecate anything related to side data mergingwm42017-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch deprecates anything that has to do with merging/splitting side data. Automatic side data merging (and splitting), as well as all API symbols involved in it, are removed completely. Two FF_API_ defines are dedicated to deprecating API symbols related to this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates AVFMT_FLAG_KEEP_SIDE_DATA in libavformat. Since it was claimed that changing the default from merging side data to not doing it is an ABI change, there are two additional FF_API_ defines, which stop using the side data merging/splitting by default (and remove any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec, and FF_API_LAVF_MERGE_SD in libavformat. It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD are quickly defined to 0 in the next ABI bump, while the API symbols are retained for a longer time for the sake of compatibility. AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for most of the time it will still be defined. Keep in mind that no code exists that actually tries to unset this flag for any reason, nor does such code need to exist. Code setting this flag explicitly will work as before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once side data merging has been removed from libavformat. In order to avoid that anyone in the future does this incorrectly, here is a small guide how to update the internal code on bumps: - next ABI bump (probably soon): - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it - define FF_API_MERGE_SD to 0, and remove all code covered by it - next API bump (typically two years in the future or so): - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered by it - define FF_API_MERGE_SD_API to 0, and remove all code covered by it This forces anyone who actually wants packet side data to temporarily use deprecated API to get it all. If you ask me, this is batshit fucked up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be set by default was rejected as an ABI change, so I'm going all the way to get rid of this once and for all. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: fix AVStream private fields markerwm42017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | Public fields were added after the private fields (negating the entire point of this). New private fields go into AVStreamInternal anyway. The new marker was set by guessing which fields are supposed to be private and wshich not. recommended_encoder_configuration is accessed by ffserver_config.c directly, and is supposed to use the public API. ffmpeg.c accesses AVStream.cur_dts, even though it's a private field, but that seems to be an older error.
* | avcodec, avutil, avformat: remove AVOption requirement for some fieldswm42017-03-02
| | | | | | | | | | | | | | | | | | | | Allow all struct fields to be accessed directly, as long as they're public. Before this change, many fields were "public", but could be accessed via AVOption only. This meant they were effectively not public, but were present for documentation purposes, which was incredibly confusing at best.
* | ffmpeg: pass output stream duration as a hint to the muxerTobias Rapp2017-01-19
| | | | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Add max_streams optionMichael Niedermayer2016-12-08
| | | | | | | | | | | | This allows user apps to stop OOM due to excessive number of streams Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf: fix the wrong warning msg and comments about av_find_stream_infoJun Zhao2016-12-05
| | | | | | | | | | | | | | | | | | av_find_stream_info() was deprecated by avformat_find_stream_info(), correct the warning message in the avformat_find_stream_info() and comments in the avformat.h Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: add av_stream_add_side_data()James Almer2016-11-18
| | | | | | | | | | | | | | | | Functionally similar to av_packet_add_side_data(). Allows the use of an already allocated buffer as stream side data. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | Revert "img2 encoder: allow %t in filename, based on patch from Yuval Adam"Michael Niedermayer2016-11-01
| | | | | | | | | | | | | | breaks API Found-by: jamrial This reverts commit 1a956c64c8eff5edecb004fc7aafd21207e6485c.
* | img2 encoder: allow %t in filename, based on patch from Yuval Adamrogerdpack2016-11-01
| | | | | | | | | | Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf: add AV_DISPOSITION_TIMED_THUMBNAILSRodger Combs2016-10-24
| | | | | | | | Reviewed-By: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mux: add avformat_init_outputRodger Combs2016-10-24
| | | | | | | | | | | | This allows a consumer to run the muxer's init function without actually writing the header, which is useful in chained muxers that support automatic bitstream filtering.
* | avformat: add av_stream_get_codec_timebase()James Almer2016-09-27
| | | | | | | | | | | | This will allow ffmpeg.c to stop using AVStream.codec in some cases Signed-off-by: James Almer <jamrial@gmail.com>