From: <sl...@ke...> - 2007-06-09 15:33:53
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Sat Jun 09 2007 15:33:46 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), (gst_wavpack_dec_chain): * ext/wavpack/gstwavpackdec.h: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_reset), (gst_wavpack_parse_push_buffer): * ext/wavpack/gstwavpackparse.h: Improve discont handling by checking if the next Wavpack block has the expected, following block index. Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c gstwavpackdec.h gstwavpackparse.c gstwavpackparse.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2969&r2=1.2970 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.22&r2=1.23 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.h.diff?r1=1.8&r2=1.9 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.31&r2=1.32 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h.diff?r1=1.9&r2=1.10 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2969 retrieving revision 1.2970 diff -u -d -r1.2969 -r1.2970 --- ChangeLog 8 Jun 2007 20:20:55 -0000 1.2969 +++ ChangeLog 9 Jun 2007 15:33:31 -0000 1.2970 @@ -1,3 +1,14 @@ +2007-06-09 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), + (gst_wavpack_dec_chain): + * ext/wavpack/gstwavpackdec.h: + * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_reset), + (gst_wavpack_parse_push_buffer): + * ext/wavpack/gstwavpackparse.h: + Improve discont handling by checking if the next Wavpack block has + the expected, following block index. 2007-06-08 Thomas Vander Stichele <thomas at apestaart dot org> * gst/rtp/gstrtpmp4vpay.c (gst_rtp_mp4vpay_details): Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- gstwavpackdec.c 2 May 2007 18:31:15 -0000 1.22 +++ gstwavpackdec.c 9 Jun 2007 15:33:31 -0000 1.23 @@ -130,6 +130,7 @@ dec->depth = 0; gst_segment_init (&dec->segment, GST_FORMAT_UNDEFINED); + dec->next_block_index = 0; } static void @@ -362,9 +363,11 @@ /* If we got a DISCONT buffer forward the flag. Nothing else * has to be done as libwavpack doesn't store state between * Wavpack blocks */ - if (GST_BUFFER_IS_DISCONT (buf)) + if (GST_BUFFER_IS_DISCONT (buf) || dec->next_block_index != wph.block_index) GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); + dec->next_block_index = wph.block_index + wph.block_samples; /* decode */ decoded = WavpackUnpackSamples (dec->context, (int32_t *) GST_BUFFER_DATA (outbuf), wph.block_samples); Index: gstwavpackdec.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gstwavpackdec.h 30 Mar 2007 04:50:11 -0000 1.8 +++ gstwavpackdec.h 9 Jun 2007 15:33:32 -0000 1.9 @@ -57,6 +57,7 @@ read_id wv_id; GstSegment segment; /* used for clipping, TIME format */ + guint32 next_block_index; gint sample_rate; gint depth; Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- gstwavpackparse.c 2 May 2007 18:31:15 -0000 1.31 +++ gstwavpackparse.c 9 Jun 2007 15:33:32 -0000 1.32 @@ -218,6 +218,7 @@ parse->channels = 0; gst_segment_init (&parse->segment, GST_FORMAT_UNDEFINED); + parse->next_block_index = 0; parse->current_offset = 0; parse->need_newsegment = TRUE; @@ -890,11 +891,13 @@ GST_BUFFER_OFFSET (buf) = header->block_index; GST_BUFFER_OFFSET_END (buf) = header->block_index + header->block_samples; - if (wvparse->discont) { + if (wvparse->discont || wvparse->next_block_index != header->block_index) { GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); wvparse->discont = FALSE; } + wvparse->next_block_index = header->block_index + header->block_samples; gst_buffer_set_caps (buf, GST_PAD_CAPS (wvparse->srcpad)); GST_LOG_OBJECT (wvparse, "Pushing buffer with time %" GST_TIME_FORMAT, Index: gstwavpackparse.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h,v retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gstwavpackparse.h 2 May 2007 18:31:16 -0000 1.9 +++ gstwavpackparse.h 9 Jun 2007 15:33:32 -0000 1.10 @@ -67,6 +67,7 @@ GstSegment segment; /* the currently configured segment, in * samples/audio frames (DEFAULT format) */ GstAdapter *adapter; /* when operating chain-based, otherwise NULL */ |
From: <sl...@ke...> - 2007-06-09 15:42:14
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Sat Jun 09 2007 15:42:07 UTC Log message: * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_sink_set_caps): Remove workaround for bug #421543. This is fixed in core 0.10.13 and not necessary anymore as we need at least that core version. Modified files: . : ChangeLog ext/wavpack : gstwavpackenc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2970&r2=1.2971 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c.diff?r1=1.20&r2=1.21 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2970 retrieving revision 1.2971 diff -u -d -r1.2970 -r1.2971 --- ChangeLog 9 Jun 2007 15:33:31 -0000 1.2970 +++ ChangeLog 9 Jun 2007 15:41:52 -0000 1.2971 @@ -1,5 +1,11 @@ 2007-06-09 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_sink_set_caps): + Remove workaround for bug #421543. This is fixed in core 0.10.13 and + not necessary anymore as we need at least that core version. + +2007-06-09 Sebastian Dröge <sl...@ci...> * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), (gst_wavpack_dec_chain): * ext/wavpack/gstwavpackdec.h: Index: gstwavpackenc.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- gstwavpackenc.c 21 May 2007 11:37:16 -0000 1.20 +++ gstwavpackenc.c 9 Jun 2007 15:41:52 -0000 1.21 @@ -375,10 +375,7 @@ GstWavpackEnc *enc = GST_WAVPACK_ENC (gst_pad_get_parent (pad)); GstStructure *structure = gst_caps_get_structure (caps, 0); - /* FIXME: Workaround for bug #421543: calls gst_pad_accept_caps() */ - /* check caps and put relevant parts into our object attributes */ - if (!gst_pad_accept_caps (pad, caps) || - !gst_structure_get_int (structure, "channels", &enc->channels) || + if (!gst_structure_get_int (structure, "channels", &enc->channels) || !gst_structure_get_int (structure, "rate", &enc->samplerate) || !gst_structure_get_int (structure, "depth", &enc->depth)) { GST_ELEMENT_ERROR (enc, LIBRARY, INIT, (NULL), |
From: <sl...@ke...> - 2007-06-28 19:01:18
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Thu Jun 28 2007 19:00:57 UTC Log message: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_index_get_last_entry), (gst_wavpack_parse_index_get_entry_from_sample), (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset), (gst_wavpack_parse_scan_to_find_sample): * ext/wavpack/gstwavpackparse.h: Use a GSList for the GArray that is used like a list anyway. Modified files: . : ChangeLog ext/wavpack : gstwavpackparse.c gstwavpackparse.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3005&r2=1.3006 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.32&r2=1.33 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h.diff?r1=1.10&r2=1.11 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3005 retrieving revision 1.3006 diff -u -d -r1.3005 -r1.3006 --- ChangeLog 28 Jun 2007 13:25:05 -0000 1.3005 +++ ChangeLog 28 Jun 2007 19:00:43 -0000 1.3006 @@ -1,3 +1,13 @@ +2007-06-28 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackparse.c: + (gst_wavpack_parse_index_get_last_entry), + (gst_wavpack_parse_index_get_entry_from_sample), + (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset), + (gst_wavpack_parse_scan_to_find_sample): + * ext/wavpack/gstwavpackparse.h: + Use a GSList for the GArray that is used like a list anyway. 2007-06-28 Tim-Philipp Müller <tim at centricular dot net> * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_setcaps), Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- gstwavpackparse.c 9 Jun 2007 15:33:32 -0000 1.32 +++ gstwavpackparse.c 28 Jun 2007 19:00:43 -0000 1.33 @@ -141,13 +141,9 @@ static GstWavpackParseIndexEntry * gst_wavpack_parse_index_get_last_entry (GstWavpackParse * wvparse) { - gint last; - g_assert (wvparse->entries != NULL); - g_assert (wvparse->entries->len > 0); - last = wvparse->entries->len - 1; - return &g_array_index (wvparse->entries, GstWavpackParseIndexEntry, last); + return wvparse->entries->data; } @@ -155,14 +151,15 @@ gint64 sample_offset) gint i; + GSList *node; - if (wvparse->entries == NULL || wvparse->entries->len == 0) + if (wvparse->entries == NULL) return NULL; - for (i = wvparse->entries->len - 1; i >= 0; --i) { + for (node = wvparse->entries, i = 0; node; node = node->next, i++) { GstWavpackParseIndexEntry *entry; - entry = &g_array_index (wvparse->entries, GstWavpackParseIndexEntry, i); + entry = node->data; GST_LOG_OBJECT (wvparse, "Index entry %03u: sample %" G_GINT64_FORMAT " @" " byte %" G_GINT64_FORMAT, i, entry->sample_offset, entry->byte_offset); @@ -187,15 +184,12 @@ gst_wavpack_parse_index_append_entry (GstWavpackParse * wvparse, gint64 byte_offset, gint64 sample_offset, gint64 num_samples) - GstWavpackParseIndexEntry entry; + GstWavpackParseIndexEntry *entry; - if (wvparse->entries == NULL) { - wvparse->entries = g_array_new (FALSE, TRUE, - sizeof (GstWavpackParseIndexEntry)); - } else { - /* do we have this one already? */ - entry = *gst_wavpack_parse_index_get_last_entry (wvparse); - if (entry.byte_offset >= byte_offset) + /* do we have this one already? */ + if (wvparse->entries) { + entry = gst_wavpack_parse_index_get_last_entry (wvparse); + if (entry->byte_offset >= byte_offset) return; } @@ -204,10 +198,11 @@ GST_TIME_ARGS (gst_util_uint64_scale_int (sample_offset, GST_SECOND, wvparse->samplerate)), byte_offset); - entry.byte_offset = byte_offset; - entry.sample_offset = sample_offset; - entry.sample_offset_end = sample_offset + num_samples; - g_array_append_val (wvparse->entries, entry); + entry = g_new0 (GstWavpackParseIndexEntry, 1); + entry->byte_offset = byte_offset; + entry->sample_offset = sample_offset; + entry->sample_offset_end = sample_offset + num_samples; + wvparse->entries = g_slist_prepend (wvparse->entries, entry); static void @@ -226,7 +221,8 @@ parse->upstream_length = -1; if (parse->entries) { - g_array_free (parse->entries, TRUE); + g_slist_foreach (parse->entries, (GFunc) g_free, NULL); + g_slist_free (parse->entries); parse->entries = NULL; @@ -405,7 +401,7 @@ /* if we have an index, we can start scanning from the last known offset * in there, after all we know our wanted sample is not in the index */ - if (parse->entries && parse->entries->len > 0) { + if (parse->entries) { entry = gst_wavpack_parse_index_get_last_entry (parse); Index: gstwavpackparse.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gstwavpackparse.h 9 Jun 2007 15:33:32 -0000 1.10 +++ gstwavpackparse.h 28 Jun 2007 19:00:43 -0000 1.11 @@ -71,11 +71,11 @@ GstAdapter *adapter; /* when operating chain-based, otherwise NULL */ - /* Array of GstWavpackParseIndexEntry structs, mapping known + /* List of GstWavpackParseIndexEntry structs, mapping known * sample offsets to byte offsets. Is kept increasing without * gaps (ie. append only and consecutive entries must always * map to consecutive chunks in the file). */ - GArray *entries; + GSList *entries; /* Queued events (e.g. tag events we receive before we create the src pad) */ GList *queued_events; /* STREAM_LOCK */ |
From: <sl...@ke...> - 2007-07-16 09:16:26
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Mon Jul 16 2007 09:16:18 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_clip_outgoing_buffer): Fix buffer clipping to correctly clip to the segment stop. Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3015&r2=1.3016 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.24&r2=1.25 ====Begin Diffs==== Index: gstwavpackdec.c =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- gstwavpackdec.c 11 Jul 2007 22:31:06 -0000 1.24 +++ gstwavpackdec.c 16 Jul 2007 09:16:03 -0000 1.25 @@ -227,7 +227,7 @@ GST_BUFFER_SIZE (buf) -= diff; } - diff = cstop - stop; + diff = stop - cstop; if (diff > 0) { GST_BUFFER_DURATION (buf) -= diff; Index: ChangeLog RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3015 retrieving revision 1.3016 diff -u -d -r1.3015 -r1.3016 --- ChangeLog 13 Jul 2007 16:31:27 -0000 1.3015 +++ ChangeLog 16 Jul 2007 09:16:03 -0000 1.3016 @@ -1,3 +1,9 @@ +2007-07-16 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackdec.c: + (gst_wavpack_dec_clip_outgoing_buffer): + Fix buffer clipping to correctly clip to the segment stop. 2007-07-13 Jan Schmidt <th...@ma...> * configure.ac: |
From: <sl...@ke...> - 2007-07-24 05:08:23
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Tue Jul 24 2007 05:08:13 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): Don't unref the outgoing buffer twice when dropping it because it's outside of the segment. Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3026&r2=1.3027 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.26&r2=1.27 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3026 retrieving revision 1.3027 diff -u -d -r1.3026 -r1.3027 --- ChangeLog 24 Jul 2007 04:57:19 -0000 1.3026 +++ ChangeLog 24 Jul 2007 05:07:58 -0000 1.3027 @@ -1,5 +1,11 @@ 2007-07-24 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): + Don't unref the outgoing buffer twice when dropping it because it's + outside of the segment. + +2007-07-24 Sebastian Dröge <sl...@ci...> * configure.ac: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), (gst_wavpack_dec_chain), (gst_wavpack_dec_sink_event): Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- gstwavpackdec.c 24 Jul 2007 04:57:19 -0000 1.26 +++ gstwavpackdec.c 24 Jul 2007 05:07:59 -0000 1.27 @@ -339,8 +339,6 @@ GST_LOG_OBJECT (dec, "pushing buffer with time %" GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf))); ret = gst_pad_push (dec->srcpad, outbuf); - } else { - gst_buffer_unref (outbuf); } out: |
From: <sl...@ke...> - 2007-11-20 13:08:58
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Tue Nov 20 2007 13:08:59 UTC Log message: * ext/wavpack/gstwavpackcommon.c: (gst_wavpack_get_default_channel_mask), (gst_wavpack_set_channel_layout), (gst_wavpack_get_default_channel_positions), (gst_wavpack_get_channel_mask_from_positions), (gst_wavpack_set_channel_mapping): * ext/wavpack/gstwavpackcommon.h: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), (gst_wavpack_dec_sink_set_caps), (gst_wavpack_dec_chain): * ext/wavpack/gstwavpackdec.h: * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_reset), (gst_wavpack_enc_init), (gst_wavpack_enc_sink_set_caps), (gst_wavpack_enc_set_wp_config), (gst_wavpack_enc_push_block), (gst_wavpack_enc_fix_channel_order), (gst_wavpack_enc_chain), (gst_wavpack_enc_rewrite_first_block), (gst_wavpack_enc_sink_event): * ext/wavpack/gstwavpackenc.h: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset), (gst_wavpack_parse_scan_to_find_sample), (gst_wavpack_parse_sink_event), (gst_wavpack_parse_create_src_pad), (gst_wavpack_parse_push_buffer), (gst_wavpack_parse_loop): * ext/wavpack/gstwavpackparse.h: Add support for encoding, parsing and decoding multichannel files with up to 8 channels. This also improves the robustness of parsing quite a bit. * ext/wavpack/gstwavpackstreamreader.c: (gst_wavpack_stream_reader_read_bytes), (gst_wavpack_stream_reader_get_pos), (gst_wavpack_stream_reader_set_pos_abs), (gst_wavpack_stream_reader_set_pos_rel), (gst_wavpack_stream_reader_push_back_byte), (gst_wavpack_stream_reader_get_length), (gst_wavpack_stream_reader_can_seek), (gst_wavpack_stream_reader_write_bytes): Improve debugging. Modified files: . : ChangeLog ext/wavpack : gstwavpackcommon.c gstwavpackcommon.h gstwavpackdec.c gstwavpackdec.h gstwavpackenc.c gstwavpackenc.h gstwavpackparse.c gstwavpackparse.h gstwavpackstreamreader.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3181&r2=1.3182 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.c.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.h.diff?r1=1.4&r2=1.5 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.27&r2=1.28 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.h.diff?r1=1.9&r2=1.10 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c.diff?r1=1.21&r2=1.22 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.h.diff?r1=1.9&r2=1.10 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.33&r2=1.34 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h.diff?r1=1.11&r2=1.12 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackstreamreader.c.diff?r1=1.2&r2=1.3 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3181 retrieving revision 1.3182 diff -u -d -r1.3181 -r1.3182 --- ChangeLog 20 Nov 2007 12:20:37 -0000 1.3181 +++ ChangeLog 20 Nov 2007 13:08:43 -0000 1.3182 @@ -1,3 +1,43 @@ +2007-11-20 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackcommon.c: + (gst_wavpack_get_default_channel_mask), + (gst_wavpack_set_channel_layout), + (gst_wavpack_get_default_channel_positions), + (gst_wavpack_get_channel_mask_from_positions), + (gst_wavpack_set_channel_mapping): + * ext/wavpack/gstwavpackcommon.h: + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_reset), + (gst_wavpack_dec_sink_set_caps), (gst_wavpack_dec_chain): + * ext/wavpack/gstwavpackdec.h: + * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_reset), + (gst_wavpack_enc_init), (gst_wavpack_enc_sink_set_caps), + (gst_wavpack_enc_set_wp_config), (gst_wavpack_enc_push_block), + (gst_wavpack_enc_fix_channel_order), (gst_wavpack_enc_chain), + (gst_wavpack_enc_rewrite_first_block), + (gst_wavpack_enc_sink_event): + * ext/wavpack/gstwavpackenc.h: + * ext/wavpack/gstwavpackparse.c: + (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset), + (gst_wavpack_parse_scan_to_find_sample), + (gst_wavpack_parse_sink_event), (gst_wavpack_parse_create_src_pad), + (gst_wavpack_parse_push_buffer), (gst_wavpack_parse_loop): + * ext/wavpack/gstwavpackparse.h: + Add support for encoding, parsing and decoding multichannel + files with up to 8 channels. This also improves the robustness + of parsing quite a bit. + * ext/wavpack/gstwavpackstreamreader.c: + (gst_wavpack_stream_reader_read_bytes), + (gst_wavpack_stream_reader_get_pos), + (gst_wavpack_stream_reader_set_pos_abs), + (gst_wavpack_stream_reader_set_pos_rel), + (gst_wavpack_stream_reader_push_back_byte), + (gst_wavpack_stream_reader_get_length), + (gst_wavpack_stream_reader_can_seek), + (gst_wavpack_stream_reader_write_bytes): + Improve debugging. 2007-11-20 Stefan Kost <en...@us...> * ext/libpng/gstpngdec.c: Index: gstwavpackcommon.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gstwavpackcommon.c 7 Mar 2007 12:07:07 -0000 1.3 +++ gstwavpackcommon.c 20 Nov 2007 13:08:44 -0000 1.4 @@ -28,6 +28,9 @@ #include "gstwavpackcommon.h" #include <string.h> +#include <gst/gst.h> +#include <gst/audio/multichannel.h> GST_DEBUG_CATEGORY_EXTERN (wavpack_debug); #define GST_CAT_DEFAULT wavpack_debug @@ -96,3 +99,183 @@ return TRUE; } +gint +gst_wavpack_get_default_channel_mask (gint nchannels) +{ + gint channel_mask = 0; + /* Set the default channel mask for the given number of channels. + * It's the same as for WAVE_FORMAT_EXTENDED: + * http://www.microsoft.com/whdc/device/audio/multichaud.mspx + */ + switch (nchannels) { + case 11: + channel_mask |= 0x00400; + channel_mask |= 0x00200; + case 9: + channel_mask |= 0x00100; + case 8: + channel_mask |= 0x00080; + channel_mask |= 0x00040; + case 6: + channel_mask |= 0x00020; + channel_mask |= 0x00010; + case 4: + channel_mask |= 0x00008; + case 3: + channel_mask |= 0x00004; + case 2: + channel_mask |= 0x00002; + channel_mask |= 0x00001; + break; + case 1: + /* For mono use front center */ + } + return channel_mask; +} +static const struct + const guint32 ms_mask; + const GstAudioChannelPosition gst_pos; +} layout_mapping[] = { + { + 0x00001, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, { + 0x00002, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, { + 0x00004, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, { + 0x00008, GST_AUDIO_CHANNEL_POSITION_LFE}, { + 0x00010, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, { + 0x00020, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, { + 0x00040, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, { + 0x00080, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, { + 0x00100, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, { + 0x00200, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, { + 0x00400, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, { + 0x00800, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_CENTER */ + 0x01000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_LEFT */ + 0x02000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_CENTER */ + 0x04000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_RIGHT */ + 0x08000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_BACK_LEFT */ + 0x10000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_BACK_CENTER */ + 0x20000, GST_AUDIO_CHANNEL_POSITION_INVALID} /* TOP_BACK_RIGHT */ +}; +#define MAX_CHANNEL_POSITIONS G_N_ELEMENTS (layout_mapping) +gboolean +gst_wavpack_set_channel_layout (GstCaps * caps, gint layout) + GstAudioChannelPosition pos[MAX_CHANNEL_POSITIONS]; + GstStructure *s; + gint num_channels, i, p; + s = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_int (s, "channels", &num_channels)) + g_return_val_if_reached (FALSE); + if (num_channels == 1 && layout == 0x00004) { + pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO; + return TRUE; + p = 0; + for (i = 0; i < MAX_CHANNEL_POSITIONS; ++i) { + if ((layout & layout_mapping[i].ms_mask) != 0) { + if (p >= num_channels) { + GST_WARNING ("More bits set in the channel layout map than there " + "are channels! Broken file"); + return FALSE; + } + if (layout_mapping[i].gst_pos == GST_AUDIO_CHANNEL_POSITION_INVALID) { + GST_WARNING ("Unsupported channel position (mask 0x%08x) in channel " + "layout map - ignoring those channels", layout_mapping[i].ms_mask); + /* what to do? just ignore it and let downstream deal with a channel + * layout that has INVALID positions in it for now ... */ + pos[p] = layout_mapping[i].gst_pos; + ++p; + } + if (p != num_channels) { + GST_WARNING ("Only %d bits set in the channel layout map, but there are " + "supposed to be %d channels! Broken file", p, num_channels); + return FALSE; + gst_audio_set_channel_positions (s, pos); + return TRUE; +GstAudioChannelPosition * +gst_wavpack_get_default_channel_positions (gint nchannels) + GstAudioChannelPosition *pos = g_new (GstAudioChannelPosition, nchannels); + gint i; + if (nchannels == 1) { + pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER; + return pos; + for (i = 0; i < nchannels; i++) + pos[i] = layout_mapping[i].gst_pos; + return pos; +gst_wavpack_get_channel_mask_from_positions (GstAudioChannelPosition * pos, + gint nchannels) + gint i, j; + if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_MONO) { + channel_mask = 0x00000004; + return channel_mask; + /* FIXME: not exactly efficient but otherwise we need an inverse + * mapping table too */ + for (i = 0; i < nchannels; i++) { + for (j = 0; j < MAX_CHANNEL_POSITIONS; j++) { + if (pos[i] == layout_mapping[j].gst_pos) { + channel_mask |= layout_mapping[j].ms_mask; + break; +gst_wavpack_set_channel_mapping (GstAudioChannelPosition * pos, gint nchannels, + gint8 * channel_mapping) + gboolean ret = TRUE; + channel_mapping[i] = j; + ret &= (i == j); + return !ret; Index: gstwavpackcommon.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.h,v retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gstwavpackcommon.h 30 Mar 2007 04:50:11 -0000 1.4 +++ gstwavpackcommon.h 20 Nov 2007 13:08:45 -0000 1.5 @@ -24,6 +24,7 @@ #define __GST_WAVPACK_COMMON_H__ #include <gst/gst.h> #include <wavpack/wavpack.h> typedef struct @@ -65,5 +66,10 @@ gboolean gst_wavpack_read_header (WavpackHeader * header, guint8 * buf); gboolean gst_wavpack_read_metadata (GstWavpackMetadata * meta, guint8 * header_data, guint8 ** p_data); +gint gst_wavpack_get_default_channel_mask (gint nchannels); +gboolean gst_wavpack_set_channel_layout (GstCaps * caps, gint layout); +GstAudioChannelPosition *gst_wavpack_get_default_channel_positions (gint nchannels); +gint gst_wavpack_get_channel_mask_from_positions (GstAudioChannelPosition *pos, gint nchannels); +gboolean gst_wavpack_set_channel_mapping (GstAudioChannelPosition *pos, gint nchannels, gint8 *channel_mapping); #endif Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- gstwavpackdec.c 24 Jul 2007 05:07:59 -0000 1.27 +++ gstwavpackdec.c 20 Nov 2007 13:08:45 -0000 1.28 @@ -42,6 +42,7 @@ #include <gst/audio/audio.h> #include <math.h> @@ -62,7 +63,7 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-wavpack, " "width = (int) [ 1, 32 ], " - "channels = (int) [ 1, 2 ], " + "channels = (int) [ 1, 8 ], " "rate = (int) [ 6000, 192000 ], " "framed = (boolean) true") ); @@ -72,7 +73,7 @@ GST_STATIC_CAPS ("audio/x-raw-int, " "width = (int) 32, " "depth = (int) [ 1, 32 ], " "rate = (int) [ 6000, 192000 ], " "endianness = (int) BYTE_ORDER, " "signed = (boolean) true") @@ -126,6 +127,7 @@ dec->error_count = 0; dec->channels = 0; + dec->channel_mask = 0; dec->sample_rate = 0; dec->depth = 0; @@ -177,6 +179,7 @@ gst_structure_get_int (structure, "rate", &dec->sample_rate) && gst_structure_get_int (structure, "width", &dec->depth)) { GstCaps *caps; + GstAudioChannelPosition *pos; caps = gst_caps_new_simple ("audio/x-raw-int", "rate", G_TYPE_INT, dec->sample_rate, @@ -186,6 +189,22 @@ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE, NULL); + /* If we already have the channel layout set from upstream + * take this */ + if (gst_structure_has_field (structure, "channel-positions")) { + pos = gst_audio_get_channel_positions (structure); + if (pos != NULL && dec->channels > 2) { + GstStructure *new_str = gst_caps_get_structure (caps, 0); + gst_audio_set_channel_positions (new_str, pos); + dec->channel_mask = + gst_wavpack_get_channel_mask_from_positions (pos, dec->channels); + if (pos != NULL) + g_free (pos); GST_DEBUG_OBJECT (dec, "setting caps %" GST_PTR_FORMAT, caps); /* should always succeed */ @@ -248,7 +267,10 @@ if (!gst_wavpack_read_header (&wph, GST_BUFFER_DATA (buf))) goto invalid_header; - if (GST_BUFFER_SIZE (buf) != wph.ckSize + 4 * 1 + 4) + if (GST_BUFFER_SIZE (buf) < wph.ckSize + 4 * 1 + 4) + goto input_not_framed; + if (!(wph.flags & INITIAL_BLOCK)) goto input_not_framed; dec->wv_id.buffer = GST_BUFFER_DATA (buf); @@ -282,10 +304,12 @@ format_changed = (dec->sample_rate != WavpackGetSampleRate (dec->context)) || (dec->channels != WavpackGetNumChannels (dec->context)) || - (dec->depth != WavpackGetBitsPerSample (dec->context)); + (dec->depth != WavpackGetBitsPerSample (dec->context)) || + (dec->channel_mask != WavpackGetChannelMask (dec->context)); if (!GST_PAD_CAPS (dec->srcpad) || format_changed) { + gint channel_mask; dec->sample_rate = WavpackGetSampleRate (dec->context); dec->channels = WavpackGetNumChannels (dec->context); @@ -299,6 +323,18 @@ + channel_mask = WavpackGetChannelMask (dec->context); + if (channel_mask == 0) + channel_mask = gst_wavpack_get_default_channel_mask (dec->channels); + dec->channel_mask = channel_mask; + /* Only set the channel layout for more than two channels + * otherwise things break unfortunately */ + if (channel_mask != 0 && dec->channels > 2) + if (!gst_wavpack_set_channel_layout (caps, channel_mask)) + GST_WARNING_OBJECT (dec, "Failed to set channel layout"); @@ -367,7 +403,9 @@ decode_error: { GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL), - ("Failed to decode wavpack stream")); + ("Failed to decode wavpack stream: %s", + (dec->context) ? WavpackGetErrorMessage (dec-> + context) : "couldn't create decoder context")); gst_buffer_unref (outbuf); gst_buffer_unref (buf); return GST_FLOW_ERROR; Index: gstwavpackdec.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gstwavpackdec.h 9 Jun 2007 15:33:32 -0000 1.9 +++ gstwavpackdec.h 20 Nov 2007 13:08:45 -0000 1.10 @@ -62,6 +62,7 @@ gint sample_rate; gint depth; gint channels; + gint channel_mask; gint error_count; }; Index: gstwavpackenc.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gstwavpackenc.c 9 Jun 2007 15:41:52 -0000 1.21 +++ gstwavpackenc.c 20 Nov 2007 13:08:45 -0000 1.22 @@ -52,21 +52,7 @@ */ /* - * TODO: - add multichannel handling. channel_mask is: - * front left - * front right - * center - * LFE - * back left - * back right - * front left center - * front right center - * back center - * side left - * side right - * ... - * - add 32 bit float mode. CONFIG_FLOAT_DATA + * TODO: - add 32 bit float mode. CONFIG_FLOAT_DATA @@ -111,7 +97,7 @@ "depth = (int) [ 1, 32], " "endianness = (int) BYTE_ORDER, " "rate = (int) [ 6000, 192000 ]," "signed = (boolean) TRUE") @@ -320,6 +306,12 @@ enc->md5_context = NULL; } + if (enc->pending_buffer) { + gst_buffer_unref (enc->pending_buffer); + enc->pending_buffer = NULL; + enc->pending_offset = 0; /* reset the last returns to GST_FLOW_OK. This is only set to something else * while WavpackPackSamples() or more specific gst_wavpack_enc_push_block() * so not valid anymore */ @@ -329,6 +321,8 @@ enc->samplerate = 0; enc->depth = 0; enc->channels = 0; + enc->channel_mask = 0; + enc->need_channel_remap = FALSE; static void @@ -356,8 +350,10 @@ enc->wv_id.correction = FALSE; enc->wv_id.wavpack_enc = enc; + enc->wv_id.passthrough = FALSE; enc->wvc_id.correction = TRUE; enc->wvc_id.wavpack_enc = enc; + enc->wvc_id.passthrough = FALSE; /* set default values of params */ enc->mode = GST_WAVPACK_ENC_MODE_DEFAULT; @@ -374,6 +370,7 @@ { GstWavpackEnc *enc = GST_WAVPACK_ENC (gst_pad_get_parent (pad)); GstStructure *structure = gst_caps_get_structure (caps, 0); + GstAudioChannelPosition *pos; if (!gst_structure_get_int (structure, "channels", &enc->channels) || !gst_structure_get_int (structure, "rate", &enc->samplerate) || @@ -384,12 +381,37 @@ return FALSE; + pos = gst_audio_get_channel_positions (structure); + /* If one channel is NONE they'll be all undefined */ + if (pos != NULL && pos[0] == GST_AUDIO_CHANNEL_POSITION_NONE) { + g_free (pos); + pos = NULL; + if (pos == NULL) { + GST_ELEMENT_ERROR (enc, STREAM, FORMAT, (NULL), + ("input has no valid channel layout")); + gst_object_unref (enc); + enc->channel_mask = + gst_wavpack_get_channel_mask_from_positions (pos, enc->channels); + enc->need_channel_remap = + gst_wavpack_set_channel_mapping (pos, enc->channels, + enc->channel_mapping); + g_free (pos); /* set fixed src pad caps now that we know what we will get */ caps = gst_caps_new_simple ("audio/x-wavpack", "channels", G_TYPE_INT, enc->channels, "rate", G_TYPE_INT, enc->samplerate, "width", G_TYPE_INT, enc->depth, "framed", G_TYPE_BOOLEAN, TRUE, NULL); + if (!gst_wavpack_set_channel_layout (caps, enc->channel_mask)) + GST_WARNING_OBJECT (enc, "setting channel layout failed"); if (!gst_pad_set_caps (enc->srcpad, caps)) { GST_ELEMENT_ERROR (enc, LIBRARY, INIT, (NULL), ("setting caps failed: %" GST_PTR_FORMAT, caps)); @@ -412,13 +434,7 @@ enc->wp_config->bytes_per_sample = GST_ROUND_UP_8 (enc->depth) / 8; enc->wp_config->bits_per_sample = enc->depth; enc->wp_config->num_channels = enc->channels; - - /* TODO: handle more than 2 channels correctly! */ - if (enc->channels == 1) { - enc->wp_config->channel_mask = 0x4; - } else if (enc->channels == 2) { - enc->wp_config->channel_mask = 0x2 | 0x1; - } + enc->wp_config->channel_mask = enc->channel_mask; enc->wp_config->sample_rate = enc->samplerate; /* @@ -556,17 +572,43 @@ gst_wavpack_read_header (&wph, block); - /* if it's the first wavpack block, send a NEW_SEGMENT event */ - if (wph.block_index == 0) { - gst_pad_push_event (pad, - gst_event_new_new_segment (FALSE, - 1.0, GST_FORMAT_TIME, 0, GST_BUFFER_OFFSET_NONE, 0)); + /* Only set when pushing the first buffer again, in that case + * we don't want to delay the buffer or push newsegment events + */ + if (!wid->passthrough) { + /* Only push complete blocks */ + if (enc->pending_buffer == NULL) { + enc->pending_buffer = buffer; + enc->pending_offset = wph.block_index; + } else if (enc->pending_offset == wph.block_index) { + enc->pending_buffer = gst_buffer_join (enc->pending_buffer, buffer); + } else { + GST_ERROR ("Got incomplete block, dropping"); + gst_buffer_unref (enc->pending_buffer); - /* save header for later reference, so we can re-send it later on - * EOS with fixed up values for total sample count etc. */ - if (enc->first_block == NULL && !wid->correction) { - enc->first_block = g_memdup (block, count); - enc->first_block_size = count; + if (!(wph.flags & FINAL_BLOCK)) + return TRUE; + buffer = enc->pending_buffer; + enc->pending_buffer = NULL; + enc->pending_offset = 0; + /* if it's the first wavpack block, send a NEW_SEGMENT event */ + if (wph.block_index == 0) { + gst_pad_push_event (pad, + gst_event_new_new_segment (FALSE, + 1.0, GST_FORMAT_TIME, 0, GST_BUFFER_OFFSET_NONE, 0)); + /* save header for later reference, so we can re-send it later on + * EOS with fixed up values for total sample count etc. */ + if (enc->first_block == NULL && !wid->correction) { + enc->first_block = + g_memdup (GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer)); + enc->first_block_size = GST_BUFFER_SIZE (buffer); + } } } @@ -589,6 +631,8 @@ /* push the buffer and forward errors */ + GST_DEBUG_OBJECT (enc, "pushing buffer with %d bytes", + GST_BUFFER_SIZE (buffer)); *flow = gst_pad_push (pad, buffer); if (*flow != GST_FLOW_OK) { @@ -600,6 +644,24 @@ +static void +gst_wavpack_enc_fix_channel_order (GstWavpackEnc * enc, gint32 * data, + gint nsamples) + gint32 tmp[8]; + for (i = 0; i < nsamples / enc->channels; i++) { + for (j = 0; j < enc->channels; j++) { + tmp[enc->channel_mapping[j]] = data[j]; + data[j] = tmp[j]; + data += enc->channels; static GstFlowReturn gst_wavpack_enc_chain (GstPad * pad, GstBuffer * buf) @@ -646,6 +708,12 @@ GST_DEBUG ("setup of encoding context successfull"); + if (enc->need_channel_remap) { + buf = gst_buffer_make_writable (buf); + gst_wavpack_enc_fix_channel_order (enc, (gint32 *) GST_BUFFER_DATA (buf), + sample_count); /* if we want to append the MD5 sum to the stream update it here * with the current raw samples */ if (enc->md5) { @@ -700,8 +768,10 @@ if (ret) { /* try to rewrite the first block */ GST_DEBUG_OBJECT (enc, "rewriting first block ..."); + enc->wv_id.passthrough = TRUE; ret = gst_wavpack_enc_push_block (&enc->wv_id, enc->first_block, enc->first_block_size); + enc->wv_id.passthrough = FALSE; } else { GST_WARNING_OBJECT (enc, "rewriting of first block failed. " "Seeking to first block failed!"); @@ -721,6 +791,14 @@ /* Encode all remaining samples and flush them to the src pads */ WavpackFlushSamples (enc->wp_context); + /* Drop all remaining data, this is no complete block otherwise + * it would've been pushed already */ + if (enc->pending_buffer) { + gst_object_unref (enc->pending_buffer); + enc->pending_buffer = NULL; + enc->pending_offset = 0; /* write the MD5 sum if we have to write one */ if ((enc->md5) && (enc->md5_context)) { guchar md5_digest[16]; Index: gstwavpackenc.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.h,v --- gstwavpackenc.h 21 May 2007 11:17:21 -0000 1.9 +++ gstwavpackenc.h 20 Nov 2007 13:08:45 -0000 1.10 @@ -45,6 +45,7 @@ gboolean correction; GstWavpackEnc *wavpack_enc; + gboolean passthrough; } GstWavpackEncWriteID; @@ -64,6 +65,9 @@ gint samplerate; + gint8 channel_mapping[8]; + gboolean need_channel_remap; GstWavpackEncWriteID wv_id; @@ -80,6 +84,9 @@ void *first_block; int32_t first_block_size; + GstBuffer *pending_buffer; + gint32 pending_offset; struct _GstWavpackEncClass Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- gstwavpackparse.c 28 Jun 2007 19:00:43 -0000 1.33 +++ gstwavpackparse.c 20 Nov 2007 13:08:45 -0000 1.34 @@ -70,7 +70,7 @@ GST_PAD_SOMETIMES, @@ -189,7 +189,8 @@ /* do we have this one already? */ if (wvparse->entries) { entry = gst_wavpack_parse_index_get_last_entry (wvparse); - if (entry->byte_offset >= byte_offset) + if (entry->byte_offset >= byte_offset + || entry->sample_offset >= sample_offset) return; @@ -245,6 +246,11 @@ g_list_foreach (parse->queued_events, (GFunc) gst_mini_object_unref, NULL); g_list_free (parse->queued_events); parse->queued_events = NULL; + if (parse->pending_buffer) + gst_buffer_unref (parse->pending_buffer); + parse->pending_buffer = NULL; static const GstQueryType * @@ -422,8 +428,11 @@ gst_wavpack_read_header (&header, GST_BUFFER_DATA (buf)); - gst_wavpack_parse_index_append_entry (parse, off, header.block_index, - header.block_samples); + if (header.flags & INITIAL_BLOCK) + gst_wavpack_parse_index_append_entry (parse, off, header.block_index, + header.block_samples); + else + continue; if (header.block_index <= sample && sample < (header.block_index + header.block_samples)) { @@ -631,6 +640,11 @@ if (parse->adapter) { gst_adapter_clear (parse->adapter); + if (parse->pending_buffer) { + gst_buffer_unref (parse->pending_buffer); + parse->pending_buffer = NULL; + parse->pending_offset = 0; ret = gst_pad_push_event (parse->srcpad, event); break; @@ -646,6 +660,11 @@ * be a complete Wavpack block and we can't do anything with them */ @@ -794,6 +813,7 @@ WavpackContext *wpc; gchar error_msg[80]; read_id rid; + gint channel_mask; rid.buffer = GST_BUFFER_DATA (buf); rid.length = GST_BUFFER_SIZE (buf); @@ -816,6 +836,23 @@ "channels", G_TYPE_INT, wvparse->channels, "rate", G_TYPE_INT, wvparse->samplerate, "framed", G_TYPE_BOOLEAN, TRUE, NULL); + channel_mask = WavpackGetChannelMask (wpc); + if (channel_mask == 0) + channel_mask = + gst_wavpack_get_default_channel_mask (wvparse->channels); + if (channel_mask != 0) { + if (!gst_wavpack_set_channel_layout (caps, channel_mask)) { + GST_WARNING_OBJECT (wvparse, "Failed to set channel layout"); + gst_caps_unref (caps); + caps = NULL; + WavpackCloseFile (wpc); + g_free (stream_reader); + break; + } wvparse->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (wvparse), "src"), "src"); @@ -880,6 +917,24 @@ wvparse->queued_events = NULL; + if (wvparse->pending_buffer == NULL) { + wvparse->pending_buffer = buf; + wvparse->pending_offset = header->block_index; + } else if (wvparse->pending_offset == header->block_index) { + wvparse->pending_buffer = gst_buffer_join (wvparse->pending_buffer, buf); + } else { + GST_ERROR ("Got incomplete block, dropping"); + gst_buffer_unref (wvparse->pending_buffer); + if (!(header->flags & FINAL_BLOCK)) + return GST_FLOW_OK; + buf = wvparse->pending_buffer; + wvparse->pending_buffer = NULL; GST_BUFFER_TIMESTAMP (buf) = gst_util_uint64_scale_int (header->block_index, GST_SECOND, wvparse->samplerate); GST_BUFFER_DURATION (buf) = gst_util_uint64_scale_int (header->block_samples, @@ -1014,9 +1069,9 @@ goto pause; - gst_wavpack_parse_index_append_entry (parse, parse->current_offset, - header.block_index, header.block_samples); + if (header.flags & INITIAL_BLOCK) + gst_wavpack_parse_index_append_entry (parse, parse->current_offset, + header.block_index, header.block_samples); flow_ret = gst_wavpack_parse_push_buffer (parse, buf, &header); if (flow_ret != GST_FLOW_OK) Index: gstwavpackparse.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gstwavpackparse.h 28 Jun 2007 19:00:43 -0000 1.11 +++ gstwavpackparse.h 20 Nov 2007 13:08:45 -0000 1.12 @@ -67,6 +67,9 @@ GstSegment segment; /* the currently configured segment, in * samples/audio frames (DEFAULT format) */ guint32 next_block_index; GstAdapter *adapter; /* when operating chain-based, otherwise NULL */ Index: gstwavpackstreamreader.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackstreamreader.c,v retrieving revision 1.2 diff -u -d -r1.2 -r1.3 --- gstwavpackstreamreader.c 7 Mar 2007 12:07:07 -0000 1.2 +++ gstwavpackstreamreader.c 20 Nov 2007 13:08:45 -0000 1.3 @@ -35,11 +35,15 @@ uint32_t left = rid->length - rid->position; uint32_t to_read = MIN (left, bcount); + GST_DEBUG ("Trying to read %d of %d bytes from position %d", bcount, + rid->length, rid->position); if (to_read > 0) { g_memmove (data, rid->buffer + rid->position, to_read); rid->position += to_read; return to_read; + GST_WARNING ("Couldn't read %d bytes"); return 0; @@ -47,20 +51,23 @@ static uint32_t gst_wavpack_stream_reader_get_pos (void *id) + GST_DEBUG ("Returning position %d", ((read_id *) id)->position); return ((read_id *) id)->position; static int gst_wavpack_stream_reader_set_pos_abs (void *id, uint32_t pos) - GST_DEBUG ("should not be called"); + GST_WARNING ("Should not be called: tried to set absolute position to %d", + pos); return -1; gst_wavpack_stream_reader_set_pos_rel (void *id, int32_t delta, int mode) + GST_WARNING ("Should not be called: tried to set relative position to %d" + " with mode %d", delta, mode); @@ -69,6 +76,8 @@ read_id *rid = (read_id *) id; + GST_DEBUG ("Pushing back one byte: 0x%x", c); rid->position -= 1; if (rid->position < 0) rid->position = 0; @@ -78,19 +87,22 @@ gst_wavpack_stream_reader_get_length (void *id) + GST_DEBUG ("Returning length %d", ((read_id *) id)->length); return ((read_id *) id)->length; gst_wavpack_stream_reader_can_seek (void *id) + GST_DEBUG ("Can't seek"); return FALSE; static int32_t gst_wavpack_stream_reader_write_bytes (void *id, void *data, int32_t bcount) + GST_WARNING ("Should not be called, tried to write %d bytes", bcount); return 0; |
From: <sl...@ke...> - 2007-11-20 13:14:52
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Tue Nov 20 2007 13:14:54 UTC Log message: * ext/wavpack/gstwavpackcommon.c: (gst_wavpack_set_channel_layout): Also set the channel layout on the Wavpack caps if we're having a mono layout. Of course only do it for "audio/x-wavpack". Modified files: . : ChangeLog ext/wavpack : gstwavpackcommon.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3182&r2=1.3183 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.c.diff?r1=1.4&r2=1.5 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3182 retrieving revision 1.3183 diff -u -d -r1.3182 -r1.3183 --- ChangeLog 20 Nov 2007 13:08:43 -0000 1.3182 +++ ChangeLog 20 Nov 2007 13:14:38 -0000 1.3183 @@ -1,5 +1,11 @@ 2007-11-20 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackcommon.c: (gst_wavpack_set_channel_layout): + Also set the channel layout on the Wavpack caps if we're having + a mono layout. Of course only do it for "audio/x-wavpack". + +2007-11-20 Sebastian Dröge <sl...@ci...> * ext/wavpack/gstwavpackcommon.c: (gst_wavpack_get_default_channel_mask), (gst_wavpack_set_channel_layout), Index: gstwavpackcommon.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackcommon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gstwavpackcommon.c 20 Nov 2007 13:08:44 -0000 1.4 +++ gstwavpackcommon.c 20 Nov 2007 13:14:40 -0000 1.5 @@ -185,6 +185,7 @@ if (num_channels == 1 && layout == 0x00004) { pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO; + gst_audio_set_channel_positions (s, pos); return TRUE; } |
From: <sl...@ke...> - 2007-12-09 16:21:11
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Sun Dec 09 2007 16:21:16 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_create_src_pad): Workaround the non-existance of WavpackGetChannelMask in Wavpack versions below 4.40.0. Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c gstwavpackparse.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3207&r2=1.3208 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.28&r2=1.29 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.34&r2=1.35 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3207 retrieving revision 1.3208 diff -u -d -r1.3207 -r1.3208 --- ChangeLog 9 Dec 2007 05:13:57 -0000 1.3207 +++ ChangeLog 9 Dec 2007 16:21:00 -0000 1.3208 @@ -1,5 +1,13 @@ 2007-12-09 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): + * ext/wavpack/gstwavpackparse.c: + (gst_wavpack_parse_create_src_pad): + Workaround the non-existance of WavpackGetChannelMask in Wavpack + versions below 4.40.0. + +2007-12-09 Sebastian Dröge <sl...@ci...> * configure.ac: And now do it right for real... Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- gstwavpackdec.c 20 Nov 2007 13:08:45 -0000 1.28 +++ gstwavpackdec.c 9 Dec 2007 16:21:02 -0000 1.29 @@ -305,7 +305,11 @@ (dec->sample_rate != WavpackGetSampleRate (dec->context)) || (dec->channels != WavpackGetNumChannels (dec->context)) || (dec->depth != WavpackGetBitsPerSample (dec->context)) || +#ifdef WAVPACK_OLD_API + (dec->channel_mask != dec->context->config.channel_mask); +#else (dec->channel_mask != WavpackGetChannelMask (dec->context)); +#endif if (!GST_PAD_CAPS (dec->srcpad) || format_changed) { GstCaps *caps; @@ -323,7 +327,11 @@ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE, NULL); + channel_mask = dec->context->config.channel_mask; channel_mask = WavpackGetChannelMask (dec->context); if (channel_mask == 0) channel_mask = gst_wavpack_get_default_channel_mask (dec->channels); Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gstwavpackparse.c 20 Nov 2007 13:08:45 -0000 1.34 +++ gstwavpackparse.c 9 Dec 2007 16:21:02 -0000 1.35 @@ -836,8 +836,11 @@ "channels", G_TYPE_INT, wvparse->channels, "rate", G_TYPE_INT, wvparse->samplerate, "framed", G_TYPE_BOOLEAN, TRUE, NULL); - + channel_mask = wpc->config.channel_mask; channel_mask = WavpackGetChannelMask (wpc); if (channel_mask == 0) channel_mask = gst_wavpack_get_default_channel_mask (wvparse->channels); |
From: <sl...@ke...> - 2007-12-09 16:49:23
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Sun Dec 09 2007 16:49:23 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): Also print a useful error message with the old Wavpack API if possible. Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3209&r2=1.3210 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.30&r2=1.31 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3209 retrieving revision 1.3210 diff -u -d -r1.3209 -r1.3210 --- ChangeLog 9 Dec 2007 16:34:06 -0000 1.3209 +++ ChangeLog 9 Dec 2007 16:49:07 -0000 1.3210 @@ -1,3 +1,9 @@ +2007-12-09 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): + Also print a useful error message with the old Wavpack API + if possible. 2007-12-09 Tim-Philipp Müller <tim at centricular dot net> * ext/wavpack/gstwavpackdec.c: Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- gstwavpackdec.c 9 Dec 2007 16:34:08 -0000 1.30 +++ gstwavpackdec.c 9 Dec 2007 16:49:09 -0000 1.31 @@ -417,7 +417,9 @@ const gchar *reason = "unknown"; if (dec->context) { -#ifndef WAVPACK_OLD_API +#ifdef WAVPACK_OLD_API + reason = dec->context->error_message; +#else reason = WavpackGetErrorMessage (dec->context); #endif } else { |
From: <sl...@ke...> - 2008-02-22 06:06:14
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Fri Feb 22 2008 06:06:20 UTC Log message: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_src_query), (gst_wavpack_parse_create_src_pad): * ext/wavpack/gstwavpackparse.h: Always report the duration if we know it in push mode and don't return 0 just to make totem believe we can't seek in push mode. Newer totem version use the SEEKING query which properly reports if we can seek or not. Modified files: . : ChangeLog ext/wavpack : gstwavpackparse.c gstwavpackparse.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3320&r2=1.3321 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.35&r2=1.36 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h.diff?r1=1.12&r2=1.13 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3320 retrieving revision 1.3321 diff -u -d -r1.3320 -r1.3321 --- ChangeLog 22 Feb 2008 05:39:00 -0000 1.3320 +++ ChangeLog 22 Feb 2008 06:06:04 -0000 1.3321 @@ -1,5 +1,15 @@ 2008-02-22 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_src_query), + (gst_wavpack_parse_create_src_pad): + * ext/wavpack/gstwavpackparse.h: + Always report the duration if we know it in push mode and don't + return 0 just to make totem believe we can't seek in push mode. + Newer totem version use the SEEKING query which properly reports + if we can seek or not. + +2008-02-22 Sebastian Dröge <sl...@ci...> Patch by: Jens Granseuer <jensgr at gmx dot net> * tests/examples/equalizer/demo.c: (main): Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gstwavpackparse.c 9 Dec 2007 16:21:02 -0000 1.35 +++ gstwavpackparse.c 22 Feb 2008 06:06:06 -0000 1.36 @@ -275,16 +275,15 @@ switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION:{ - gint64 cur, len; + gint64 cur; guint rate; GST_OBJECT_LOCK (parse); cur = parse->segment.last_stop; - len = parse->total_samples; rate = parse->samplerate; GST_OBJECT_UNLOCK (parse); - if (len < 0 || rate == 0) { + if (rate == 0) { GST_DEBUG_OBJECT (parse, "haven't read header yet"); break; } @@ -315,12 +314,10 @@ - /* FIXME: return 0 if we work in push based mode to let totem - * recognize that we can't seek */ - len = (parse->adapter) ? 0 : parse->total_samples; + len = parse->total_samples; @@ -329,7 +326,8 @@ switch (format) { case GST_FORMAT_TIME: - len = gst_util_uint64_scale_int (len, GST_SECOND, rate); + if (len != -1) + len = gst_util_uint64_scale_int (len, GST_SECOND, rate); gst_query_set_duration (query, GST_FORMAT_TIME, len); ret = TRUE; break; @@ -827,9 +825,8 @@ wvparse->samplerate = WavpackGetSampleRate (wpc); wvparse->channels = WavpackGetNumChannels (wpc); - wvparse->total_samples = header->total_samples; - if (wvparse->total_samples == (int32_t) - 1) - wvparse->total_samples = 0; + wvparse->total_samples = (header->total_samples == (int32_t) - 1) ? + -1 : header->total_samples; caps = gst_caps_new_simple ("audio/x-wavpack", "width", G_TYPE_INT, WavpackGetBitsPerSample (wpc), Index: gstwavpackparse.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gstwavpackparse.h 20 Nov 2007 13:08:45 -0000 1.12 +++ gstwavpackparse.h 22 Feb 2008 06:06:06 -0000 1.13 @@ -57,7 +57,7 @@ guint samplerate; guint channels; - guint total_samples; + gint64 total_samples; gboolean need_newsegment; gboolean discont; |
From: <sl...@ke...> - 2008-04-03 18:28:36
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Thu Apr 03 2008 18:28:42 UTC Log message: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init): * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_base_init): * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_index_entry_new), (gst_wavpack_parse_index_entry_free), (gst_wavpack_parse_base_init), (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset): Use GSlice for allocating index entries and use gst_element_class_set_details_simple(). Modified files: . : ChangeLog ext/wavpack : gstwavpackdec.c gstwavpackenc.c gstwavpackparse.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3375&r2=1.3376 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c.diff?r1=1.31&r2=1.32 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c.diff?r1=1.22&r2=1.23 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.36&r2=1.37 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3375 retrieving revision 1.3376 diff -u -d -r1.3375 -r1.3376 --- ChangeLog 2 Apr 2008 22:37:26 -0000 1.3375 +++ ChangeLog 3 Apr 2008 18:28:26 -0000 1.3376 @@ -1,3 +1,15 @@ +2008-04-03 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init): + * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_base_init): + * ext/wavpack/gstwavpackparse.c: + (gst_wavpack_parse_index_entry_new), + (gst_wavpack_parse_index_entry_free), + (gst_wavpack_parse_base_init), + (gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset): + Use GSlice for allocating index entries and use + gst_element_class_set_details_simple(). 2008-04-02 Tim-Philipp Müller <tim at centricular dot net> Patch by: Brian Cameron <brian.cameron at sun dot com> Index: gstwavpackdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackdec.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- gstwavpackdec.c 9 Dec 2007 16:49:09 -0000 1.31 +++ gstwavpackdec.c 3 Apr 2008 18:28:28 -0000 1.32 @@ -96,19 +96,17 @@ static void gst_wavpack_dec_base_init (gpointer klass) { - static const GstElementDetails plugin_details = - GST_ELEMENT_DETAILS ("Wavpack audio decoder", - "Codec/Decoder/Audio", - "Decodes Wavpack audio data", - "Arwed v. Merkatz <v.m...@gm...>, " - "Sebastian Dröge <sl...@ci...>"); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_factory)); gst_static_pad_template_get (&sink_factory)); - gst_element_class_set_details (element_class, &plugin_details); + gst_element_class_set_details_simple (element_class, "Wavpack audio decoder", + "Codec/Decoder/Audio", + "Decodes Wavpack audio data", + "Arwed v. Merkatz <v.m...@gm...>, " + "Sebastian Dröge <sl...@ci...>"); } Index: gstwavpackenc.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- gstwavpackenc.c 20 Nov 2007 13:08:45 -0000 1.22 +++ gstwavpackenc.c 3 Apr 2008 18:28:28 -0000 1.23 @@ -210,12 +210,6 @@ gst_wavpack_enc_base_init (gpointer klass) - static const GstElementDetails element_details = { - "Wavpack audio encoder", - "Codec/Encoder/Audio", - "Encodes audio with the Wavpack lossless/lossy audio codec", - "Sebastian Dröge <sl...@ci...>" - }; /* add pad templates */ @@ -227,7 +221,10 @@ gst_static_pad_template_get (&wvcsrc_factory)); /* set element details */ - gst_element_class_set_details (element_class, &element_details); + gst_element_class_set_details_simple (element_class, "Wavpack audio encoder", + "Codec/Encoder/Audio", + "Encodes audio with the Wavpack lossless/lossy audio codec", Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- gstwavpackparse.c 22 Feb 2008 06:06:06 -0000 1.36 +++ gstwavpackparse.c 3 Apr 2008 18:28:28 -0000 1.37 @@ -57,6 +57,33 @@ GST_DEBUG_CATEGORY_STATIC (gst_wavpack_parse_debug); #define GST_CAT_DEFAULT gst_wavpack_parse_debug +/* FIXME: unconditionally use GSlice after we depend on GLib >= 2.10 */ +#if GLIB_CHECK_VERSION (2, 10, 0) +static inline GstWavpackParseIndexEntry * +gst_wavpack_parse_index_entry_new () +{ + return g_slice_new (GstWavpackParseIndexEntry); +} +static inline void +gst_wavpack_parse_index_entry_free (GstWavpackParseIndexEntry * entry) + g_slice_free (GstWavpackParseIndexEntry, entry); +#else + return g_new (GstWavpackParseIndexEntry, 1); + g_free (entry); +#endif static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -99,12 +126,6 @@ gst_wavpack_parse_base_init (gpointer klass) - GST_ELEMENT_DETAILS ("Wavpack parser", - "Codec/Demuxer/Audio", - "Parses Wavpack files", @@ -113,7 +134,12 @@ gst_static_pad_template_get (&wvc_src_factory)); + gst_element_class_set_details_simple (element_class, "Wavpack parser", + "Codec/Demuxer/Audio", + "Parses Wavpack files", @@ -199,7 +225,7 @@ GST_TIME_ARGS (gst_util_uint64_scale_int (sample_offset, GST_SECOND, wvparse->samplerate)), byte_offset); - entry = g_new0 (GstWavpackParseIndexEntry, 1); + entry = gst_wavpack_parse_index_entry_new (); entry->byte_offset = byte_offset; entry->sample_offset = sample_offset; entry->sample_offset_end = sample_offset + num_samples; @@ -222,7 +248,8 @@ parse->upstream_length = -1; if (parse->entries) { - g_slist_foreach (parse->entries, (GFunc) g_free, NULL); + g_slist_foreach (parse->entries, (GFunc) gst_wavpack_parse_index_entry_free, + NULL); g_slist_free (parse->entries); parse->entries = NULL; } |
From: <sl...@ke...> - 2008-04-04 19:00:26
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Fri Apr 04 2008 19:00:33 UTC Log message: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_index_entry_free): Always use GSlice as we actually depend on GLib 2.12 already. Modified files: . : ChangeLog ext/wavpack : gstwavpackparse.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3384&r2=1.3385 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.37&r2=1.38 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3384 retrieving revision 1.3385 diff -u -d -r1.3384 -r1.3385 --- ChangeLog 4 Apr 2008 11:26:38 -0000 1.3384 +++ ChangeLog 4 Apr 2008 19:00:17 -0000 1.3385 @@ -1,3 +1,9 @@ +2008-04-04 Sebastian Dröge <sl...@ci...> + + * ext/wavpack/gstwavpackparse.c: + (gst_wavpack_parse_index_entry_free): + Always use GSlice as we actually depend on GLib 2.12 already. 2008-04-04 Tim-Philipp Müller <tim at centricular dot net> * configure.ac: Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- gstwavpackparse.c 3 Apr 2008 18:28:28 -0000 1.37 +++ gstwavpackparse.c 4 Apr 2008 19:00:19 -0000 1.38 @@ -57,8 +57,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_wavpack_parse_debug); #define GST_CAT_DEFAULT gst_wavpack_parse_debug -/* FIXME: unconditionally use GSlice after we depend on GLib >= 2.10 */ -#if GLIB_CHECK_VERSION (2, 10, 0) static inline GstWavpackParseIndexEntry * gst_wavpack_parse_index_entry_new () { @@ -70,19 +68,6 @@ g_slice_free (GstWavpackParseIndexEntry, entry); } -#else -static inline GstWavpackParseIndexEntry * -gst_wavpack_parse_index_entry_new () -{ - return g_new (GstWavpackParseIndexEntry, 1); -} - -static inline void -gst_wavpack_parse_index_entry_free (GstWavpackParseIndexEntry * entry) - g_free (entry); -#endif static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, |
From: <sl...@ke...> - 2008-06-19 10:59:04
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Thu Jun 19 2008 10:59:13 UTC Log message: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_reset), (gst_wavpack_parse_src_query), (gst_wavpack_parse_create_src_pad): Use G_GINT64_CONSTANT, this fixes the duration query on files without known length. Modified files: . : ChangeLog ext/wavpack : gstwavpackparse.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3563&r2=1.3564 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c.diff?r1=1.38&r2=1.39 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3563 retrieving revision 1.3564 diff -u -d -r1.3563 -r1.3564 --- ChangeLog 19 Jun 2008 10:48:56 -0000 1.3563 +++ ChangeLog 19 Jun 2008 10:58:54 -0000 1.3564 @@ -1,5 +1,12 @@ 2008-06-19 Sebastian Dröge <sl...@ci...> + * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_reset), + (gst_wavpack_parse_src_query), (gst_wavpack_parse_create_src_pad): + Use G_GINT64_CONSTANT, this fixes the duration query on files without + known length. + +2008-06-19 Sebastian Dröge <sl...@ci...> * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_wvpk_header), (gst_matroska_demux_audio_caps): Index: gstwavpackparse.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackparse.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- gstwavpackparse.c 4 Apr 2008 19:00:19 -0000 1.38 +++ gstwavpackparse.c 19 Jun 2008 10:58:57 -0000 1.39 @@ -93,14 +93,18 @@ ); static gboolean gst_wavpack_parse_sink_activate (GstPad * sinkpad); static gboolean gst_wavpack_parse_sink_activate_pull (GstPad * sinkpad, gboolean active); static void gst_wavpack_parse_loop (GstElement * element); static GstStateChangeReturn gst_wavpack_parse_change_state (GstElement * element, GstStateChange transition); static void gst_wavpack_parse_reset (GstWavpackParse * parse); static gint64 gst_wavpack_parse_get_upstream_length (GstWavpackParse * wvparse); static GstBuffer *gst_wavpack_parse_pull_buffer (GstWavpackParse * wvparse, gint64 offset, guint size, GstFlowReturn * flow); static GstFlowReturn gst_wavpack_parse_chain (GstPad * pad, GstBuffer * buf); @@ -139,6 +143,7 @@ gst_wavpack_parse_class_init (GstWavpackParseClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; @@ -162,6 +167,7 @@ gint64 sample_offset) gint i; GSList *node; if (wvparse->entries == NULL) @@ -220,7 +226,7 @@ static void gst_wavpack_parse_reset (GstWavpackParse * parse) - parse->total_samples = -1; + parse->total_samples = G_GINT64_CONSTANT (-1); parse->samplerate = 0; parse->channels = 0; @@ -282,12 +288,15 @@ gst_wavpack_parse_src_query (GstPad * pad, GstQuery * query) GstWavpackParse *parse = GST_WAVPACK_PARSE (gst_pad_get_parent (pad)); GstFormat format; gboolean ret = FALSE; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION:{ gint64 cur; guint rate; GST_OBJECT_LOCK (parse); @@ -322,6 +331,7 @@ } case GST_QUERY_DURATION:{ gint64 len; @@ -338,7 +348,7 @@ switch (format) { case GST_FORMAT_TIME: - if (len != -1) + if (len != G_GINT64_CONSTANT (-1)) len = gst_util_uint64_scale_int (len, GST_SECOND, rate); gst_query_set_duration (query, GST_FORMAT_TIME, len); ret = TRUE; @@ -359,6 +369,7 @@ gst_query_parse_seeking (query, &format, NULL, NULL, NULL); if (format == GST_FORMAT_TIME || format == GST_FORMAT_DEFAULT) { gboolean seekable; gint64 duration = -1; /* only fails if we didn't read the headers yet and can't say @@ -399,7 +410,9 @@ gint64 sample, gint64 * byte_offset, gint64 * start_sample) GstWavpackParseIndexEntry *entry; GstFlowReturn ret; gint64 off = 0; /* first, check if we have to scan at all */ @@ -427,6 +440,7 @@ /* now scan forward until we find the chunk we're looking for or hit EOS */ do { WavpackHeader header; GstBuffer *buf; buf = gst_wavpack_parse_pull_buffer (parse, off, sizeof (WavpackHeader), @@ -464,10 +478,15 @@ gst_wavpack_parse_send_newsegment (GstWavpackParse * wvparse, gboolean update) GstSegment *s = &wvparse->segment; gboolean ret; gint64 stop_time = -1; gint64 start_time = 0; gint64 cur_pos_time; gint64 diff; /* segment is in DEFAULT format, but we want to send a TIME newsegment */ @@ -504,18 +523,31 @@ GstEvent * event) GstSeekFlags seek_flags; GstSeekType start_type; GstSeekType stop_type; GstSegment segment; gboolean only_update; gboolean flush, ret; gdouble speed; gint64 stop; gint64 start; /* sample we want to seek to */ gint64 byte_offset; /* byte offset the chunk we seek to starts at */ gint64 chunk_start; /* first sample in chunk we seek to */ guint rate; gint64 last_stop; if (wvparse->adapter) { @@ -641,6 +673,7 @@ gst_wavpack_parse_sink_event (GstPad * pad, GstEvent * event) GstWavpackParse *parse; gboolean ret = TRUE; parse = GST_WAVPACK_PARSE (gst_pad_get_parent (pad)); @@ -699,6 +732,7 @@ gst_wavpack_parse_src_event (GstPad * pad, GstEvent * event) @@ -720,6 +754,7 @@ gst_wavpack_parse_init (GstWavpackParse * parse, GstWavpackParseClass * gclass) GstElementClass *klass = GST_ELEMENT_GET_CLASS (parse); GstPadTemplate *tmpl; tmpl = gst_element_class_get_pad_template (klass, "sink"); @@ -760,6 +795,7 @@ guint size, GstFlowReturn * flow) GstFlowReturn flow_ret; GstBuffer *buf = NULL; if (offset + size >= wvparse->upstream_length) { @@ -800,7 +836,9 @@ WavpackHeader * header) GstWavpackMetadata meta; GstCaps *caps = NULL; guchar *bufptr; g_assert (wvparse->srcpad == NULL); @@ -820,9 +858,13 @@ case ID_WV_BITSTREAM: case ID_WVX_BITSTREAM:{ WavpackStreamReader *stream_reader = gst_wavpack_stream_reader_new (); WavpackContext *wpc; gchar error_msg[80]; read_id rid; gint channel_mask; rid.buffer = GST_BUFFER_DATA (buf); @@ -837,8 +879,9 @@ wvparse->samplerate = WavpackGetSampleRate (wpc); wvparse->channels = WavpackGetNumChannels (wpc); - wvparse->total_samples = (header->total_samples == (int32_t) - 1) ? - -1 : header->total_samples; + wvparse->total_samples = + (header->total_samples == + 0xffffffff) ? G_GINT64_CONSTANT (-1) : header->total_samples; caps = gst_caps_new_simple ("audio/x-wavpack", "width", G_TYPE_INT, WavpackGetBitsPerSample (wpc), @@ -973,6 +1016,7 @@ gst_wavpack_parse_find_marker (guint8 * buf, guint size) int i; guint8 *ret = NULL; if (G_UNLIKELY (size < 4)) @@ -991,11 +1035,13 @@ gst_wavpack_parse_resync_loop (GstWavpackParse * parse, WavpackHeader * header) GstFlowReturn flow_ret = GST_FLOW_UNEXPECTED; /* loop until we have a frame header or reach the end of the stream */ while (1) { guint8 *data, *marker; guint len, size; if (buf) { @@ -1056,6 +1102,7 @@ gst_wavpack_parse_loop (GstElement * element) GstWavpackParse *parse = GST_WAVPACK_PARSE (element); WavpackHeader header = { {0,}, 0, }; @@ -1131,6 +1178,7 @@ gst_wavpack_parse_resync_adapter (GstAdapter * adapter) const guint8 *buf, *marker; guint avail = gst_adapter_available (adapter); if (avail < 4) @@ -1162,8 +1210,11 @@ gst_wavpack_parse_chain (GstPad * pad, GstBuffer * buf) GstWavpackParse *wvparse = GST_WAVPACK_PARSE (GST_PAD_PARENT (pad)); GstFlowReturn ret = GST_FLOW_OK; WavpackHeader wph; const guint8 *tmp_buf; if (!wvparse->adapter) { @@ -1223,6 +1274,7 @@ gst_wavpack_parse_change_state (GstElement * element, GstStateChange transition) GstWavpackParse *wvparse = GST_WAVPACK_PARSE (element); GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; switch (transition) { |
From: <sl...@ke...> - 2008-08-31 17:09:22
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Sun Aug 31 2008 17:09:32 UTC Log message: * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_reset), (gst_wavpack_enc_push_block), (gst_wavpack_enc_chain): * ext/wavpack/gstwavpackenc.h: Handle non-zero start timestamps and stream discontinuities correctly. This only has an effect if we're muxing into a container format as the raw WavPack stream must contain continous sample numbers. Modified files: . : ChangeLog ext/wavpack : gstwavpackenc.c gstwavpackenc.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3723&r2=1.3724 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c.diff?r1=1.24&r2=1.25 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.h.diff?r1=1.10&r2=1.11 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3723 retrieving revision 1.3724 diff -u -d -r1.3723 -r1.3724 --- ChangeLog 31 Aug 2008 15:02:07 -0000 1.3723 +++ ChangeLog 31 Aug 2008 17:09:16 -0000 1.3724 @@ -1,5 +1,15 @@ 2008-08-31 Sebastian Dröge <seb...@co...> + * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_reset), + (gst_wavpack_enc_push_block), (gst_wavpack_enc_chain): + * ext/wavpack/gstwavpackenc.h: + Handle non-zero start timestamps and stream discontinuities + correctly. This only has an effect if we're muxing into + a container format as the raw WavPack stream must contain + continous sample numbers. + +2008-08-31 Sebastian Dröge <seb...@co...> * ext/speex/gstspeexenc.c: (gst_speex_enc_encode): Correct the timestamp and granulepos calculation by one Speex frame. Index: gstwavpackenc.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- gstwavpackenc.c 8 Jul 2008 12:51:33 -0000 1.24 +++ gstwavpackenc.c 31 Aug 2008 17:09:18 -0000 1.25 @@ -320,6 +320,9 @@ enc->channels = 0; enc->channel_mask = 0; enc->need_channel_remap = FALSE; + enc->timestamp_offset = GST_CLOCK_TIME_NONE; + enc->next_ts = GST_CLOCK_TIME_NONE; } static void @@ -546,8 +549,8 @@ pad = (wid->correction) ? enc->wvcsrcpad : enc->srcpad; flow = - (wid->correction) ? &enc-> - wvcsrcpad_last_return : &enc->srcpad_last_return; + (wid->correction) ? &enc->wvcsrcpad_last_return : &enc-> + srcpad_last_return; *flow = gst_pad_alloc_buffer_and_set_caps (pad, GST_BUFFER_OFFSET_NONE, count, GST_PAD_CAPS (pad), &buffer); @@ -611,7 +614,7 @@ /* set buffer timestamp, duration, offset, offset_end from * the wavpack header */ - GST_BUFFER_TIMESTAMP (buffer) = + GST_BUFFER_TIMESTAMP (buffer) = enc->timestamp_offset + gst_util_uint64_scale_int (GST_SECOND, wph.block_index, enc->samplerate); GST_BUFFER_DURATION (buffer) = @@ -705,6 +708,66 @@ GST_DEBUG ("setup of encoding context successfull"); } + /* Save the timestamp of the first buffer. This will be later + * used as offset for all following buffers */ + if (enc->timestamp_offset == GST_CLOCK_TIME_NONE) { + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + enc->timestamp_offset = GST_BUFFER_TIMESTAMP (buf); + enc->next_ts = GST_BUFFER_TIMESTAMP (buf); + } else { + enc->timestamp_offset = 0; + enc->next_ts = 0; + } + } + /* Check if we have a continous stream, if not drop some samples or the buffer or + * insert some silence samples */ + if (enc->next_ts != GST_CLOCK_TIME_NONE && + GST_BUFFER_TIMESTAMP (buf) < enc->next_ts) { + guint64 diff = enc->next_ts - GST_BUFFER_TIMESTAMP (buf); + guint64 diff_bytes; + GST_WARNING_OBJECT (enc, "Buffer is older than previous " + "timestamp + duration (%" GST_TIME_FORMAT "< %" GST_TIME_FORMAT + "), cannot handle. Clipping buffer.", + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (enc->next_ts)); + diff_bytes = + GST_CLOCK_TIME_TO_FRAMES (diff, enc->samplerate) * enc->channels * 2; + if (diff_bytes >= GST_BUFFER_SIZE (buf)) { + gst_buffer_unref (buf); + return GST_FLOW_OK; + buf = gst_buffer_make_metadata_writable (buf); + GST_BUFFER_DATA (buf) += diff_bytes; + GST_BUFFER_SIZE (buf) -= diff_bytes; + GST_BUFFER_TIMESTAMP (buf) += diff; + if (GST_BUFFER_DURATION_IS_VALID (buf)) + GST_BUFFER_DURATION (buf) -= diff; + /* Allow a diff of at most 5 ms */ + if (enc->next_ts != GST_CLOCK_TIME_NONE + && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + if (GST_BUFFER_TIMESTAMP (buf) != enc->next_ts && + GST_BUFFER_TIMESTAMP (buf) - enc->next_ts > 5 * GST_MSECOND) { + GST_WARNING_OBJECT (enc, + "Discontinuity detected: %" G_GUINT64_FORMAT " > %" G_GUINT64_FORMAT, + GST_BUFFER_TIMESTAMP (buf) - enc->next_ts, 5 * GST_MSECOND); + WavpackFlushSamples (enc->wp_context); + enc->timestamp_offset += (GST_BUFFER_TIMESTAMP (buf) - enc->next_ts); + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf) + && GST_BUFFER_DURATION_IS_VALID (buf)) + enc->next_ts = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf); + else + enc->next_ts = GST_CLOCK_TIME_NONE; if (enc->need_channel_remap) { buf = gst_buffer_make_writable (buf); gst_wavpack_enc_fix_channel_order (enc, (gint32 *) GST_BUFFER_DATA (buf), Index: gstwavpackenc.h RCS file: /cvs/gstreamer/gst-plugins-good/ext/wavpack/gstwavpackenc.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gstwavpackenc.h 20 Nov 2007 13:08:45 -0000 1.10 +++ gstwavpackenc.h 31 Aug 2008 17:09:18 -0000 1.11 @@ -87,6 +87,9 @@ GstBuffer *pending_buffer; gint32 pending_offset; + GstClockTime timestamp_offset; + GstClockTime next_ts; }; struct _GstWavpackEncClass |