Commit graph

654 commits

Author SHA1 Message Date
Olivier Crête
b69fcc471e ffenc: Make keyframe forcing thread-safe
Make the keyframe forcing thread-safe, also emit a downstream event
to allow muxers or payloaders to react appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=602556
2009-11-20 22:14:51 -05:00
Edward Hervey
a00fb254aa Move encoders and muxers to GST_RANK_SECONDARY. 2009-11-18 17:36:48 +01:00
Wim Taymans
59bc425174 ffdec: remove clipping hack
Remove a hack that seems to produce wrong clipping values.
2009-11-16 13:55:01 +01:00
Jan Schmidt
62d54db07d ffmpeg: VC-1/WMV3 fixes.
Use format field in the pad caps to differentiate VC-1 from WMV3.
Fix a typo in the caps creation and parsing - the field is called
'format' - not 'fourcc'

Add a dodgy hack to populate the extradata size field
(first byte) when it is 0 - as it seems to be for some (Matroska)
test files.
2009-11-11 18:53:36 +00:00
Sjoerd Simons
19e81024a3 Always give the most video restricted caps possible
When the video caps aren't fixed yet, make sure we return the most
precise set of caps. It seems a regression was introduced in cc082f,
causing restricted caps to never be used if the context == NULL

None of the restricted caps generation uses the context, so no need to
check whether the context.

Fixes bug #578160.
2009-11-10 12:30:50 +01:00
Edward Hervey
a1384f990b ffmpegdec: Only restore default in AVCodecContext when needed.
Resetting default values is currently very complex in libavcodec, so
we only call it when needed (i.e. when a context was previously used).

Shaves off 10% of the setup of a decoder.
2009-11-09 19:21:35 +01:00
Tim-Philipp Müller
72cd8f1843 ffmpegdec: printf format fixes 2009-11-05 23:54:47 +00:00
Edward Hervey
019a6020e4 ffdec: Don't use an allocated 1-entry structure for private data.
If there's only one entry, just use that entry.
2009-11-02 09:06:46 +01:00
Edward Hervey
bd1b315c43 ffmux: avoid generating caps when registering
Don't generate caps when we register the class but delay that till when
we actually create an instance of the class.
2009-11-02 09:06:40 +01:00
Edward Hervey
e8c689fe94 ffdemux: avoid generating caps when registering
Don't generate caps when we register the class but delay that till when
we actually create an instance of the class.
2009-11-02 09:06:05 +01:00
Edward Hervey
a7dd30d8eb ffenc: avoid generating caps when registering
Don't generate caps when we register the class but delay that till when
we actually create an instance of the class.
2009-11-02 09:06:05 +01:00
Wim Taymans
343c82b18c ffdec: avoid generating caps when registering
Don't generate caps when we register the class but delay that till when
we actually create an instance of the class.
2009-10-22 16:27:28 -04:00
Sebastian Dröge
2ed8b6728d ffmpegenc: Add a note to the buffer-size property description
Setting it has no effect anymore and is deprecated.
2009-10-08 13:54:45 +02:00
Sebastian Dröge
087582d7cd Revert "ffenc: Make the buffer-size property read-only"
This reverts commit 98439aacc7.

Instead of printing a warning when trying to set the property
it should do nothing as before and the property description
should contain a note that setting it has no effect.
2009-10-08 13:52:22 +02:00
Sebastian Dröge
98439aacc7 ffenc: Make the buffer-size property read-only
...instead of just doing nothing when setting it. This makes sure
that people notice that they shouldn't set the property because
it creates a warning now.
2009-10-08 12:29:30 +02:00
Sebastian Dröge
c914f08b40 ffenc: Make sure to always provide large enough buffers
For audio always add the minimum ffmpeg buffer size, for video
use the same weird buffer size as they use in ffmpeg.c:
width*height*6 + 200

Also make setting of the buffer-size property a no-op.

