Commit Graph

10803 Commits

Author SHA1 Message Date
Luca Barbato 4dbfcd0757 librtmp: Avoid an infiniloop setting connection arguments
The exit condition was missing.

CC: libav-stable@libav.org
2016-06-22 06:37:33 +02:00
Paul B Mahol 470cd0c5fe Add TrueMotion 2.0 Real Time decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:48:12 -04:00
Paul B Mahol d78fd2fa21 Add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:45:51 -04:00
Vittorio Giovara 846a3e78a5 mov: Support prores with multiple stsd
This function needs to return false, or data in the additional tables
will be skipped, and the decoder will not be able to decode frames
associated with them.
2016-06-17 11:38:33 -04:00
Vittorio Giovara 7672997004 mov: Implement support for multiple sample description tables
Store data from each stsd in a separate extradata buffer, keep track of
the stsc index for read and seek operations, switch buffers when the
index differs. Decoder is notified with an AV_PKT_DATA_NEW_EXTRADATA
packet side data.

Since H264 supports this notification, and can be reset midstream, enable
this feature only for multiple avcC's. All other stsd types (such as
hvc1 and hev1) need decoder-side changes, so they are left disabled for
now.

This is implemented only in non-fragmented MOVs.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-17 11:38:33 -04:00
Diego Biurrun b668662939 get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.

