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>
10 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
12 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
Diego Biurrun
bc66827fb1
nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments
12 years ago
Michael Niedermayer
5c4e2e8755
nutenc: avoid negative timestamps
...
Fixes Ticket1468
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e9350c44ad
nutenc: remove outdated fixme
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
3b4bb19e63
lavf: flush the output AVIOContext in av_write_trailer().
...
This is consistent with stdio and is what we want to do in all cases.
Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
12 years ago
Michael Niedermayer
3a621c9d99
nutenc: Support writing an index
...
The seek test improves in accuracy
Fixes Ticket877
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b2a8ce4e67
nutenc: keep track of max_pts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago