Commit Graph

41419 Commits

Author SHA1 Message Date
Vittorio Giovara
0af3b65880 asf: do not export XMP metadata by default
Similarly to what has been done for MOV, display XMP metadata only when
users explicitly require it.

The Extensible Metadata Platform tag can contain various kind of data
which are not strictly related to the video file, such as history of
edits and saves from the project file.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-03 15:30:52 +00:00
Vittorio Giovara
994d8f3095 fate: Add AIC test with odd sizes 2015-03-03 15:08:45 +00:00
Vittorio Giovara
e878ec0d47 aic: Fix decoding files with odd dimensions
Normally the aic decoder finds the proper slice combination (multiple of
some number less than 32) but in case of odd width, it resorts to the
default values, which were actually swapped.
The number of slices is modified to account for such odd width cases.

CC: libav-stable@libav.org
2015-03-03 15:08:15 +00:00
Martin Storsjö
33d412eb4a dashenc: Simplify code by using a local variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-02 20:34:43 +02:00
Martin Storsjö
91eee2af87 Revert "mov: Change DTS-based seek into CTS-based seek."
This reverts commit 4abfa387b8.

This commit broke playback of fragmented mp4 files with b-frames.
While investigating this, it turned out that the general framework
isn't ready for a PTS-based index yet. Revert this change until
a better thought out solution is in place.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-02 14:15:12 +02:00
Luca Barbato
9a26ba9713 v4l2: Add support for h264 2015-03-02 12:07:59 +01:00
Luca Barbato
619d5e7db8 v4l2: Use the codec descriptor facility
The encoder or decoder might be disabled but the format would be
supported for at least remuxing.
2015-03-02 11:27:57 +01:00
Luca Barbato
dbc1163b20 prores: Extend the padding check to 16bit
Some files produced by the official encoder have up to 16bit of
padding instead of the expected padding to the byte.

Use a self-explanatory macro instead of a simple number.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-02 11:27:57 +01:00
Martin Storsjö
4f6cd883f0 rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate
Instead check the timestamps while muxing, to avoid buffering a
too long timestamp range into one single packet.

This makes the AMR and AAC packetization slightly less efficient,
since we set a possibly unnecessarily high max_frames_per_packet.
(These packetizers end up doing a memmove of the TOC bytes if
sending a packet before max_frames_per_packet is achieved, and
we end up setting max_frames_per_packet to a value that should
be high enough for most uses.)

All packetizers that use max_frames_per_packet now set it either
to a default value, or to a value calculated based on other
parameters, so none of them rely on the previous default setting.

For iLBC, copy one frame at a time, to allow checking the timestamp
range for each of them - basically doing potentially multiple
loops to simplify the code instead of trying to calculate the
number of frames to buffer while honoring s1->max_delay.

This is in preparation for reducing the coupling between libavformat
and libavcodec, by not having the muxers use the encoder field
frame_size (which may not be available during e.g. stream copy).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:31 +02:00
Martin Storsjö
bde2bba45c rtpenc: Restructure if statements in packetizers to simplify adding more conditions
Factorize out the s->num_frames check at the start of the if statements,
simplifying adding more alternative causes for sending the buffered
frames.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:26 +02:00
Martin Storsjö
d4c7fc02f9 rtpenc: Skip redundant initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:22 +02:00
Martin Storsjö
f8c01257f9 rtpenc: Always do the default initialization regardless of codecs
This avoids having to jump to the defaultcase in the switch. Manually
override the stream time base back to 90 kHz for the few audio codecs
that don't use the sample rate as time base (mp2, mp3).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:11 +02:00
Martin Storsjö
11edeaea32 rtpenc_xiph: Don't exclude headers from max_payload_size
This makes things more consistent by using the variable in the same
way as in all other packetizers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:04 +02:00
Martin Storsjö
7c1e2e6466 rtpenc_xiph: Use AV_WB16 instead of manual bitshifts
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:00 +02:00
Martin Storsjö
d16c8d28d4 rtpenc_aac: Use AV_WB16 instead of manual bitshifts
This makes the code slightly more readable and understandable.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:57 +02:00
Martin Storsjö
9c9b0218e8 rtpenc_aac: Merge a definition with a declaration
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:54 +02:00
Martin Storsjö
1fc64e2e07 rtpenc: Write conditional statements on separate lines
Intentionally keeping some conditional statements on single lines
in rtpenc_h263.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:51 +02:00
Martin Storsjö
0662440b99 rtpenc_aac: Set a default value for max_frames_per_packet at init
This avoids having to conditionally set the default within the
packetizer function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:46 +02:00
Martin Storsjö
12b3459979 rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf
This doesn't fix any bug, but makes the code simpler for later
patches, and more straightforward to read as is.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:42 +02:00
Martin Storsjö
9856395344 rtpenc_aac: Fix sending fragmented frames
After sending a fragmented frame, len (s->buf_ptr - s->buf) isn't
zero, while s->num_frames is zero as intended. Using s->num_frames
makes it work as intended, and is less convoluted than keeping track
of (resetting) s->buf_ptr.

