Dan Dennedy [Sat, 7 May 2011 05:46:59 +0000 (22:46 -0700)]
Factor out some frame properties in transitions.
Transitions had to apply a pattern of copying some properties from the A
frame to the B frame that was unrelated to its core routine. This is now
largely taken care of by a recent commit to mlt_transition.c.
Dan Dennedy [Sat, 7 May 2011 04:54:29 +0000 (21:54 -0700)]
Revert commits e49264, c9cb51, and e7a775.
These commits are related to kdenlive bugs 1962 and 2003.
This is about an a/v sync problem when using full duration of a file.
The changes are reverted because I believe the root cause is returning
fewer samples than requested on the last frame of audio, and that was
fixed in the previous commit.
Also, the adjust_length property is removed because it did not work; the
property was not available when trying to get it from within the
constructor. The correct way to adjust the length is to first get the
length and then set the length and out properties.
Dan Dennedy [Sat, 7 May 2011 03:56:27 +0000 (20:56 -0700)]
Add conversion routines for new audio formats.
These only doing conversion _from_ the new types mlt_audio_s32le and
mlt_audio_f32le. There are no plans at the moment for conversion into
them, but it is certainly not out of the question.
Dan Dennedy [Sat, 7 May 2011 03:52:25 +0000 (20:52 -0700)]
Add audiochannels normalization filter.
Refactors code from the resamplers into a new filter to be more
manageable. Eventually, we can add options on what to do when
adding/removing channels.
Dan Dennedy [Wed, 4 May 2011 06:23:59 +0000 (23:23 -0700)]
Ensure transition B frames get some consumer properties.
Also, ensure both A and B frames have sane scaling and aspect ratio
values.
This addresses an issue where composite and region were not getting the
correct deinterlace method impacting performance. In addition, it
factors out some common code (best practice) from various transitions
moving it into the framework.
Dan Dennedy [Mon, 2 May 2011 05:17:48 +0000 (22:17 -0700)]
Finish work to normalize channel count.
Also, refactor the audio resamplers to use mlt_audio_format_size() and
mlt_frame_set_audio(). Currently, there are no controls over which
channels to drop or duplicate.
Dan Dennedy [Sun, 1 May 2011 02:03:13 +0000 (19:03 -0700)]
Fix sample rate and channel count from avformat producer.
If unable to resample or the decoder does not give the requested channel
count, then we should return the actual values so downstream components
can do the correct thing if they can. A good example of this is 6
channel AAC when the consumer requests 2 channels. Unlike the AC-3
decoder, the AAC decoder can not downmix. So, we were returning audio
pcm containing 6 channels but with a channel count of 2.
Dan Dennedy [Mon, 28 Mar 2011 02:13:55 +0000 (19:13 -0700)]
Fix composite using wrong B frame scaling.
This could happen when the caller of mlt_frame_get_image supplied 0 for
width and height. For example, Kdenlive's GL output with the sdl_audio
consumer with real_time > 1 and paused.
Dan Dennedy [Fri, 25 Mar 2011 03:00:47 +0000 (20:00 -0700)]
Redo locking in avformat producer.
This significantly improves concurrency. The service locks added during
parallel consumer development also introduced a concurrency performance
regression even for the single-threaded consumer. The result was much
audio discontinuity due to audio output buffer underruns. As a result,
the recent bug fix to re-open the video demuxer upon seeking to the
first frame had to be rewritten.
Dan Dennedy [Thu, 24 Mar 2011 03:36:47 +0000 (20:36 -0700)]
Default sdl_preview prefill to 1.
Since buffer and prefill were recently passed from sdl_preview onto sdl,
sdl's default buffer level changed to the base service default of 25.
That change increases the latency of transport controls. Changing the
prefill to 1 resolves that while still allowing the rendering thread a
chance to do some anticipatory work.
Dan Dennedy [Tue, 15 Mar 2011 05:08:01 +0000 (22:08 -0700)]
Add force_length and adjust_length properties.
The reporter on kdenlive bug 2003 reports another user on IRC had the
same problem with clips being too long. Change the default length
adjustment to be more safe and add new properties to affect the
heuristic for other applications that might want a different behavior.
adjust_length applies a plus/minus operand to the detected length.
force_length provides a brute force length override.
Dan Dennedy [Sat, 12 Mar 2011 08:50:27 +0000 (00:50 -0800)]
Prefer opening codec by name instead of by ID.
This fixes a bug with actually using libxvid instead of mpeg4 because
both share the same CODEC_ID_MPEG4. This is similar to the recent
problem with ac3 selection in new versions of ffmpeg that have 2 ac3
encoders.