Marton Balint
28fbdece79
avformat: use ff_standardize_creation_time for formats writing all format string metadata
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Anton Khirnov
dc6527ed90
nutenc: do not use AVCodecContext.frame_size
...
It will in general not be available. Use block_align if known or fall
back to av_get_audio_frame_duration().
9 years ago
Michael Niedermayer
56c182c4d7
avformat/nutenc: implement deinit()
...
Should prevent some leaks if header writing fails
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
43ecec0f03
avformat: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Luca Barbato
1e7ff5ac69
nut: Use the correct codec_tag when multiple are available
...
Some codecs use the codec_tag to signal specific information and
picking the first one would lead to a broken file.
Bug-Id: 883
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Ganesh Ajjanagadde
7c8fcbbde3
avutil/tree: add additional const qualifier to the comparator
...
libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.
Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Michael Niedermayer
7ec5115409
avformat/nutenc: Omit AV_PKT_DATA_QUALITY_STATS when storing side data.
...
This side data does not serve or improve decoding the data, it thus
would semantically be metadata and not side data.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d66b623ad0
avformat/nutenc: Fix writing strings larger than 2gb
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
8e32b1f096
libavformat: Use ffio_free_dyn_buf where applicable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Timothy Gu
510b39c213
nutdec: Remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
80a11de7dc
nutenc: do not use has_b_frames
...
It is unreliable, especially when the stream codec context is not the
encoding context. Use the codec descriptor properties instead.
10 years ago
Michael Niedermayer
3b537eab27
avformat/nutenc: store the actual r_frame_rate in the corresponding field if available
...
Fixes Ticket 3629 part3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
b69183f65d
nutenc: check for negative index rather than assert
...
CC: libav-stable@libav.org
Bug-Id: CID 703721
10 years ago
Anton Khirnov
d754ed4172
riffenc: take an AVStream instead of an AVCodecContext
...
It will be useful in the following commits.
Also, rename the AVCodecContext pointer name from 'stream' to 'codec'.
11 years ago
Michael Niedermayer
3a76d7f73d
avformat/nutenc: cleaner version check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d7f398c542
avformat/nutenc: Fix error handling in nut_write_packet()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2351ea8a2e
avformat/nutenc: Fix error handling in write_sm_data()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8716605a26
avformat/nutenc: Suggest genpts if AV_NOPTS_VALUE
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
78a79a2ceb
avformat/nutenc: replace conditional by assert
...
Its implied by sp_count==0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6d1aba6a29
avformat/nutenc: limit index table size if no index is going to be written
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
82beb46e65
avformat/nutenc: add mode that omits the index
...
When the index is not written, several data tables become unneeded,
reducing memory and cpu requirements.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
df889be0a8
nutenc: avoid av_tree_find() operation per syncpoint
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
170a4d79c0
avformat/nutenc: bump minor version due to broadcast/pipe
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
45daae06fd
avformat/nutenc: change check to match comment
...
The code appears to assume STABLE will never change
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
99b15f1daa
avformat/nutenc: fix used version value
...
The broadcast/pipe flags arent stable + 1 they would be 4 or whenever but wouldnt change based
on which is stable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
c94e2e85cb
nut: Support experimental NUT 4 features
...
Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
d524d424ec
avformat/nutenc: switch to AVFMT_FLAG_BITEXACT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4b8c599e84
avformat/nutenc: fix missing break in switch
...
Fixes CID1163848
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8113e838a8
avformat/nut: add support for per frame side & meta data with version 4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
804ea14b35
avformat/nut: add minor_version field with version>=4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6aa50374bf
avformat/nut: store version in the context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
de2a2caf4d
nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
...
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197
An alternative would be to fail hard in this case and refuse to mux such data.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Derek Buitenhuis
b1fcdc08ce
nut: Fix unchecked allocations
...
CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Derek Buitenhuis
55ae13e3de
nut: Fix unchecked allocations
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Paul B Mahol
f2afe96181
avformat/nutenc: use av_reallocp_array()
...
Fixes memleak on allocation error.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
6a70feadb0
avformat/nutenc: use av_calloc()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Diego Biurrun
6ff15cd569
Remove unreachable returns
11 years ago
Luca Barbato
46c1917350
nut: use a define for the nut version
...
Ease switching version in the future and make evident why that value.
12 years ago
Michael Niedermayer
e39821a65e
nutenc: only write an index if there are syncpoints
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
bfe5454cd2
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
12 years ago
Luca Barbato
07585ffa62
nutenc: verbosely report unsupported negative pts
...
Additionally use the correct error number.
12 years ago
Luca Barbato
fce4450dec
nutenc: K&R formatting cosmetics
12 years ago
Luca Barbato
21de6ba5c1
nut: export codec_tag provided by rawvideo
...
Raw audio does not provide valid audio tags while rawvideo does.
The fate refs have to be updated because it undoes the previous tag
change.
12 years ago
Luca Barbato
1bd442c276
nut: prioritize native tags
...
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
12 years ago
Michael Niedermayer
de707bc8bd
mux/nut: factorize ff_choose_timebase() out of nut
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4abc411b97
nutenc: choose for non audio streams a timebase with finer resolution.
...
While a 25 fps stream can in general store frame durations in 1/25
units, this is not true for the timestamps. For example a 25fps
and a 25000/1001 fps stream when they are stored together might have
a matching 0 timestamp point but when for example a chapter from
this is cut the new start is no longer aligned. The issue gets
MUCH worse when the streams are lower fps, like 1 or 2 fps.
This commit thus makes the muxer choose a multiple of the
framerate as timebase that is at least about 20 micro seconds precise
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e3fb5bc147
nut: store and read the r_frame_rate
...
With this, when we use a finer timebase than neccessary to store
durations the demuxer still knows what the original timebase was.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4eb0f5f635
nutenc: use 1/sample rate as timebase for audio instead of framesize/sample rate
...
This way audio frames can be exactly stored even when they are not
aligned with timestamp 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
11d4e92ed9
avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
12 years ago