eas_parser.h revision 7df30109963092559d3760c0661a020f9daf1030
17df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/*----------------------------------------------------------------------------
27df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
37df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * File:
47df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * eas_parser.h
57df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
67df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Contents and purpose:
77df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Interface declarations for the generic parser interface
87df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
97df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * This header only contains declarations that are specific
107df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * to this implementation.
117df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
127df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Copyright Sonic Network Inc. 2005
137df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
147df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License");
157df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * you may not use this file except in compliance with the License.
167df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * You may obtain a copy of the License at
177df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
187df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0
197df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
207df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Unless required by applicable law or agreed to in writing, software
217df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS,
227df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * See the License for the specific language governing permissions and
247df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * limitations under the License.
257df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
267df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *----------------------------------------------------------------------------
277df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Revision Control:
287df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *   $Revision: 767 $
297df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *   $Date: 2007-07-19 13:47:31 -0700 (Thu, 19 Jul 2007) $
307df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *----------------------------------------------------------------------------
317df30109963092559d3760c0661a020f9daf1030The Android Open Source Project*/
327df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
337df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#ifndef _EAS_PARSER_H
347df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#define _EAS_PARSER_H
357df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
367df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#include "eas_types.h"
377df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
387df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
397df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/* metadata callback */
407df30109963092559d3760c0661a020f9daf1030The Android Open Source Projecttypedef struct s_metadata_cb_tag
417df30109963092559d3760c0661a020f9daf1030The Android Open Source Project{
427df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_METADATA_CBFUNC		callback;
437df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	char					*buffer;
447df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_VOID_PTR			pUserData;
457df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_I32					bufferSize;
467df30109963092559d3760c0661a020f9daf1030The Android Open Source Project} S_METADATA_CB;
477df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
487df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/* generic parser interface */
497df30109963092559d3760c0661a020f9daf1030The Android Open Source Projecttypedef struct
507df30109963092559d3760c0661a020f9daf1030The Android Open Source Project{
517df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfCheckFileType)(struct s_eas_data_tag *pEASData, EAS_FILE_HANDLE fileHandle, EAS_VOID_PTR *ppHandle, EAS_I32 offset);
527df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfPrepare)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData);
537df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfTime)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_U32 *pTime);
547df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfEvent)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_INT parseMode);
557df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfState)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_STATE *pState);
567df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfClose)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData);
577df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfReset)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData);
587df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfPause)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData);
597df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfResume)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData);
607df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfLocate)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_I32 time, EAS_BOOL *pParserLocate);
617df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfSetData)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_I32 param, EAS_I32 value);
627df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfGetData)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_I32 param, EAS_I32 *pValue);
637df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	EAS_RESULT (* EAS_CONST pfGetMetaData)(struct s_eas_data_tag *pEASData, EAS_VOID_PTR pInstData, EAS_I32 *pMediaLength);
647df30109963092559d3760c0661a020f9daf1030The Android Open Source Project} S_FILE_PARSER_INTERFACE;
657df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
667df30109963092559d3760c0661a020f9daf1030The Android Open Source Projecttypedef enum
677df30109963092559d3760c0661a020f9daf1030The Android Open Source Project{
687df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	eParserModePlay,
697df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	eParserModeLocate,
707df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	eParserModeMute,
717df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	eParserModeMetaData
727df30109963092559d3760c0661a020f9daf1030The Android Open Source Project} E_PARSE_MODE;
737df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
747df30109963092559d3760c0661a020f9daf1030The Android Open Source Projecttypedef enum
757df30109963092559d3760c0661a020f9daf1030The Android Open Source Project{
767df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_FILE_TYPE,
777df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_PLAYBACK_RATE,
787df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_TRANSPOSITION,
797df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_VOLUME,
807df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_SYNTH_HANDLE,
817df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_METADATA_CB,
827df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_DLS_COLLECTION,
837df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_EAS_LIBRARY,
847df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_POLYPHONY,
857df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_PRIORITY,
867df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_FORMAT,
877df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_MEDIA_LENGTH,
887df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_JET_CB,
897df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_MUTE_FLAGS,
907df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_SET_MUTE,
917df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_CLEAR_MUTE,
927df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_NOTE_COUNT,
937df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_MAX_PCM_STREAMS,
947df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_GAIN_OFFSET,
957df30109963092559d3760c0661a020f9daf1030The Android Open Source Project	PARSER_DATA_PLAY_MODE
967df30109963092559d3760c0661a020f9daf1030The Android Open Source Project} E_PARSER_DATA;
977df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
987df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#endif /* #ifndef _EAS_PARSER_H */
99