summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
Commit message (Collapse)AuthorAge
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* lavf: allow custom IO for all filesAnton Khirnov2016-01-24
| | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
* hlsenc: Support outputting specific versionsLuca Barbato2015-08-25
| | | | | | Right now only version 2 and version 3 are supported. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hlsenc: Use AV_TIME_BASE units for all the computationsLuca Barbato2015-08-16
| | | | | | | | Do not risk mixing different timebases. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hlsenc: write playlist into a temp file and replace the original atomicallyHendrik Leppkes2015-02-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: remove the AVIOContext for the playlist from the muxer contextHendrik Leppkes2015-02-20
| | | | | | Its only used in one function, having it in the context serves no purpose. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Set the stream time base hint properly for chained muxersMartin Storsjö2014-10-06
| | | | | | | This avoids warnings about using the codec time base as time base hint. Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: Add parameter -hls_allow_cacheJoakim Roubert2014-10-03
| | | | | | | | | | | | | The -hls_allow_cache parameter enables explicitly setting the EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates whether the client MAY or MUST NOT cache downloaded media segments for later replay. Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE will not show in the manifest for other values (or if -hls_allow_cache is not used. Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: Set the default codecs to AAC and H264Martin Storsjö2014-05-17
| | | | | | Most HLS implementation only support these codecs. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Sync the file number with the start sequenceLuca Barbato2014-04-30
|
* hls: Factor the sequence computationLuca Barbato2014-04-30
|
* hls: Print start_number as first sequence valueLuca Barbato2014-04-30
| | | | The option now behaves as expected.
* hls: Report the current media sequenceLuca Barbato2014-04-30
| | | | Useful for debugging mostly.
* hls: Add an option to prepend a baseurl to the playlist entriesLuca Barbato2014-04-29
| | | | | | Useful to generate playlists with absolute paths. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-23
|
* hlsenc: Don't reset the number variable when wrappingCarl Eugen Hoyos2013-08-15
| | | | | | | | The counter itself shouldn't be wrapped, since it is used for determining end_pts for the next segment - only wrap the number used for the segment file name. Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: Append the last incomplete segment when closing the outputStefano Sabatini2013-08-15
| | | | | | | Also avoid comparing NOPTS values. Bug-id: 551 Signed-off-by: Martin Storsjö <martin@martin.st>
* hls, segment: fix splitting for audio-only streams.Anton Khirnov2013-04-27
| | | | CC:libav-stable@libav.org
* hlsenc: Make the start_number option set the right variableKanglin2013-01-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: make segment number unsignedLuca Barbato2012-12-29
| | | | It will overflow if somebody keeps streaming for a time long enough.
* hlsenc: make EXT-X-MEDIA-SEQUENCE always increaseKanglin2012-12-29
|
* hlsenc: do not add timestamps in different timebasesLuca Barbato2012-12-29
| | | | | start_time is in stream timebase units while end_time is in AV_TIME_BASE ones.
* hlsenc: use the correct AV_TIME_BASE macroKanglin2012-12-29
| | | | recording_time is in AV_TIME_BASE units.
* hlsenc: keep the playlist to the correct number of itemsLuca Barbato2012-12-29
| | | | | Consider the corner case with a list size larger than the wrap number.
* hlsenc: use the segment filename in the playlist entryLuca Barbato2012-12-29
| | | | | Avoid calling av_get_frame_filename twice, once to generate the segment filename and once to generate the playlist.
* hlsenc: check append_entry return valueLuca Barbato2012-12-29
|
* hlsenc: use the basename to generate the list entriesLuca Barbato2012-12-29
| | | | | | The segment path is desumed from the playlist path, recording a relative path in the playlist while serving the file could lead to misleading results.
* hlsenc: Don't duplicate a string constantMartin Storsjö2012-12-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: Allocate enough space for the pattern stringStefano Sabatini2012-12-24
| | | | | | | | | If s->filename doesn't contain any period/filename extension to strip away, the buffer will be too small to fit both strings. This isn't any buffer overflow since the concatenation uses av_strlcat with the right buffer size. Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsenc: correctly report target durationLuca Barbato2012-12-23
|
* hls: use a meaningful long nameLuca Barbato2012-12-08
|
* hls: add start_number optionLuca Barbato2012-12-08
|
* hlsenc: stand alone hls segmenterLuca Barbato2012-11-13
Simplifies usage but has higher latency.