mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
ded2cc6e39
Original commit message from CVS: * 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.
75 lines
2.8 KiB
C
75 lines
2.8 KiB
C
/* GStreamer Wavpack plugin
|
|
* Copyright (c) 2005 Arwed v. Merkatz <v.merkatz@gmx.net>
|
|
* Copyright (c) 2006 Sebastian Dröge <slomo@circular-chaos.org>
|
|
*
|
|
* gstwavpackcommon.h: common helper functions
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __GST_WAVPACK_COMMON_H__
|
|
#define __GST_WAVPACK_COMMON_H__
|
|
|
|
#include <gst/gst.h>
|
|
#include <gst/audio/multichannel.h>
|
|
#include <wavpack/wavpack.h>
|
|
|
|
typedef struct
|
|
{
|
|
guint32 byte_length;
|
|
guint8 *data;
|
|
guint8 id;
|
|
} GstWavpackMetadata;
|
|
|
|
#define ID_UNIQUE 0x3f
|
|
#define ID_OPTIONAL_DATA 0x20
|
|
#define ID_ODD_SIZE 0x40
|
|
#define ID_LARGE 0x80
|
|
|
|
#define ID_DUMMY 0x0
|
|
#define ID_ENCODER_INFO 0x1
|
|
#define ID_DECORR_TERMS 0x2
|
|
#define ID_DECORR_WEIGHTS 0x3
|
|
#define ID_DECORR_SAMPLES 0x4
|
|
#define ID_ENTROPY_VARS 0x5
|
|
#define ID_HYBRID_PROFILE 0x6
|
|
#define ID_SHAPING_WEIGHTS 0x7
|
|
#define ID_FLOAT_INFO 0x8
|
|
#define ID_INT32_INFO 0x9
|
|
#define ID_WV_BITSTREAM 0xa
|
|
#define ID_WVC_BITSTREAM 0xb
|
|
#define ID_WVX_BITSTREAM 0xc
|
|
#define ID_CHANNEL_INFO 0xd
|
|
|
|
#define ID_RIFF_HEADER (ID_OPTIONAL_DATA | 0x1)
|
|
#define ID_RIFF_TRAILER (ID_OPTIONAL_DATA | 0x2)
|
|
#define ID_REPLAY_GAIN (ID_OPTIONAL_DATA | 0x3)
|
|
#define ID_CUESHEET (ID_OPTIONAL_DATA | 0x4)
|
|
#define ID_CONFIG_BLOCK (ID_OPTIONAL_DATA | 0x5)
|
|
#define ID_MD5_CHECKSUM (ID_OPTIONAL_DATA | 0x6)
|
|
#define ID_SAMPLE_RATE (ID_OPTIONAL_DATA | 0x7)
|
|
|
|
|
|
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
|