summaryrefslogtreecommitdiffstats
path: root/ext/flac/gstflacdec.c
Commit message (Collapse)AuthorAgeFilesLines
* flac: apparently on some platforms a FLAC__uint64!=guint64Stefan Kost2009-10-091-1/+1
|
* build: don't cast, but use the right format specified insteadStefan Kost2009-10-091-1/+1
| | | | This correct some of the previous macos fixes.
* flac: fix warnings on macosxJosep Torra2009-10-091-3/+4
|
* flacdec: send newsegment event when operating push-based and unframedTim-Philipp Müller2009-08-011-0/+7
| | | | | | | | | | For some reason flac doesn't call our metadata callback when we operate in push mode with unframed input, but that's where we set up the newsegment event (since that's where we'd get the duration from the stream info header), so we didn't send a newsegment event at all in this case. Hack around this by storing a generic newsegment event for now which will be used if we don't replace it with a better one that includes the duration.
* flacdec: small cleanupsTim-Philipp Müller2009-08-011-32/+18
| | | | | Remove some callback indirections which are no longer needed because there's only one decoder object type now. Also remove unused variable.
* flacdec: use gst_adapter_copy() to avoid unnecessary buffer mergesTim-Philipp Müller2009-08-011-1/+1
| | | | | | gst_adapter_peek() will merge buffers as needed, which we can avoid here since we're doing a memcpy anyway and then flush the copied data from the adapter right away.
* flacdec: repair some broken indentingTim-Philipp Müller2009-08-011-15/+2
|
* flacdec: Implement SEEKING querySebastian Dröge2009-07-231-3/+22
| | | | Fixes bug #589423.
* flacdec: fix intermittent FLAC__STREAM_DECODER_ABORTED errors when seekingTim-Philipp Müller2009-07-211-5/+31
| | | | | | | | | | | | | When seeking in a local flac file (ie. operating pull-based), the decoder would often just error out after the loop function sees a DECODER_ABORTED status. This, however, is the read callback's way of telling our loop function that pull_range failed and streaming should stop, in this case because of the flush-start event that the seek handler pushed upstream from the seeking thread. Handle this slightly better by storing the last flow return from pull_range, so the loop function can evaluate it properly when it encounters a DECODER_ABORTED and take the right action. Fixes #578612.
* flacdec: Don't send empty string tagsEdward Hervey2009-07-011-1/+2
|
* flacdec: fix buffer leakTim-Philipp Müller2009-05-131-0/+1
| | | | | gst_buffer_replace() will take its own ref, so we still have to unref the buffer if we don't need it any longer.
* flacdec: Actually output the pending buffer.. and not a blank one.Edward Hervey2009-05-081-3/+4
| | | | | | It was previously sending the bogus buffer which was returned from the bufferalloc (required for reverse negotiation apparently) instead of the pending buffer.
* flac: Make buffers created during seek act like normal buffers.Jan Schmidt2009-05-061-3/+14
| | | | | | | 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.
* flacdec: don't use pad_alloc when decoding while seeking. Fixes #579422Thomas Vander Stichele2009-05-061-8/+17
|
* add pending_samples so that we only update segment's last stop after really ↵Thomas Vander Stichele2009-04-041-1/+8
| | | | sending the samples
* add debuggingThomas Vander Stichele2009-04-041-0/+2
|
* clipping should also work if it's done on the first buffer starting at 0Thomas Vander Stichele2009-04-041-1/+1
|
* flac: require a 'newer' flac and remove support for the legacy flac APITim-Philipp Müller2009-03-271-251/+6
|
* Don't call FLAC__ methods before it's initialized. Fixes #516031Laszlo Pandy2009-03-121-4/+7
| | | | | | | | | | | | | 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.
* flacdec: don't lose the first buffer after a seekWim Taymans2009-03-091-27/+47
| | | | | | | 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.
* Add/clarify/fix some logging.Thomas Vander Stichele2009-03-021-3/+6
|
* respect DEFAULT segment by clipping the last buffer to be sentThomas Vander Stichele2009-02-211-0/+11
|
* flacdec: if we aborted reading, don't do into an infinite loop.Michael Smith2009-02-051-0/+7
| | | | | 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.
* debug on the objectThomas Vander Stichele2009-02-051-26/+35
|
* Update and add documentation for plugins with deps (ext).Stefan Kost2009-01-281-13/+7
| | | | 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.
* Fix typo and small flaw in flac decoderJan Schmidt2009-01-221-2/+3
|
* Whitespace fixes and some improved debug lines.Wim Taymans2009-01-211-37/+2
|
* Switch to using GstStaticPadTemplate.Edward Hervey2008-12-131-15/+27
| | | | | | | | | | | | | | | | | | | | | | 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.
* ext/flac/: Cast some size_t arguments to guint to avoid compiler warnings on ↵Jan Schmidt2008-10-101-1/+1
| | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Add FIXME for 0.11 to simply output everything with ↵Sebastian Dröge2008-08-071-0/+4
| | | | | | | | | | 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.
* ext/flac/: Port flactag to 0.10, add documentation for it and clean it up a bit.Jonathan Matthew2008-08-061-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Support decoding of all depths between 4 and 32 bits ↵Sebastian Dröge2008-08-031-12/+23
| | | | | | | | | | | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Always post the audio-codec tag, not only if other ↵Sebastian Dröge2008-08-021-9/+12
| | | | | | | | | | 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.
* Use new utility functions in libgsttag to process coverart (#512333).Tim-Philipp Müller2008-06-041-108/+9
| | | | | | | 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).
* ext/flac/gstflacdec.c: We actually support left/side, right/side and ↵Sebastian Dröge2008-06-041-7/+70
| | | | | | | | | 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.
* ext/flac/: Set the channel layout when decoding FLAC files with more than 2 ↵Sebastian Dröge2008-05-251-1/+56
| | | | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Fix extraction of picture blocks with newer libflac ↵John Millikin2008-02-021-15/+5
| | | | | | | | | | | 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).
* ext/flac/gstflacdec.c: where the picture metadata defines and structs don't ↵Tim-Philipp Müller2008-01-171-0/+13
| | | | | | | | | | 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.
* Generate the image-type values correctly. Leave them out of the caps when ↵Jan Schmidt2008-01-111-16/+15
| | | | | | | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Emit metadata messages when a PICTURE block is ↵John Millikin2008-01-031-0/+137
| | | | | | | | | | | | | | 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.
* ext/flac/gstflacdec.c: Fix 'xyz may be used uninitialized' compiler warnings ↵Sebastian Dröge2007-12-291-1/+3
| | | | | | | | | | 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.
* ext/flac/gstflacdec.*: Remove some unused vars.Wim Taymans2007-12-181-15/+26
| | | | | | | | | | | 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.
* ext/flac/gstflacdec.*: Send segments from the streaming thread. Fixes #502187.Wim Taymans2007-12-141-75/+136
| | | | | | | | | 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.
* Add support for flac >= 1.1.3 which changed the API. Fixes bug #385887.Josh Coalson2007-06-101-2/+188
| | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Josh Coalson <xflac at yahoo dot com>, updated by Alexis Ballier <aballier at gentoo dot org>: * configure.ac: * ext/flac/gstflacdec.c: (gst_flac_dec_reset_decoders), (gst_flac_dec_setup_seekable_decoder), (gst_flac_dec_setup_stream_decoder), (gst_flac_dec_seek), (gst_flac_dec_tell), (gst_flac_dec_length), (gst_flac_dec_eof), (gst_flac_dec_read_seekable), (gst_flac_dec_read_stream): * ext/flac/gstflacdec.h: * ext/flac/gstflacenc.c: (gst_flac_enc_init), (gst_flac_enc_finalize), (gst_flac_enc_set_metadata), (gst_flac_enc_sink_setcaps), (gst_flac_enc_update_quality), (gst_flac_enc_seek_callback), (gst_flac_enc_write_callback), (gst_flac_enc_tell_callback), (gst_flac_enc_sink_event), (gst_flac_enc_chain), (gst_flac_enc_set_property), (gst_flac_enc_get_property), (gst_flac_enc_change_state): * ext/flac/gstflacenc.h: Add support for flac >= 1.1.3 which changed the API. Fixes bug #385887.
* ext/flac/gstflacdec.c: Correctly post an error on the bus if something went ↵Sebastian Dröge2007-05-021-4/+9
| | | | | | | | | | wrong in the loop function. This fixes a ... Original commit message from CVS: * ext/flac/gstflacdec.c: (gst_flac_dec_loop): Correctly post an error on the bus if something went wrong in the loop function. This fixes a few cases where the task was paused and nothing happened anymore.
* Fix a bunch of problems discovered by the Forte compiler, mostly type mixups ↵Josep Torra Valles2006-10-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | and pointer arithmetics with void pointe... Original commit message from CVS: Patch by: Josep Torra Valles <josep at fluendo com> * ext/cairo/gsttimeoverlay.c: (gst_cairo_time_overlay_transform): * ext/esd/esdsink.c: (gst_esdsink_write): * ext/flac/gstflacdec.c: (gst_flac_dec_length), (gst_flac_dec_read_seekable), (gst_flac_dec_chain), (gst_flac_dec_send_newsegment): * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback), (gst_flac_enc_tell_callback): * ext/jpeg/smokecodec.c: (find_best_size), (smokecodec_encode), (smokecodec_parse_header), (smokecodec_decode): * gst/avi/gstavimux.c: (gst_avi_mux_write_avix_index): * gst/debug/efence.c: (gst_fenced_buffer_alloc): * gst/goom/Makefile.am: * gst/goom/gstgoom.c: * gst/icydemux/gsticydemux.c: (gst_icydemux_typefind_or_forward): * gst/rtsp/gstrtspsrc.c: * gst/rtsp/rtspconnection.c: (rtsp_connection_read): * gst/udp/gstudpsink.c: * gst/udp/gstudpsrc.c: * gst/wavparse/gstwavparse.c: (gst_wavparse_change_state): * sys/sunaudio/gstsunaudiomixertrack.h: Fix a bunch of problems discovered by the Forte compiler, mostly type mixups and pointer arithmetics with void pointers. Fixes #362603.
* ext/flac/gstflacdec.c: Use libgsttag helper function here too.Tim-Philipp Müller2006-08-241-15/+13
| | | | | | Original commit message from CVS: * ext/flac/gstflacdec.c: (gst_flac_dec_update_metadata): Use libgsttag helper function here too.
* ext/flac/gstflacdec.*: Make flac-in-ogg work (#352100).Tim-Philipp Müller2006-08-221-9/+60
| | | | | | | | | | Original commit message from CVS: * ext/flac/gstflacdec.c: (gst_flac_dec_scan_got_frame), (gst_flac_dec_write), (gst_flac_dec_loop), (gst_flac_dec_sink_event), (gst_flac_dec_chain), (gst_flac_dec_src_query): * ext/flac/gstflacdec.h: Make flac-in-ogg work (#352100).
* ext/flac/: Support chain-based operation, should make flac-over-DAAP work ↵Tim-Philipp Müller2006-06-201-65/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#340492). Original commit message from CVS: * ext/flac/Makefile.am: * ext/flac/gstflacdec.c: (gst_flac_dec_init), (gst_flac_dec_reset_decoders), (gst_flac_dec_setup_seekable_decoder), (gst_flac_dec_setup_stream_decoder), (gst_flac_dec_finalize), (gst_flac_dec_metadata_callback), (gst_flac_dec_metadata_callback_seekable), (gst_flac_dec_metadata_callback_stream), (gst_flac_dec_error_callback), (gst_flac_dec_error_callback_seekable), (gst_flac_dec_error_callback_stream), (gst_flac_dec_read_seekable), (gst_flac_dec_read_stream), (gst_flac_dec_write), (gst_flac_dec_write_seekable), (gst_flac_dec_write_stream), (gst_flac_dec_loop), (gst_flac_dec_sink_event), (gst_flac_dec_chain), (gst_flac_dec_convert_sink), (gst_flac_dec_get_sink_query_types), (gst_flac_dec_sink_query), (gst_flac_dec_get_src_query_types), (gst_flac_dec_src_query), (gst_flac_dec_handle_seek_event), (gst_flac_dec_sink_activate), (gst_flac_dec_sink_activate_push), (gst_flac_dec_sink_activate_pull), (gst_flac_dec_change_state): * ext/flac/gstflacdec.h: Support chain-based operation, should make flac-over-DAAP work (#340492).
* ext/flac/: Remove backwards compatibility cruft for dealing with FLAC API ↵Tim-Philipp Müller2006-05-231-11/+0
| | | | | | | | | | | | | changes in the 1.0.x series - we require 1.... Original commit message from CVS: * ext/flac/Makefile.am: * ext/flac/flac_compat.h: * ext/flac/gstflac.c: * ext/flac/gstflacdec.c: (gst_flac_dec_init): * ext/flac/gstflacenc.c: Remove backwards compatibility cruft for dealing with FLAC API changes in the 1.0.x series - we require 1.1.1 or newer these days.