Fixes bug #593651.
2009-10-07 09:15:40 +02:00
Sebastian Dröge
3a96bed6e6 ffmpegenc: Use dash instead of underscore in property names
GLib internally converts them to dashs anyway.
2009-10-07 09:13:56 +02:00
Sebastian Dröge
ee31435d49 Revert "ffmpegenc: Use dash instead of underscore in property names"
This reverts commit b814d25cc9.
2009-10-01 17:03:49 +02:00
Sebastian Dröge
25003e4307 Revert "ffenc: Make sure to always provide large enough buffers"
This reverts commit d9f6febe70.
2009-10-01 17:03:42 +02:00
Sebastian Dröge
799b19c2f2 Revert "ffmpegenc: Also add FF_MIN_BUFFER_SIZE to video buffers too"
This reverts commit 577525af3d.
2009-10-01 17:03:33 +02:00
Sebastian Dröge
577525af3d ffmpegenc: Also add FF_MIN_BUFFER_SIZE to video buffers too
Just to make sure we never get below it in case of very small videos.
2009-10-01 16:46:34 +02:00
Sebastian Dröge
d9f6febe70 ffenc: Make sure to always provide large enough buffers
For audio always add the minimum ffmpeg buffer size, for video
use the same weird buffer size as they use in ffmpeg.c:
width*height*6 + 200

Also make setting of the buffer-size property a no-op.

Fixes bug #593651.
2009-10-01 16:44:22 +02:00
Sebastian Dröge
b814d25cc9 ffmpegenc: Use dash instead of underscore in property names
GLib internally converts them to dashs anyway.
2009-10-01 16:20:13 +02:00
Wim Taymans
b85d889582 ffdec: correctly check for NONE timestamp 2009-09-10 14:11:18 +02:00
Wim Taymans
669a0e359a ffmpeg: add support for G721
Add support for g721, which is like G726 but with 1 channel, 8KHz and a bitrate
of 32000.

