summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-10-27 18:02:52 +0000
committerMike Melanson <mike@multimedia.cx>2002-10-27 18:02:52 +0000
commiteba3a2ddea78fa6e91277735584849e195c56ed4 (patch)
tree0f52e8c8a47b3b352828fb67dfdcccc48785085e
parent5ead015624ad459a263e6e6f55e38cd037dc7317 (diff)
downloadxine-lib-eba3a2ddea78fa6e91277735584849e195c56ed4.tar.gz
xine-lib-eba3a2ddea78fa6e91277735584849e195c56ed4.tar.bz2
modified a52 decoder to support RealAudio dnet data
CVS patchset: 3046 CVS date: 2002/10/27 18:02:52
-rw-r--r--src/liba52/xine_decoder.c19
-rw-r--r--src/xine-engine/buffer.h4
-rw-r--r--src/xine-engine/buffer_types.c10
3 files changed, 28 insertions, 5 deletions
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index bb0b6110f..2bbc7030d 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.37 2002/10/26 02:35:13 guenter Exp $
+ * $Id: xine_decoder.c,v 1.38 2002/10/27 18:02:52 tmmm Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -340,6 +340,19 @@ void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
uint8_t *end = buf->content + buf->size;
uint8_t byte;
+ /* swap byte pairs if this is RealAudio DNET data */
+ if (buf->type == BUF_AUDIO_DNET) {
+ while (current != end) {
+ byte = *current++;
+ *(current - 1) = *current;
+ *current++ = byte;
+ }
+
+ /* reset */
+ current = buf->content;
+ end = buf->content + buf->size;
+ }
+
if (buf->pts)
this->pts = buf->pts;
@@ -609,7 +622,9 @@ static void *init_plugin (xine_t *xine, void *data) {
static uint32_t audio_types[] = {
- BUF_AUDIO_A52, 0
+ BUF_AUDIO_A52,
+ BUF_AUDIO_DNET,
+ 0
};
static decoder_info_t dec_info_audio = {
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 8f532382f..fe5bc00c6 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.h,v 1.72 2002/10/24 16:02:44 jkeil Exp $
+ * $Id: buffer.h,v 1.73 2002/10/27 18:02:52 tmmm Exp $
*
*
* contents:
@@ -149,7 +149,7 @@ extern "C" {
#define BUF_AUDIO_VOXWARE 0x030c0000
#define BUF_AUDIO_ACELPNET 0x030d0000
#define BUF_AUDIO_AAC 0x030e0000
-#define BUF_AUDIO_REAL 0x030f0000
+#define BUF_AUDIO_DNET 0x030f0000
#define BUF_AUDIO_VIVOG723 0x03100000
#define BUF_AUDIO_DK3ADPCM 0x03110000
#define BUF_AUDIO_DK4ADPCM 0x03120000
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index ef5288694..3e7985651 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer_types.c,v 1.43 2002/10/12 19:18:48 tmmm Exp $
+ * $Id: buffer_types.c,v 1.44 2002/10/27 18:02:52 tmmm Exp $
*
*
* contents:
@@ -656,6 +656,14 @@ static audio_db_t audio_db[] = {
},
{
{
+ meFOURCC('d', 'n', 'e', 't'),
+ 0
+ },
+ BUF_AUDIO_DNET,
+ "RealAudio DNET"
+},
+{
+ {
meFOURCC('Q', 'c', 'l', 'p'),
0
},