Also sort headers into canonical order where appropriate.
2016-06-07 13:09:57 +02:00
Diego Biurrun b7f98659f2 Remove unnecessary get_bits.h #includes 2016-06-07 13:09:57 +02:00
Diego Biurrun 535a742c26 build: Change structure of the linker version script templates
Split version files into one line per symbol/directive to allow compatibility
with the Solaris linker without preprocessing and eliminate $ from version file
templates to simplify the postprocessing shell command.
2016-05-29 16:43:11 +02:00
Martin Storsjö 3fdffc032e rtsp: Use avcodec_descriptor_get instead of avcodec_find_decoder
This is only used for logging a human readable codec name for
debugging.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-25 12:22:28 +03:00
Anton Khirnov 14634429b9 lavf: update muxing doxy
Describe the new AVCodecParameters API.
2016-05-23 06:46:17 +02:00
Diego Biurrun e45a638f50 dump: Drop unused variable 2016-05-22 20:22:43 +02:00
Martin Storsjö b84f3a4003 movenc: Write 'loci' geotag metadata for 3gp and mp4
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:55 +03:00
Martin Storsjö f12a705ee5 movenc: Factorize a function for finding a metadata entry and the associated language
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:54 +03:00
Michael Niedermayer daec1651f1 movenc: Write ?xyz geotag metadata for mov files
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:53 +03:00
Michael Niedermayer bc43131997 mov: Also export loci altitude
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:53 +03:00
Michael Niedermayer 94d8141c8c mov: Append place name instead of overwriting for loci
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:52 +03:00
Michael Niedermayer f126365cda mov: Fix parsing short loci
Previously, we required the minimum number of bytes required for
the full box. Don't strictly require the astronomical body and additional
notes fields, but do require an altitude field (which currently isn't
parsed). This matches the initial length check at the start of the function
(which doesn't know about the variable length place field).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:51 +03:00
Michael Niedermayer 704d2bd18b mov: Print reason of loci parsing failure
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:45 +03:00
Martin Storsjö d34826c33d mov: Add a comment referring to the standard that defines the loci box
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:39 +03:00
Martin Storsjö 72d621069f movenc: Add a missed const
This was missed in e1eb0fc960, when ff_interleaved_peek was
changed to include const during the evolution of the patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 21:59:48 +03:00
Martin Storsjö a79aafd0b4 movenc: Add a test for VFR with b-frames, with a duration change at a fragment end
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:05 +03:00
Martin Storsjö e1eb0fc960 movenc: Use packets in interleaving queues for the duration at the end of fragments
As long as caller only writes packets using av_interleaved_write_frame
with no manual flushing, this should allow us to always have accurate
durations at the end of fragments, since there should be at least
one queued packet in each stream (except for the stream where the
current packet is being written, but if the muxer itself does the
cutting of fragments, it also has info about the next packet for that
stream).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:03 +03:00
Martin Storsjö fd4957d9c6 movenc-test: Test write_data_type
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:00 +03:00
Martin Storsjö 71852a1ba8 matroskaenc: Provide output bytestream markers
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:36:58 +03:00
Martin Storsjö dbbaad32e3 movenc: Provide output bytestream markers for fragmented content
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:36:55 +03:00
Martin Storsjö 371df9ba71 flvenc: Provide output bytestream markers
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:36:53 +03:00
Martin Storsjö db7968bff4 avio: Allow custom IO users to get labels for the output bytestream
This allows callers with avio write callbacks to get the bytestream
positions that correspond to keyframes, suitable for live streaming.

In the simplest form, a caller could expect that a header is written
to the bytestream during the avformat_write_header, and the data
output to the avio context during e.g. av_write_frame corresponds
exactly to the current packet passed in.

When combined with av_interleaved_write_frame, and with muxers that
do buffering (most muxers that do some sort of fragmenting or
clustering), the mapping from input data to bytestream positions
is nontrivial.

This allows callers to get directly information about what part
of the bytestream is what, without having to resort to assumptions
about the muxer behaviour.

One keyframe/fragment/block can still be split into multiple (if
they are larger than the aviocontext buffer), which would call
the callback with e.g. AVIO_DATA_MARKER_SYNC_POINT, followed by
AVIO_DATA_MARKER_UNKNOWN for the second time it is called with
the following data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:36:45 +03:00
Vittorio Giovara 0c4468dc18 stereo3d: Add API to get name from value or value from name
Use it in av_dump_format() instead of a huge switch case.
2016-05-17 12:25:27 -04:00
Vladimir Voroshilov d621b2f795 lavf: Raw G.729 demuxer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-05-17 12:24:32 -04:00
Francois Cartegnie 393596f9d5 mpegtsenc: stop impersonating ses in sdt
Unless specified, users must use non registered
range for network id

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-05-17 10:29:36 +02:00
Diego Biurrun 11de006bab Combine deprecation guards where appropriate
Some code blocks use multiple bits of deprecated API.
2016-05-13 15:14:30 +02:00
Diego Biurrun a6a750c7ef tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00
Diego Biurrun 257f00ec1a Split global .gitignore file into per-directory files 2016-05-13 14:55:56 +02:00
Diego Biurrun b7e64fba7f Reduce the scope of some variables
This avoids unused variable warnings after the next version bump.
Also drop a trace level av_log() call that is in the way.
2016-05-11 12:21:25 +02:00
Martin Storsjö bc2a32969e rtsp: Parse SSRC attributes in the SDP
When feeding input RTP packets to the depacketizer via custom IO,
it needs to pick the right stream using the payload type for
RTP packets, and using the SSRC for RTCP packets. If the first
packet is an RTCP packet, we don't (currently) know the SSRC
yet and thus can't pick the right RTP depacketizer to handle it.

By parsing the SSRC attribute in the SDP, we can map initial
RTCP packets to the right stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-11 10:35:26 +03:00
Martin Storsjö 9ea78fd00a rtpdec: Always check if we have the next packet queued
It doesn't matter what the actual reason for not returning
an AVPacket was - if we didn't return any packet and we have
the next one queued, parse it immediately. (rtp_parse_queued_packet
always consumes a queued packet if one exists, so there's no risk
for infinite loops.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-11 10:35:01 +03:00
Martin Storsjö e9443105ea avio: Remove a leftover comment
The declarations that this comment referred to were removed
in 2439f2ca8 - there is no unbuffered IO in this header now.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-06 22:34:59 +03:00
Diego Biurrun 5afb94c817 Mark read-only tables as static 2016-05-05 10:48:34 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Alexandra Hájková 5c31eaa999 Remove unnecessary get_bits.h #includes and add missing headers where needed.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 15:14:14 +02:00
Diego Biurrun 0f40c90984 Drop pointless assert.h #includes 2016-05-03 15:45:10 +02:00
Luca Barbato 74d98d1b0e mpegts: Validate the SL Packet Header Configuration
timeStampLength, OCRLength and AU_Length have well specified upper
boundaries.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-05-03 14:21:45 +09:00
Martin Storsjö 375cad0965 rtpdec_vp9: Support parsing the scalability structure
We still only support one single layer though, but this allows
receiving streams that have this structure present even for
single layer streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-30 20:58:23 +03:00
Martin Storsjö 943f4bea37 rtpdec_h264: Use avpriv_report_missing_feature instead of a manual av_log
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-30 20:58:18 +03:00
Martin Storsjö b55e3633d3 rtpdec: Use AVERROR_PATCHWELCOME instead of AVERROR(ENOSYS) for unimplemented features
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-30 20:57:44 +03:00
Martin Storsjö 70c77fdfc1 rtpdec_vp9: Update header parsing to spec draft 02
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-30 20:57:41 +03:00
Martin Storsjö 33b83d89e3 rtpdec_vp9: Make sure to free the temp buffer on close
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-30 20:57:31 +03:00
Martin Storsjö 75b90ef722 libavformat: Update the comment about AVOutputFormat flags
Add a flag which applies here, which had been missed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-21 11:20:46 +03:00
Martin Storsjö 74383def8f movenc: Handle pts == NOPTS when autoflushing
This muxer generally handles pts == NOPTS by using dts instead;
do this for consistency here as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-21 11:20:39 +03:00
Martin Storsjö 0abb07bad7 movenc: Update a comment to reflect how the code actually behaves
This codepath isn't quite as bad as it used to sound, if fragments
are cut automatically at video packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-19 22:43:00 +03:00