//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description: 
//
//

[Test]
title 12.1 PlayItf AudioPreemption
create openmaxaltestmodule ALImpl
ALImpl al_createEngine 1 1 0 0
ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
ALImpl al_SetDataFormat 1 audio/mpeg 9
ALImpl al_SetDataSource 1 1 1
ALImpl al_SetDataSink 3 6 1
ALImpl al_engitf_CreateMediaPlayer 0
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_playitf_RegisterCallback
request Event_XA_OBJECT_EVENT_RESOURCES_LOST
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
wait Event_XA_OBJECT_EVENT_RESOURCES_LOST
release Event_XA_OBJECT_EVENT_RESOURCES_LOST
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
delete ALImpl
[Endtest]

[Test]
title 12.2 PlayItf VideoPreemption
create openmaxaltestmodule ALImpl
ALImpl al_createEngine 1 1 0 0
ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
ALImpl al_SetDataFormat 1 vdieo/3gp 17
ALImpl al_SetDataSource 1 1 1
ALImpl al_SetDataSink 3 6 1
ALImpl al_CreateWindow 0 0 WinTopLeft WinTopRight WinBotLeft WinBotRight
ALImpl al_SetDataSink 5 3 2
ALImpl al_engitf_CreateMediaPlayer 0
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_playitf_RegisterCallback
request Event_XA_OBJECT_EVENT_RESOURCES_LOST
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
wait Event_XA_OBJECT_EVENT_RESOURCES_LOST
release Event_XA_OBJECT_EVENT_RESOURCES_LOST
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
ALImpl al_DeleteWindow
delete ALImpl
[Endtest]
