Android-x86
Fork
Spenden

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-opencore: Commit

external/opencore


Commit MetaInfo

Revisiondf03120427358bd024d6c7f4941e6a24023931bf (tree)
Zeit2010-04-16 05:34:31
AutorPacketVideo CM <engbuild@pv.c...>
CommiterPacketVideo CM

Log Message

RIO-8837: This change is to return engine state as prepared (not started) if the engine has moved into auto_pause after prepare state, without being started.

Change-Id: Ic77cb1b778f6c30cd83a18c67ffa4cd2b3cf5991

Ändern Zusammenfassung

Diff

--- a/engines/2way/src/pv_2way_sdkinfo.h
+++ b/engines/2way/src/pv_2way_sdkinfo.h
@@ -21,7 +21,7 @@
2121 // This header file is automatically generated at build-time
2222 // *** OFFICIAL RELEASE INFO -- Will not auto update
2323
24-#define PV2WAY_ENGINE_SDKINFO_LABEL "1361522"
24+#define PV2WAY_ENGINE_SDKINFO_LABEL "1362940"
2525 #define PV2WAY_ENGINE_SDKINFO_DATE 0x20100406
2626
2727 #endif //PV_2WAY_SDKINFO_H_INCLUDED
--- a/engines/author/src/pv_author_sdkinfo.h
+++ b/engines/author/src/pv_author_sdkinfo.h
@@ -21,7 +21,7 @@
2121 // This header file is automatically generated at build-time
2222 // *** OFFICIAL RELEASE INFO -- Will not auto update
2323
24-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1361522"
24+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1362940"
2525 #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100406
2626
2727 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED
--- a/engines/player/src/pv_player_engine.cpp
+++ b/engines/player/src/pv_player_engine.cpp
@@ -173,6 +173,8 @@ PVPlayerEngine::~PVPlayerEngine()
173173
174174 iCommandIdMut.Close();
175175 iOOTSyncCommandSem.Close();
176+
177+ iStartIssuedOnEngine = false;
176178 }
177179
178180
@@ -1166,7 +1168,8 @@ PVPlayerEngine::PVPlayerEngine() :
11661168 iClipsCompleted(0),
11671169 iClipsCorrupted(0),
11681170 iCurrentPlaybackClipId(0xFFFFFFFF),
1169- iNumClipsQueued(0)
1171+ iNumClipsQueued(0),
1172+ iStartIssuedOnEngine(false)
11701173 {
11711174 iCurrentBeginPosition.iIndeterminate = true;
11721175 iCurrentEndPosition.iIndeterminate = true;
@@ -3216,12 +3219,25 @@ PVPlayerState PVPlayerEngine::GetPVPlayerState(void)
32163219
32173220 case PVP_ENGINE_STATE_STARTED:
32183221 case PVP_ENGINE_STATE_AUTO_PAUSING:
3219- case PVP_ENGINE_STATE_AUTO_PAUSED:
32203222 case PVP_ENGINE_STATE_AUTO_RESUMING:
32213223 case PVP_ENGINE_STATE_PAUSING:
32223224 case PVP_ENGINE_STATE_STOPPING:
32233225 return PVP_STATE_STARTED;
32243226
3227+ case PVP_ENGINE_STATE_AUTO_PAUSED:
3228+ {
3229+ if (iStartIssuedOnEngine)
3230+ {
3231+ return PVP_STATE_STARTED;
3232+ }
3233+ else
3234+ {
3235+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
3236+ (0, "PVPlayerEngine::GetPVPlayerState return PVP_STATE_PREPARED in Engine Auto_Paused state, since Engine is still waiting for Start command"));
3237+ return PVP_STATE_PREPARED;
3238+ }
3239+ }
3240+
32253241 case PVP_ENGINE_STATE_PAUSED:
32263242 case PVP_ENGINE_STATE_RESUMING:
32273243 return PVP_STATE_PAUSED;
@@ -3908,6 +3924,10 @@ void PVPlayerEngine::DoCancelAllCommands(PVPlayerEngineCommand& aCmd)
39083924 // set engine state to Resetting, as cancel command completion will take Engine to Idle state, after internal reset.
39093925 SetEngineState(PVP_ENGINE_STATE_RESETTING);
39103926 iRollOverState = RollOverStateIdle; //reset roll over state to Idle, as engine is resetting itself
3927+
3928+ //Reset the variable iStartIssuedOnEngine
3929+ iStartIssuedOnEngine = false;
3930+
39113931 // Stop the playback clock
39123932 iPlaybackClock.Stop();
39133933 // Cancel the current command first
@@ -3979,6 +3999,7 @@ void PVPlayerEngine::DoCancelAllCommands(PVPlayerEngineCommand& aCmd)
39793999 OSCL_ASSERT(false););
39804000
39814001 PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "PVPlayerEngine::DoCancelAllCommands() Out"));
4002+
39824003 return;
39834004 }
39844005 }
@@ -8820,17 +8841,20 @@ PVMFStatus PVPlayerEngine::DoStart(PVPlayerEngineCommand& aCmd)
88208841
88218842 PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "PVPlayerEngine::DoStart() In, State=%d", iState));
88228843
8844+ if (iState == PVP_ENGINE_STATE_AUTO_PAUSED)
8845+ {
8846+ // Engine in AUTO-PAUSED state since it recieved an Underflow event
8847+ // during Prepare. Set the engine state to STARTED and return success
8848+ // Wait for DataReady event for the playback to start.
8849+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
8850+ (0, "PVPlayerEngine::DoStart() Engine in auto-paused state, set it to started"));
8851+ SetEngineState(PVP_ENGINE_STATE_STARTED);
8852+ iStartIssuedOnEngine = true;
8853+ }
8854+
8855+
88238856 if (GetPVPlayerState() == PVP_STATE_STARTED)
88248857 {
8825- if (iState == PVP_ENGINE_STATE_AUTO_PAUSED)
8826- {
8827- // Engine in AUTO-PAUSED state since it recieved an Underflow event
8828- // during Prepare. Set the engine state to STARTED and return success
8829- // Wait for DataReady event for the playback to start.
8830- PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
8831- (0, "PVPlayerEngine::DoStart() Engine in auto-paused state, set it to started"));
8832- SetEngineState(PVP_ENGINE_STATE_STARTED);
8833- }
88348858 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoStart() Engine already in Started State"));
88358859 EngineCommandCompleted(aCmd.GetCmdId(), aCmd.GetContext(), PVMFSuccess);
88368860 return PVMFSuccess;
@@ -8872,6 +8896,8 @@ PVMFStatus PVPlayerEngine::DoStart(PVPlayerEngineCommand& aCmd)
88728896 }
88738897
88748898 SetEngineState(PVP_ENGINE_STATE_STARTED);
8899+ iStartIssuedOnEngine = true;
8900+
88758901 EngineCommandCompleted(aCmd.GetCmdId(), aCmd.GetContext(), PVMFSuccess);
88768902
88778903 PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "PVPlayerEngine::DoStart() Out"));
@@ -9215,6 +9241,9 @@ PVMFStatus PVPlayerEngine::DoStop(PVPlayerEngineCommand& aCmd)
92159241 iPlaybackPausedDueToEndOfTimeReached = false;
92169242 iClipsCompleted = 0;
92179243
9244+ //Reset the variable iStartIssuedOnEngine
9245+ iStartIssuedOnEngine = false;
9246+
92189247 // Stop the end time check
92199248 if (iEndTimeCheckEnabled)
92209249 {
@@ -9427,6 +9456,7 @@ PVMFStatus PVPlayerEngine::DoReset(PVPlayerEngineCommand& aCmd)
94279456
94289457 // set engine state to Resetting
94299458 SetEngineState(PVP_ENGINE_STATE_RESETTING);
9459+ iStartIssuedOnEngine = false;
94309460 iRollOverState = RollOverStateIdle; //reset roll over state to Idle, as engine is resetting itself
94319461
94329462 // reset all repos related variables
@@ -16397,6 +16427,9 @@ PVMFStatus PVPlayerEngine::DoErrorHandling()
1639716427 // just send the error handling complete event
1639816428 SendInformationalEvent(PVMFInfoErrorHandlingComplete, NULL);
1639916429
16430+ //Reset the variable iStartIssuedOnEngine
16431+ iStartIssuedOnEngine = false;
16432+
1640016433 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoErrorHandling() Out"));
1640116434
1640216435 return PVMFSuccess;
--- a/engines/player/src/pv_player_engine.h
+++ b/engines/player/src/pv_player_engine.h
@@ -1602,6 +1602,9 @@ class PVPlayerEngine
16021602 uint32 iCurrentPlaybackClipId;
16031603 uint32 iNumClipsQueued;
16041604
1605+ // A variable to track whether Start Command has been Issued to and Processed by Engine
1606+ bool iStartIssuedOnEngine;
1607+
16051608 //CPM related - As of today we use this instance of CPM in QueryInterface calls only
16061609 //outside of this engine has no interactions with CPM.
16071610 PVMFCPM* iCPM;
--- a/engines/player/src/pv_player_sdkinfo.h
+++ b/engines/player/src/pv_player_sdkinfo.h
@@ -21,7 +21,7 @@
2121 // This header file is automatically generated at build-time
2222 // *** OFFICIAL RELEASE INFO -- Will not auto update
2323
24-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1361522"
24+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1362940"
2525 #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100406
2626
2727 #endif //PV_PLAYER_SDKINFO_H_INCLUDED
Show on old repository browser