Fixes #594454
2009-09-09 13:35:20 +02:00
Jonathan Matthew
595de04316 codecmap: don't set channel-positions for common mono and stereo cases 2009-09-08 15:29:24 +02:00
Wim Taymans
46bf3b92d0 ffdec: disable interpolation when dropping frames
When we are dropping frames because of QoS disable the DTS interpolation because
we won't be able to update the timestamps and end up setting the wrong
timestamps. Instead, simply use the timestamps from ffmpeg.
2009-09-01 21:42:26 +02:00
Tim-Philipp Müller
0044128487 typefinders: skip ffmpeg typefinders if there isn't enough data
ffmpeg typefinders don't do bounds checking for small chunks of
data, so just skip them if we don't have a lot of data, to avoid
invalid memory access and/or crashes.
2009-08-21 02:58:58 +01:00
Wim Taymans
2b967b4122 ffdec: reset timestamp queue after flush 2009-08-18 13:20:55 +02:00
Tim-Philipp Müller
37875a95eb Lower minimum sample rate in generic template caps from 8000 to 4000
Fixes playback of ADPCM clip (#591809).
2009-08-14 16:09:05 +01:00
Sebastian Dröge
5497a8d140 ffmpegdec: Fix strict aliasing warnings 2009-08-13 17:38:32 +02:00
Sebastian Dröge
6923de9378 ffmpegdec: Don't use guintptr as it's new in GLib 2.18
Fixes bug #591469.
2009-08-12 10:57:18 +02:00
Edward Hervey
305e80e7d6 gstffmpeg: Lower debugging levels from WARNING to DEBUG
These statements aren't critical per se... and just clutter debug logs.
2009-08-10 12:04:39 +02:00
Sebastian Dröge
0111edbf5d ffmpegenc: Return all supported caps instead of only the first 2009-08-09 09:47:26 +02:00
Sebastian Dröge
d181dbd7a0 ffmpegenc: If an encoder lists the supported pixfmts use them to create the caps
...instead of creating standard caps with all pixfmts.

Fixes bug #591038.
2009-08-08 22:43:06 +02:00
Sjoerd Simons
ea6a66b5b3 ffmpegdec: Fix duration calculation when ticks_per_frame isn't 1
Fixes bug #591163.
2009-08-08 22:20:03 +02:00
Sebastian Dröge
1c283b8c22 ffmpegdec: Fix compiler warning and indention 2009-08-06 06:57:18 +02:00
Руслан Ижбулатов
54428c186b ffmpegdec: Assign offsets to outgoing buffers more accurate
This now uses ffmpeg functionality to keep random metadata next to
the buffers and to get the correct offset for a frame, similar to how
timestamps are handled.

Fixes bug #578278.
2009-08-06 06:57:09 +02:00
Edward Hervey
56887682d0 gstffmpegenc: Try getting the caps for the declared pixfmt without a context.
PixFmt that are declared in AVCodec.pix_fmts are ones which are 'officially'
declared as being supported. We should therefore not have to create a
AVCodecContext and open an encoder to know if it's supported or not.
Also, doing it this way allows us to better pickup configuration overrides
we have in gstffmpegcodecmap for some codecs (like restrictions on width,
height, framerate like it's the case for dnxhd).

Fixes #575545
2009-07-31 13:27:28 +02:00
Olivier Crête
597f32e895 ffmpegdec: Disable theora decoder
The wrapper does not give the decoder the extradata correctly.
Just use theoradec.

Fixes bug #590172
2009-07-29 14:49:56 -04:00
Руслан Ижбулатов
a5f9485917 Codec frame delay fix and trailing zero-length frame fix
Takes codec frame delay into account (roughly the same way it does for timestamps for reordered frames) to produce frames with correct offsets.
A special hack to allow trailing frame with timestamp=segment.stop to be displayed.

Fixes bug #578278.
2009-07-29 14:19:20 +02:00
Tim-Philipp Müller
508ab716b0 ffmpegdemux: use gst_element_found_tags() for global tags
So we get a message on the bus *and* tag events pushed downstream.
2009-07-28 23:58:02 +01:00
Tim-Philipp Müller
d917f59a84 ffmpegdemux: cache events from upstream and re-send them later
Cache any events we get from upstream before we're open, especially
tag events we may be getting from apedemux/id3demux or the like, and
push them downstream later when we've added our pads instead of just
dropping them silently. Fixes transcoding tags for Monkey's Audio
Files with preceding APE or ID3v2 tags (#586957). Add minimal unit
test for this.

Also push stream tags later after the global tags and the newsegment
event rather than right after creating the pad.
2009-07-28 23:58:02 +01:00
Jordi Mas
c27b4babf1 ffmpegmux: Add proper audio mapping for DVD muxer. Fixes #588546 2009-07-20 11:48:45 +02:00
Tim-Philipp Müller
2f8f014d9b ffmpegmux: don't leak caps if type already exists
We don't know if gst_element_register() will replace the known type
or reject it, so we really need to free the caps before.
2009-07-01 10:45:32 +01:00
Tim-Philipp Müller
048b0145a8 ffmpegdemux: post tags after the initial newsegment event 2009-07-01 10:45:32 +01:00
Wim Taymans
fe10ecd097 ffdec: don't wait for keyframe after discont
After a DISCONT, mark the next frame with DISCONT but don't wait for a new
keyframe. This greatly improves performance on lossy networks or currupted
frames as the decoder can usually continue and conceil errors up to the next
keyframe.
2009-07-01 11:23:59 +02:00
Wim Taymans
31a9d9330b Merge branch 'master' of ssh://git.freedesktop.org/git/gstreamer/gst-ffmpeg 2009-07-01 11:21:46 +02:00
Edward Hervey
fe2291e9e1 gstffmpegdec: Fix debug arguments. Fixes #587297 2009-06-29 13:53:50 +02:00
Arnout Vandecappelle
0192717045 ffmpegdec: don't drop buffers when caps change.
Fixes #585257
2009-06-25 16:05:56 +02:00