This avoids sending stray data after sending a fragmented aac packet.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:38 +02:00
Anton Khirnov
990e4a6639 Add a QSV decoding example. 2015-02-28 21:51:24 +01:00
Andreas Cadhalpun
ea1d0b7ece avcodec/utils: use correct printf specifier in ff_set_sar
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-28 21:51:24 +01:00
Christian Hujer
802987f8c7 x11grab: Unbreak building
The correct macro is DEC not D. Broken in
b31328d008

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-28 21:51:24 +01:00
Anton Khirnov
71f1ad37d8 lavc: do not compile fmtconvert unconditionally
Only ac3dec and dcadec use it.
2015-02-28 21:51:24 +01:00
Anton Khirnov
d74a8cb7e4 fmtconvert: drop unused functions 2015-02-28 21:51:24 +01:00
Anton Khirnov
ee964145b5 lavc: remove unused traces of fmtconvert usage
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
2015-02-28 21:51:24 +01:00
Martin Storsjö
b9d2d6843a tls: Pass AVOptions dictionaries through to the chained protocol
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:08:19 +02:00
Martin Storsjö
e14f98c62f tcp: Clarify the units for the timeout avoptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:07:24 +02:00
Martin Storsjö
c86d8aed74 avio: Rename avclass symbols relating to avio
Don't prefix them ffio_url, which is misleading, sounding too
much like the urlprotocol layer (like ffurl_*).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:07:04 +02:00
Luca Barbato
82b6e45116 configure: Move the cross_prefix setting after the toolchain one
Makes passing to configure
--toolchain=gcc-asan --cross-prefix=armv7a-hardfloat-linux-gnueabi-
work as intended.
2015-02-26 15:11:16 +01:00
Luca Barbato
85b3b1c4ba xcbgrab: Unbreak parsing filename options
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:31:20 +01:00
Luca Barbato
b31328d008 xcbgrab: Provide better names for the y and x option
Incidentally `-y` also collides with avconv global options.

Update x11grab to match and document the option.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:31:20 +01:00
John Stebbins
da7e561964 matroskaenc: Allow writing track "forced" flag
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:28:51 +01:00
Martin Storsjö
d594dbecce rtpdec: Rename the free method to close
Many of these functions were named foo_free_context, and since
the functions no longer should free the context itself, only
allocated elements within it, the previous naming was slightly
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:50 +02:00
Martin Storsjö
8e32b1f096 libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:47 +02:00
Martin Storsjö
199fb40278 rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:44 +02:00
Martin Storsjö
8a273a7460 avio: Add an internal utility function for freeing dynamic buffers
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:41 +02:00
Martin Storsjö
078d43e23a rtpdec: Free depacketizers if the init function failed
This is different from how it is handled in codecs/demuxers/muxers
though (where the close function isn't called if the open function
failed), but since the number of depacketizers that have an .init
function is quite limited, this is easy to change.

The main point is that if the init function failed, we shouldn't
try to use that depacketizer at all - this makes sure that the
parse function doesn't need to check for the things that were
initialized in the init function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:39 +02:00
Martin Storsjö
bb4a310bb8 rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any
.free function at all, where the payload context is freed by the
surrounding framework. Always free the context in the surrounding
framework, having the individual depacketizers only free any data
they've specifically allocated themselves.

This is similar to how this works for demuxer/muxers/codecs - a
component shouldn't free the priv_data that the framework has
allocated for it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:35 +02:00
Martin Storsjö
f4b59334bd rtpdec: Remove the now unused .alloc field
Always use the .priv_data_size field instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:32 +02:00
Martin Storsjö
78791c086b rtpdec: Use .init instead of .alloc to set default values
The ugly error handling in rdt gets improved in a later commit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:28 +02:00
Martin Storsjö
88434f9725 rtpdec: Remove unnecessary inline attributes
These functions are far from performance critical, so there's no
point in marking them as inline.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:25 +02:00
Martin Storsjö
ec96a89c3e rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions
This makes it clear that the individual parsing functions can't
touch the parsed out value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:22 +02:00
Martin Storsjö
ac0e54fda9 rtpdec: Add const to string parameters in internal fmtp parsing functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:18 +02:00
Martin Storsjö
12251f997b rtpdec: Remove unnecessary checks
The free function of a depacketizer won't be called if data is NULL.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:14 +02:00
Martin Storsjö
c82bf15dca rtpenc: Merge the h264 and hevc packetizers
They share a great deal of common structure; only a few minor
bits in the headers differ.

This also fixes an off-by-one in sending of the last fragment
of large HEVC nals (where it previously sent len+2 bytes, even
if it should have been len+RTP_HEVC_HEADERS_SIZE aka len+3).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:43 +02:00
Martin Storsjö
3567b91e49 rtpdec_hevc: Share the implementation of fragmented packets with h264
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:28 +02:00
Martin Storsjö
f3449062a8 rtpdec_hevc: Reduce indentation level by returning early on errors
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:21 +02:00
Martin Storsjö
8633fb47db rtpdec_hevc: Share the implementation of parsing a=framesize with h264
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:36 +02:00
Martin Storsjö
5956f489d0 rtpdec_hevc: Add asterisks at the start of each long comment line
This is the common style for such comments.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:27 +02:00