//
// 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: 
//
//


[StifSettings]
CheckHeapBalance=on
[EndStifSettings]

[Test]
title 12.1 SeekItf SetPosition
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 1 XA_IID_SEEK
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
pause 15000
ALImpl al_seekitf_SetPosition 10000 1
pause 15000
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
delete ALImpl
[Endtest]

[Test]
title 12.2 SeekItf SetLoop
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 1 XA_IID_SEEK
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
ALImpl al_playitf_RegisterCallback
ALImpl al_playitf_SetCallbackEventMask 31
ALImpl al_seekitf_SetLoop 1 10000 20000
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
pause 35000
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
delete ALImpl
[Endtest]

[Test]
title 12.3 SeekItf GetLoop
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 1 XA_IID_SEEK
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
ALImpl al_playitf_RegisterCallback
ALImpl al_playitf_SetCallbackEventMask 31
ALImpl al_seekitf_SetLoop 1 10000 20000
ALImpl al_seekitf_GetLoop
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
pause 25000
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
delete ALImpl
[Endtest]

[Test]
title 12.4 SeekItf SetPosition
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 WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
ALImpl al_SetDataSink 5 3 2
ALImpl al_engitf_CreateMediaPlayer  1 XA_IID_SEEK
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
pause 10000
ALImpl al_seekitf_SetPosition 60000 1
pause 10000
ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
ALImpl al_DeleteWindow
delete ALImpl
[Endtest]

[Test]
title 12.5 SeekItf SetLoop
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 WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
ALImpl al_SetDataSink 5 3 2
ALImpl al_engitf_CreateMediaPlayer  1 XA_IID_SEEK
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
ALImpl al_playitf_RegisterCallback
ALImpl al_playitf_SetCallbackEventMask 31
allownextresult 13
ALImpl al_seekitf_SetLoop 1 10000 20000
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
ALImpl al_DeleteWindow
delete ALImpl
[Endtest]
