Commit graph

209 commits

Author SHA1 Message Date
Thomas Vander Stichele
0de1f5357d Address bad FLAC sample length encoding of #5844455
Commit df707c6664
introduced an obvious bug in the sample length calculation,
using the wrong macro for conversion.
2009-06-01 22:33:02 +02:00
Tim-Philipp Müller
8accf2704b flacdec: fix buffer leak
gst_buffer_replace() will take its own ref, so we still have
to unref the buffer if we don't need it any longer.
2009-05-13 09:18:07 +01:00
Edward Hervey
e8cbbd22f8 flacdec: Actually output the pending buffer.. and not a blank one.
It was previously sending the bogus buffer which was returned from
the bufferalloc (required for reverse negotiation apparently) instead
of the pending buffer.
2009-05-08 16:40:57 +02:00
Christian Schaller
bdf1698f35 Add RANKS for various encoders and muxers 2009-05-07 18:10:08 +01:00
Jan Schmidt
c41d3d87fa flac: Make buffers created during seek act like normal buffers.
Store the offset and caps when allocating a buffer during seeking, and then
allocate a new buffer with buffer_alloc before we push it out. This ensures
that in all respects the first buffer decoded during seeking behaves like
all other buffers, including allowing downstream re-negotiation.
2009-05-06 14:24:20 +01:00
Thomas Vander Stichele
71acf2e900 flacdec: don't use pad_alloc when decoding while seeking. Fixes #579422 2009-05-06 15:28:46 +02:00
Sebastian Dröge
9da04cd6af flac: Implement preset interface 2009-05-04 12:43:42 +02:00
Sebastian Dröge
5a7edcbd81 flacenc: Use the tag merge mode that was set on the interface for merging tag events 2009-04-29 11:13:11 +02:00
Thomas Vander Stichele
8009fcf547 add pending_samples so that we only update segment's last stop after really sending the samples 2009-04-04 15:14:32 +02:00
Thomas Vander Stichele
fb4953a68d add debugging 2009-04-04 15:14:31 +02:00
Thomas Vander Stichele
5e19fc1058 clipping should also work if it's done on the first buffer starting at 0 2009-04-04 15:14:31 +02:00
Tim-Philipp Müller
11a8aa91b8 flac: require a 'newer' flac and remove support for the legacy flac API 2009-03-27 21:27:30 +00:00
Laszlo Pandy
73fac6e4ea Don't call FLAC__ methods before it's initialized. Fixes #516031
In the event handler, gst_flac_dec_sink_event(), two functions are called on
the FLAC stream without checking if it has been initialized:
FLAC__stream_decoder_flush()
FLAC__stream_decoder_process_until_end_of_stream()

