summaryrefslogtreecommitdiff
path: root/src/libxineadec
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-15 13:01:00 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-15 13:01:00 +0000
commit570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b (patch)
treeed387d71185404d03367e64a52093b0e6369ed67 /src/libxineadec
parentbb62a769e4a50cef3023408bf9a527e63b7d884d (diff)
downloadxine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.gz
xine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.bz2
more helper functions cleanup (stream info, meta info)
CVS patchset: 5731 CVS date: 2003/11/15 13:01:00
Diffstat (limited to 'src/libxineadec')
-rw-r--r--src/libxineadec/28k8.c6
-rw-r--r--src/libxineadec/adpcm.c42
-rw-r--r--src/libxineadec/fooaudio.c4
-rw-r--r--src/libxineadec/gsm610.c4
-rw-r--r--src/libxineadec/interplayaudio.c5
-rw-r--r--src/libxineadec/logpcm.c8
-rw-r--r--src/libxineadec/nsf.c5
-rw-r--r--src/libxineadec/pcm.c2
-rw-r--r--src/libxineadec/roqaudio.c6
9 files changed, 42 insertions, 40 deletions
diff --git a/src/libxineadec/28k8.c b/src/libxineadec/28k8.c
index c43288937..c64ec6a45 100644
--- a/src/libxineadec/28k8.c
+++ b/src/libxineadec/28k8.c
@@ -22,7 +22,7 @@
* Based on public domain source code from:
* http://www.honeypot.net/audio/
*
- * $Id: 28k8.c,v 1.2 2003/05/08 19:45:08 esnel Exp $
+ * $Id: 28k8.c,v 1.3 2003/11/15 13:01:19 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -410,10 +410,10 @@ static void ra28k8_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
} else if (buf->decoder_flags & BUF_FLAG_HEADER) {
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("Real 28.8");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
this->decoder_ok = 1;
if (!this->decoder_ok)
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
} else if (this->decoder_ok ) {
audio_buffer_t *audio_buffer;
diff --git a/src/libxineadec/adpcm.c b/src/libxineadec/adpcm.c
index 4678adf51..e2bcb462c 100644
--- a/src/libxineadec/adpcm.c
+++ b/src/libxineadec/adpcm.c
@@ -31,7 +31,7 @@
* this is also useful for extracting streams from Playstation discs
*
*
- * $Id: adpcm.c,v 1.31 2003/06/06 14:29:41 mroi Exp $
+ * $Id: adpcm.c,v 1.32 2003/11/15 13:01:19 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -1409,53 +1409,53 @@ static void adpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
switch (buf->type & 0xFFFF0000) {
case BUF_AUDIO_MSADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Microsoft ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Microsoft ADPCM");
break;
case BUF_AUDIO_MSIMAADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Microsoft IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Microsoft IMA ADPCM");
break;
case BUF_AUDIO_QTIMAADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("QT IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "QT IMA ADPCM");
break;
case BUF_AUDIO_DK3ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Duck DK3 ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK3 ADPCM");
break;
case BUF_AUDIO_DK4ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Duck DK4 ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK4 ADPCM");
break;
case BUF_AUDIO_SMJPEG_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("SMJPEG IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "SMJPEG IMA ADPCM");
break;
case BUF_AUDIO_VQA_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("VQA IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "VQA IMA ADPCM");
break;
case BUF_AUDIO_EA_ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("EA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "EA ADPCM");
break;
case BUF_AUDIO_DIALOGIC_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Dialogic IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Dialogic IMA ADPCM");
break;
case BUF_AUDIO_XA_ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("CD-ROM/XA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "CD-ROM/XA ADPCM");
break;
}
diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c
index b40dd26f5..c94073fd8 100644
--- a/src/libxineadec/fooaudio.c
+++ b/src/libxineadec/fooaudio.c
@@ -21,7 +21,7 @@
* player. It really works too! It will output a continuous sine wave in
* place of the data it should actually send.
*
- * $Id: fooaudio.c,v 1.6 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: fooaudio.c,v 1.7 2003/11/15 13:01:20 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -98,7 +98,7 @@ static void fooaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->size = 0;
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("fooaudio");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "fooaudio");
/* peform any other required initialization */
this->last_pts = -1;
diff --git a/src/libxineadec/gsm610.c b/src/libxineadec/gsm610.c
index 2a4b5f619..e4c037aa7 100644
--- a/src/libxineadec/gsm610.c
+++ b/src/libxineadec/gsm610.c
@@ -44,7 +44,7 @@
* Carsten Bormann
* --------------------------------------------------------------------
*
- * $Id: gsm610.c,v 1.8 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: gsm610.c,v 1.9 2003/11/15 13:01:20 miguelfreitas Exp $
*
*/
@@ -109,7 +109,7 @@ static void gsm610_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("GSM 6.10");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "GSM 6.10");
return;
}
diff --git a/src/libxineadec/interplayaudio.c b/src/libxineadec/interplayaudio.c
index 71cfa0bc5..e1057766f 100644
--- a/src/libxineadec/interplayaudio.c
+++ b/src/libxineadec/interplayaudio.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: interplayaudio.c,v 1.2 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: interplayaudio.c,v 1.3 2003/11/15 13:01:20 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -137,7 +137,8 @@ static void interplay_decode_data (audio_decoder_t *this_gen, buf_element_t *buf
this->size = 0;
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("Interplay MVE DPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Interplay MVE DPCM");
return;
}
diff --git a/src/libxineadec/logpcm.c b/src/libxineadec/logpcm.c
index 3ff15fb0b..4cf95f28f 100644
--- a/src/libxineadec/logpcm.c
+++ b/src/libxineadec/logpcm.c
@@ -30,7 +30,7 @@
* http://sox.sourceforge.net/
* which listed the code as being lifted from Sun Microsystems.
*
- * $Id: logpcm.c,v 1.12 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: logpcm.c,v 1.13 2003/11/15 13:01:21 miguelfreitas Exp $
*
*/
@@ -160,9 +160,9 @@ static void logpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- (buf->type == BUF_AUDIO_MULAW) ? strdup("mu-law log PCM") :
- strdup("A-law log PCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ (buf->type == BUF_AUDIO_MULAW) ? "mu-law log PCM" :
+ "A-law log PCM" );
/* pre-calculate the possible log values */
if (buf->type == BUF_AUDIO_MULAW)
diff --git a/src/libxineadec/nsf.c b/src/libxineadec/nsf.c
index d3692cab6..9c65d2157 100644
--- a/src/libxineadec/nsf.c
+++ b/src/libxineadec/nsf.c
@@ -20,7 +20,7 @@
* NSF Audio "Decoder" using the Nosefart NSF engine by Matt Conte
* http://www.baisoku.org/
*
- * $Id: nsf.c,v 1.2 2003/01/08 07:36:21 tmmm Exp $
+ * $Id: nsf.c,v 1.3 2003/11/15 13:01:21 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -86,7 +86,8 @@ static void nsf_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->channels = buf->decoder_info[3];
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("NES Music (Nosefart)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "NES Music (Nosefart)");
this->song_number = buf->content[4];
/* allocate a buffer for the file */
diff --git a/src/libxineadec/pcm.c b/src/libxineadec/pcm.c
index 58b57bd57..122f6c855 100644
--- a/src/libxineadec/pcm.c
+++ b/src/libxineadec/pcm.c
@@ -74,7 +74,7 @@ static void pcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {\
buf->decoder_flags, buf->decoder_info[1], buf->decoder_info[0]);
#endif
- if (this->stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE] == 0) {
+ if (xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_MODE) == 0) {
#ifdef LOG
printf(__FILE__ ": Someone changed the audio mode. Closing device\r");
#endif
diff --git a/src/libxineadec/roqaudio.c b/src/libxineadec/roqaudio.c
index bf9e3a508..6ed30c42e 100644
--- a/src/libxineadec/roqaudio.c
+++ b/src/libxineadec/roqaudio.c
@@ -21,7 +21,7 @@
* For more information regarding the RoQ file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: roqaudio.c,v 1.15 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: roqaudio.c,v 1.16 2003/11/15 13:01:22 miguelfreitas Exp $
*
*/
@@ -83,8 +83,8 @@ static void roqaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("RoQ DPCM Audio");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "RoQ DPCM Audio");
return;
}