/*
  Runtime definitions from generic player
  Copyright (C) 1998  Martin Vogt

  This program 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.

  For more information look at the file COPYRIGHT in this package

 */


#ifndef __XPLAYER_RUNTIME_DEFS
#define __XPLAYER_RUNTIME_DEFS

#include "../yafcore/commandTable.h"   // defines CommandDesc-Struct...
#include "../yafcore/yafRuntime.defs"

// Command Numbers

#define _PLAYER_RUN_PLAYER_STATUS      			_YAF_RUN_START+1

#define _PLAYER_RUN_STREAMINFO_START			_YAF_RUN_START+2
#define _PLAYER_RUN_STREAMINFO_CHANNELS			_YAF_RUN_START+3
#define _PLAYER_RUN_STREAMINFO_SAMPLESIZE		_YAF_RUN_START+4
#define _PLAYER_RUN_STREAMINFO_SPEED			_YAF_RUN_START+5
#define _PLAYER_RUN_STREAMINFO_END			_YAF_RUN_START+6

#define _PLAYER_RUN_FILEOPEN                    	_YAF_RUN_START+7

#define _PLAYER_RUN_MUSICINFO_START                   	_YAF_RUN_START+8
#define _PLAYER_RUN_MUSICINFO_SONG_FILENAME            	_YAF_RUN_START+10
#define _PLAYER_RUN_MUSICINFO_SONG_NAME                	_YAF_RUN_START+11
#define _PLAYER_RUN_MUSICINFO_SONG_LEN                 	_YAF_RUN_START+12
#define _PLAYER_RUN_MUSICINFO_SONG_JUMPS               	_YAF_RUN_START+13
#define _PLAYER_RUN_MUSICINFO_END                   	_YAF_RUN_START+14
#define _PLAYER_RUN_ID3_INFO_START			_YAF_RUN_START+15
#define _PLAYER_RUN_ID3_NAME				_YAF_RUN_START+16
#define _PLAYER_RUN_ID3_ARTIST				_YAF_RUN_START+17
#define _PLAYER_RUN_ID3_ALBUM				_YAF_RUN_START+18
#define _PLAYER_RUN_ID3_YEAR				_YAF_RUN_START+19
#define _PLAYER_RUN_ID3_COMMENT				_YAF_RUN_START+20
#define _PLAYER_RUN_ID3_GENRE				_YAF_RUN_START+21
#define _PLAYER_RUN_ID3_INFO_END			_YAF_RUN_START+22
#define _PLAYER_RUN_MP3_INFO_START			_YAF_RUN_START+23
#define _PLAYER_RUN_MP3_BPS				_YAF_RUN_START+24
#define _PLAYER_RUN_MP3_INFO_END			_YAF_RUN_START+25





#define _XPLAYER_RUN_START			_YAF_RUN_START+100


typedef struct {
	int channels;	//2 = stereo 1=mono
	int nStreamPos; // Position in Stream on which this Info becomes "true"
} ChannelInfo;


typedef struct {
	int samplesize;	// 16 for 16 Bit
	int nStreamPos; // Position in Stream on which this Info becomes "true"
} SampleSizeInfo;

 
typedef struct {
	int channels;	//2 = stereo 1=mono
	int nStreamPos; // Position in Stream on which this Info becomes "true"
} SpeedInfo;




// The commands as String. The Syntax is :
// 
//  { lexternalUse,lReturnMsg,longName,shortName,number,helpText }
// 
// lexternal use ist true when the text should be written when 
// user enters "help"
#ifdef _USE_RUNTIME_XPLAYER_STRUC
static struct CommandDescriptionStruct xplayerRuntime[]={

  { 0,1,"player-status","",_PLAYER_RUN_PLAYER_STATUS,"state of cdplayer"},
  { 0,1,"streamInfo-Start","",_PLAYER_RUN_STREAMINFO_START,"StreamInfo start"},
  { 0,1,"streamInfo-Channels","",_PLAYER_RUN_STREAMINFO_CHANNELS,
	"ChannelInfo"},
  { 0,1,"streamInfo-SampleSize","",_PLAYER_RUN_STREAMINFO_SAMPLESIZE,
	"SampleSizeInfo"},
  { 0,1,"streamInfo-Speed","",_PLAYER_RUN_STREAMINFO_SPEED,"SpeedInfo"},
  { 0,1,"streamInfo-End","",_PLAYER_RUN_STREAMINFO_END,"StreamInfo end"},
  { 0,1,"musicinfo-Start","",_PLAYER_RUN_MUSICINFO_START,"begin block"},
  { 0,1,"song_filename","",_PLAYER_RUN_MUSICINFO_SONG_FILENAME,
	"filename to the song"},
  { 0,1,"song_name","",_PLAYER_RUN_MUSICINFO_SONG_NAME,"name of the song"},
  { 0,1,"song_len","",_PLAYER_RUN_MUSICINFO_SONG_LEN,"length in secs"},
  { 0,1,"song_jumps","",_PLAYER_RUN_MUSICINFO_SONG_JUMPS,"jump entities in song"},
  { 0,1,"musicinfo-End","",_PLAYER_RUN_MUSICINFO_END,"end block"},
  { 0,1,"id3Info-Start","",_PLAYER_RUN_ID3_INFO_START,"ID3Info start"},
  { 0,1,"id3Name","",_PLAYER_RUN_ID3_NAME,"ID3 Name"},
  { 0,1,"id3Artist","",_PLAYER_RUN_ID3_ARTIST,"ID3 Artist"},
  { 0,1,"id3Album","",_PLAYER_RUN_ID3_ALBUM,"ID3 Album"},
  { 0,1,"id3Year","",_PLAYER_RUN_ID3_YEAR,"ID3 Year"},
  { 0,1,"id3Comment","",_PLAYER_RUN_ID3_COMMENT,"ID3 Comment"},
  { 0,1,"id3Genre","",_PLAYER_RUN_ID3_GENRE,"ID3 Genre"},
  { 0,1,"id3Info-End","",_PLAYER_RUN_ID3_INFO_END,"ID3Info start"},
  { 0,1,"mp3Info-Start","",_PLAYER_RUN_MP3_INFO_START,"MP3Info start"},
  { 0,1,"mp3BitsPerSec","",_PLAYER_RUN_MP3_BPS,"Samplebits per second"},
  { 0,1,"mp3Info-End","",_PLAYER_RUN_MP3_INFO_END,"MP3Info end"},
  { 0,1,"fileopen", "",_PLAYER_RUN_FILEOPEN, 
      	"sended before yaf tries to open outputfile"}	

};
#endif

// How much Commands are in the Array :
#define XPLAYERRUNTIME_SIZE 24



#endif