Both these FLAC__*() functions modify the internal state of the FLAC stream.
Later, when the buffers start flowing, gst_flac_dec_chain() tries to initialize
the stream. the FLAC__stream_decoder_init_stream() call will fail because the
previous calls to FLAC__*() changed the stream state so it is no longer in the
initialized state.
2009-03-12 16:10:25 +01:00
Wim Taymans
8f8e035cd5 flacdec: don't lose the first buffer after a seek
The flacdec API calls the write callback when performing a seek. We cannot yet
push out a buffer at that time so we must keep it and push it out later.
Flush out the upstream part of the pipeline when doing a seek.
Fixes #574275.
2009-03-09 17:14:12 +01:00
Thomas Vander Stichele
13221762d0 Add/clarify/fix some logging. 2009-03-02 08:41:15 +01:00
Thomas Vander Stichele
a7902054bd respect DEFAULT segment by clipping the last buffer to be sent 2009-02-21 12:47:00 +01:00
Michael Smith
db0b8755e0 flacdec: if we aborted reading, don't do into an infinite loop.
If our read callback ran out of data, so had to abort reading, we return
GST_FLOW_ERROR instead of going into an infinite loop.
2009-02-05 15:53:04 -08:00
Thomas Vander Stichele
b312bc6931 debug on the object 2009-02-05 20:02:01 +01:00
Stefan Kost
9cf73bdd8f Update and add documentation for plugins with deps (ext).
Link to properties. Correct titles for examples. Document a few trivial cases. Keep lists in section file and docs/plugins/Makefile.am alphabetically ordered. Fix warnings that gtk-doc points out.
2009-01-28 18:05:09 +02:00
Jan Schmidt
1e7e381a8d Fix typo and small flaw in flac decoder 2009-01-22 14:33:04 +00:00
Wim Taymans
43fb36545b Whitespace fixes and some improved debug lines. 2009-01-21 13:25:06 +01:00
Edward Hervey
5ad613d9b9 Switch to using GstStaticPadTemplate.
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_base_init),
(gst_flac_dec_init):
* gst/law/alaw-decode.c: (gst_alaw_dec_base_init),
(gst_alaw_dec_init):
* gst/law/alaw-encode.c: (gst_alaw_enc_base_init),
(gst_alaw_enc_init):
* gst/law/alaw.c: (plugin_init):
* gst/law/mulaw-decode.c: (gst_mulawdec_base_init),
(gst_mulawdec_init):
* gst/law/mulaw-encode.c: (gst_mulawenc_base_init),
(gst_mulawenc_init):
* gst/law/mulaw.c: (plugin_init):
Switch to using GstStaticPadTemplate.
* gst/udp/gstudpnetutils.c: (gst_udp_get_addr):
Don't forget to free the addrinfo structure.
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset),
(gst_wavparse_sink_activate):
Don't forget to unref the GstAdapter.
2008-12-13 15:34:01 +00:00
Stefan Kost
084812bffd Don't install static libs for plugins. Fixes #550851 for -good.
Original commit message from CVS:
* ext/aalib/Makefile.am:
* ext/annodex/Makefile.am:
* ext/cairo/Makefile.am:
* ext/dv/Makefile.am:
* ext/esd/Makefile.am:
* ext/flac/Makefile.am:
* ext/gconf/Makefile.am:
* ext/gdk_pixbuf/Makefile.am:
* ext/hal/Makefile.am:
* ext/jpeg/Makefile.am:
* ext/ladspa/Makefile.am:
* ext/libcaca/Makefile.am:
* ext/libmng/Makefile.am:
* ext/libpng/Makefile.am:
* ext/mikmod/Makefile.am:
* ext/pulse/Makefile.am:
* ext/raw1394/Makefile.am:
* ext/shout2/Makefile.am:
* ext/soup/Makefile.am:
* ext/speex/Makefile.am:
* ext/taglib/Makefile.am:
* ext/wavpack/Makefile.am:
* gst/alpha/Makefile.am:
* gst/apetag/Makefile.am:
* gst/audiofx/Makefile.am:
* gst/auparse/Makefile.am:
* gst/autodetect/Makefile.am:
* gst/avi/Makefile.am:
* gst/cutter/Makefile.am:
* gst/debug/Makefile.am:
* gst/effectv/Makefile.am:
* gst/equalizer/Makefile.am:
* gst/flx/Makefile.am:
* gst/goom/Makefile.am:
* gst/goom2k1/Makefile.am:
* gst/icydemux/Makefile.am:
* gst/id3demux/Makefile.am:
* gst/interleave/Makefile.am:
* gst/law/Makefile.am:
* gst/level/Makefile.am:
* gst/matroska/Makefile.am:
* gst/median/Makefile.am:
* gst/monoscope/Makefile.am:
* gst/multifile/Makefile.am:
* gst/multipart/Makefile.am:
* gst/oldcore/Makefile.am:
* gst/qtdemux/Makefile.am:
* gst/replaygain/Makefile.am:
* gst/rtp/Makefile.am:
* gst/rtsp/Makefile.am:
* gst/smpte/Makefile.am:
* gst/spectrum/Makefile.am:
* gst/udp/Makefile.am:
* gst/videobox/Makefile.am:
* gst/videocrop/Makefile.am:
* gst/videofilter/Makefile.am:
* gst/videomixer/Makefile.am:
* gst/wavenc/Makefile.am:
* gst/wavparse/Makefile.am:
* sys/directdraw/Makefile.am:
* sys/directsound/Makefile.am:
* sys/oss/Makefile.am:
* sys/osxaudio/Makefile.am:
* sys/osxvideo/Makefile.am:
* sys/sunaudio/Makefile.am:
* sys/v4l2/Makefile.am:
* sys/waveform/Makefile.am:
* sys/ximage/Makefile.am:
Don't install static libs for plugins. Fixes #550851 for -good.
2008-11-04 12:28:34 +00:00
Sebastian Dröge
d18bbcf1a8 ext/flac/Makefile.am: Include $(FLAC_CFLAGS) in CFLAGS to make sure to find the FLAC headers.
Original commit message from CVS:
* ext/flac/Makefile.am:
Include $(FLAC_CFLAGS) in CFLAGS to make sure to find the FLAC headers.
This fixes compilation if FLAC is installed in an uncommon location
that is not already handled by other CFLAGS. Fixes bug #558711.
2008-10-31 18:17:50 +00:00
Jan Schmidt
9df30524b5 ext/flac/: Cast some size_t arguments to guint to avoid compiler warnings on 64-bit systems.
Original commit message from CVS:
* ext/flac/gstflacdec.c (gst_flac_dec_read_stream):
* ext/flac/gstflacenc.c (gst_flac_enc_write_callback):
Cast some size_t arguments to guint to avoid compiler
warnings on 64-bit systems.
2008-10-10 12:28:34 +00:00
Tim-Philipp Müller
9a12021247 ext/flac/gstflacenc.c: Make sure the desired default values are actually set, not only registered as defaults (actual...
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_class_init):
Make sure the desired default values are actually set, not only
registered as defaults (actual problem is that the stereo-specific
values are only updated if channels==2, which is not the case yet
when the object is created, so the default values for the
mid-side-stereo and loose-mid-side-stereo settings are never
set in _update_quality()). Makes flacenc create smaller files by
default (for stereo input), and fixes #550791.
2008-09-04 09:25:59 +00:00
Tim-Philipp Müller
5b586be974 ext/flac/gstflacenc.c: Fix compilation against older libflac versions.
Original commit message from CVS:
* ext/flac/gstflacenc.c:
Fix compilation against older libflac versions.
2008-08-20 21:54:35 +00:00
Sebastian Dröge
530c36d9e7 ext/flac/gstflacenc.c: Actually provide the variables required for the format string.
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_check_discont):
Actually provide the variables required for the format string.
2008-08-09 08:58:26 +00:00
Sebastian Dröge
c046872132 ext/flac/gstflacenc.*: Handle non-zero start timestamps correctly, mark header packets as
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_write_callback),
(gst_flac_enc_check_discont), (gst_flac_enc_chain),
(gst_flac_enc_change_state):
* ext/flac/gstflacenc.h:
Handle non-zero start timestamps correctly, mark header packets as
IN_CAPS and print a warning and suggest using audiorate if stream
discontinuities are detected. When FLAC supports flushing the encoder
somehow this should be done for discontinuities instead.
Remove some unused variables from the instance struct.
2008-08-08 15:20:24 +00:00
Sebastian Dröge
916589570c ext/flac/gstflacenc.c: If seeking failed return the appropiate return value to FLAC.
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback):
If seeking failed return the appropiate return value to FLAC.
Otherwise it thinks seeking was successfull and tries to rewrite
parts of the headers which then get appended to the output.
2008-08-07 16:13:41 +00:00
Frederic Crozat
426721f717 Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822).
Original commit message from CVS:
Patch by: Frederic Crozat <fcrozat@mandriva.org>
* ext/esd/gstesd.c: (plugin_init):
* ext/flac/gstflac.c: (plugin_init):
* ext/shout2/gstshout2.c: (plugin_init):
* ext/wavpack/gstwavpack.c: (plugin_init):
* sys/oss/gstossaudio.c: (plugin_init):
* sys/v4l2/gstv4l2.c: (plugin_init):
Make sure gettext returns translations in UTF-8 encoding rather
than in the current locale encoding (#546822).
2008-08-07 16:11:00 +00:00
Sebastian Dröge
701bb29b16 ext/flac/gstflacdec.c: Add FIXME for 0.11 to simply output everything with width=32 as given by FLAC and let audiocon...
Original commit message from CVS:
* ext/flac/gstflacdec.c:
Add FIXME for 0.11 to simply output everything with width=32 as given
by FLAC and let audioconvert handle the conversions instead of doing
them in flacdec.
2008-08-07 14:40:13 +00:00
Jonathan Matthew
8ced1b35ff ext/flac/: Port flactag to 0.10, add documentation for it and clean it up a bit.
Original commit message from CVS:
Based on a patch by: Jonathan Matthew <notverysmart at gmail dot com>
* ext/flac/Makefile.am:
* ext/flac/gstflac.c: (plugin_init):
* ext/flac/gstflactag.c: (gst_flac_tag_setup_interfaces),
(gst_flac_tag_base_init), (gst_flac_tag_class_init),
(gst_flac_tag_dispose), (gst_flac_tag_init),
(gst_flac_tag_sink_setcaps), (gst_flac_tag_chain),
(gst_flac_tag_change_state):
* ext/flac/gstflactag.h:
Port flactag to 0.10, add documentation for it and clean it up a bit.
Fixes bug #413841.
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/gst-plugins-good-plugins.hierarchy:
* docs/plugins/gst-plugins-good-plugins.interfaces:
* docs/plugins/gst-plugins-good-plugins.prerequisites:
* docs/plugins/inspect/plugin-flac.xml:
* ext/flac/gstflacdec.c: (gst_flac_dec_base_init):
* ext/flac/gstflacdec.h:
* ext/flac/gstflacenc.c: (gst_flac_enc_base_init):
* ext/flac/gstflacenc.h:
Add flactag and flacenc to the documentation and mark
the private parts of the flacdec instance structure as private.
Also use gst_element_class_set_details_simple() in flacdec and
flacenc.
2008-08-06 15:34:55 +00:00
Sebastian Dröge
df707c6664 ext/flac/gstflacenc.c: Set an estimate for the total number of samples that will be encoded if possible to help decod...
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_query_peer_total_samples),
(gst_flac_enc_sink_setcaps), (gst_flac_enc_write_callback):
Set an estimate for the total number of samples that will be encoded
if possible to help decoders if the streaminfo can't be rewritten
later (like when muxing into Ogg containers).
Add a warning if we get header packets after data packets as those
will get lost when muxing into Ogg, i.e. rewriting the headers doesn't
work.
2008-08-03 12:23:49 +00:00
Sebastian Dröge
e3e4257ac9 ext/flac/gstflacdec.c: Support decoding of all depths between 4 and 32 bits and read the depth from the streaminfo he...
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_metadata_callback),
(gst_flac_dec_write):
Support decoding of all depths between 4 and 32 bits and read the
depth from the streaminfo header if needed. Also support all sampling
rates between 1 and 655350 Hz.
* ext/flac/gstflacenc.c:
(gst_flac_enc_caps_append_structure_with_widths),
(gst_flac_enc_sink_getcaps), (gst_flac_enc_sink_setcaps),
(gst_flac_enc_chain):
* ext/flac/gstflacenc.h:
Support encoding in all bit depths supported by the streamable
subformat (i.e. 8, 12, 16, 20 and 24 bits) and all sampling rates
between 1 Hz and 655350 Hz.
2008-08-03 11:38:22 +00:00
Sebastian Dröge
826f568cb4 ext/flac/gstflacenc.c: Support encoding of up to 8 channels.
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_init),
(gst_flac_enc_sink_getcaps):
Support encoding of up to 8 channels.
2008-08-03 09:23:14 +00:00
Sebastian Dröge
a53866ddc1 ext/flac/gstflacdec.c: Always post the audio-codec tag, not only if other tags are present.
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_setup_seekable_decoder),
(gst_flac_dec_setup_stream_decoder),
(gst_flac_dec_update_metadata):
Always post the audio-codec tag, not only if other tags are present.
2008-08-02 17:18:47 +00:00
Tim-Philipp Müller
21c48f1a1d Use new utility functions in libgsttag to process coverart (#512333).
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_extract_picture_buffer):
* gst/id3demux/id3v2frames.c: (parse_picture_frame):
Use new utility functions in libgsttag to process coverart (#512333).
2008-06-04 10:42:46 +00:00
Sebastian Dröge
ef66d037f1 ext/flac/gstflacdec.c: We actually support left/side, right/side and mid/side files. The conversion to normal, interl...
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_write):
We actually support left/side, right/side and mid/side files. The
conversion to normal, interleaved stereo is done by libflac.
2008-06-04 08:54:09 +00:00
Sebastian Dröge
906f398df7 ext/flac/: Set the channel layout when decoding FLAC files with more than 2 channels as defined by the FLAC spec. Fix...
Original commit message from CVS:
* ext/flac/Makefile.am:
* ext/flac/gstflacdec.c: (gst_flac_dec_write):
Set the channel layout when decoding FLAC files with more than 2
channels as defined by the FLAC spec. Fixes bug #534570.
Also don't try to decode left/side, right/side and mid/side files
as we don't support this at all.
2008-05-25 16:09:39 +00:00
John Millikin
2fced64b4f ext/flac/gstflacdec.c: Fix extraction of picture blocks with newer libflac versions again:
Original commit message from CVS:
Patch by: John Millikin <jmillikin at gmail dot com>
* ext/flac/gstflacdec.c: (gst_flac_dec_scan_for_last_block),
(gst_flac_extract_picture_buffer), (gst_flac_dec_metadata_callback):
Fix extraction of picture blocks with newer libflac versions again:
FLAC__METADATA_TYPE_PICTURE is an enum, not a define (#513628).
2008-02-02 19:47:50 +00:00
Tim-Philipp Müller
a745924f24 ext/flac/gstflacdec.c: where the picture metadata defines and structs don't exist yet.
Original commit message from CVS:
* ext/flac/gstflacdec.c:
Fix compilation against flac 1.1.2 (as on debian stable), where
the picture metadata defines and structs don't exist yet.
Fixes #509301.
2008-01-17 21:23:32 +00:00
Jan Schmidt
c2dddd0201 Generate the image-type values correctly. Leave them out of the caps when outputting a "preview image" tag, since it ...
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_extract_picture_buffer):
* gst/id3demux/id3v2frames.c: (parse_picture_frame):
Generate the image-type values correctly. Leave them out of the caps
when outputting a "preview image" tag, since it only makes sense
to have one of those - the type is irrelevant.
* sys/sunaudio/gstsunaudiomixerctrl.c:
(gst_sunaudiomixer_ctrl_open):
If we can, mark the mixer multiple open when we use it, in case
(for some reason) the process wants to open it again elsewhere.
2008-01-11 21:08:59 +00:00
John Millikin
e8833df814 ext/flac/gstflacdec.c: Emit metadata messages when a PICTURE block is encountered.
Original commit message from CVS:
Patch by: John Millikin <jmillikin at gmail dot com>
* ext/flac/gstflacdec.c: (gst_flac_dec_setup_seekable_decoder),
(gst_flac_dec_setup_stream_decoder),
(gst_flac_normalize_picture_mime_type),
(gst_flac_extract_picture_buffer),
(gst_flac_dec_metadata_callback):
Emit metadata messages when a PICTURE block is encountered.
Fixes #506715.
2008-01-03 12:26:03 +00:00
Sebastian Dröge
3761fb69e6 ext/flac/gstflacdec.c: Fix 'xyz may be used uninitialized' compiler warnings caused by broken g_assert_not_reached() ...
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_write):
Fix 'xyz may be used uninitialized' compiler warnings caused
by broken g_assert_not_reached() macro in GLib-2.15.x and don't
abort() in any case but properly report the error.
2007-12-29 16:48:33 +00:00
Wim Taymans
5cf1668a8f ext/flac/gstflacdec.*: Remove some unused vars.
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_reset_decoders),
(gst_flac_dec_update_metadata), (gst_flac_dec_metadata_callback),
(gst_flac_dec_write):
* ext/flac/gstflacdec.h:
Remove some unused vars.
Do more cleanup of leftover events and tags.
Output tags after the segment event. Fixes #504018.
2007-12-18 17:40:34 +00:00
Wim Taymans
981460c22b ext/flac/gstflacdec.*: Send segments from the streaming thread. Fixes #502187.
Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_metadata_callback),
(gst_flac_dec_write):
* ext/flac/gstflacdec.h:
Send segments from the streaming thread. Fixes #502187.
Fix segment seeking and a bunch of other seeking cases.
2007-12-14 18:49:34 +00:00
Tim-Philipp Müller
56ff7ee1ae ext/flac/gstflacenc.*: Save the flow return from the last gst_pad_push() and make sure we pass the right flow return ...
Original commit message from CVS:
* ext/flac/gstflacenc.c:
* ext/flac/gstflacenc.h:
Save the flow return from the last gst_pad_push() and
make sure we pass the right flow return value upstream
in the case of failure; minor clean-ups.
2007-09-26 13:19:17 +00:00
Stefan Kost
04bae8775a ext/flac/gstflacenc.c: Widen caps to match decoder a bit and add more FIXMEs.
Original commit message from CVS:
* ext/flac/gstflacenc.c:
Widen caps to match decoder a bit and add more FIXMEs.
2007-08-05 14:58:20 +00:00
Edward Hervey
8b1eeb5a6a Fix memory leaks.
Original commit message from CVS:
* ext/flac/gstflactag.c: (gst_flac_tag_init):
* gst/interleave/deinterleave.c: (deinterleave_init),
(deinterleave_sink_link):
* gst/interleave/interleave.c: (interleave_init):
* gst/median/gstmedian.c: (gst_median_init):
* gst/oldcore/gstmultifilesrc.c: (gst_multifilesrc_init):
Fix memory leaks.
* tests/check/elements/id3demux.c: (pad_added_cb):
Remove unused variable.
2007-06-22 10:12:15 +00:00