From 0c60bfaa771b2f3643431f5f22b228f5b25fce25 Mon Sep 17 00:00:00 2001 From: PacketVideo CM Date: Thu, 29 Oct 2009 12:05:36 -0700 Subject: [PATCH] RIO-7799: Player Engine should not fail playback if the Source node does not support Playback control interface. --- engines/2way/src/pv_2way_sdkinfo.h | 2 +- engines/author/src/pv_author_sdkinfo.h | 2 +- engines/player/src/pv_player_engine.cpp | 23 +++++++++++------------ engines/player/src/pv_player_sdkinfo.h | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/engines/2way/src/pv_2way_sdkinfo.h b/engines/2way/src/pv_2way_sdkinfo.h index 403c06f2..8ba8cc9b 100644 --- a/engines/2way/src/pv_2way_sdkinfo.h +++ b/engines/2way/src/pv_2way_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PV2WAY_ENGINE_SDKINFO_LABEL "1039074" +#define PV2WAY_ENGINE_SDKINFO_LABEL "1039670" #define PV2WAY_ENGINE_SDKINFO_DATE 0x20091023 #endif //PV_2WAY_SDKINFO_H_INCLUDED diff --git a/engines/author/src/pv_author_sdkinfo.h b/engines/author/src/pv_author_sdkinfo.h index 54b85cf2..1827d3e4 100644 --- a/engines/author/src/pv_author_sdkinfo.h +++ b/engines/author/src/pv_author_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1039074" +#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1039670" #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20091023 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED diff --git a/engines/player/src/pv_player_engine.cpp b/engines/player/src/pv_player_engine.cpp index 78d206d7..8cf754b1 100644 --- a/engines/player/src/pv_player_engine.cpp +++ b/engines/player/src/pv_player_engine.cpp @@ -5223,6 +5223,10 @@ PVMFStatus PVPlayerEngine::DoSourceNodeGetDurationValue(PVCommandId aCmdId, Oscl { PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "PVPlayerEngine::DoSourceNodeGetDurationValue() In")); + if (iSourceNodeMetadataExtIF == NULL) + { + return PVMFErrNotSupported; + } // Create a key list with just duration key iSourceDurationKeyList.clear(); @@ -5231,11 +5235,6 @@ PVMFStatus PVPlayerEngine::DoSourceNodeGetDurationValue(PVCommandId aCmdId, Oscl // Clear the value list iSourceDurationValueList.clear(); - if (iSourceNodeMetadataExtIF == NULL) - { - return PVMFErrArgument; - } - // Call GetNodeMetadataValues on the source node to retrieve duration PVPlayerEngineContext* context = AllocateEngineContext(NULL, iSourceNode, NULL, aCmdId, aCmdContext, PVP_CMD_SourceNodeGetDurationValue); @@ -5810,7 +5809,7 @@ PVMFStatus PVPlayerEngine::DoChangePlaybackPosition(PVCommandId aCmdId, OsclAny* (iCurrentBeginPosition.iPlayListPosUnit != PVPPBPOSUNIT_MILLISEC))) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoChangePlaybackPosition() Playback control IF on source node not available or invalid begin position")); - return PVMFFailure; + return PVMFErrNotSupported; } PVMFCommandId cmdid = -1; @@ -5894,7 +5893,7 @@ PVMFStatus PVPlayerEngine::DoSourceNodeSetDataSourcePositionDuringPlayback(PVCom if (iSourceNodePBCtrlIF == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoSourceNodeSetDataSourcePositionDuringPlayback() No source playback control IF")); - return PVMFFailure; + return PVMFErrNotSupported; } bool clockpausedhere = false; switch (iPlaybackPositionMode) @@ -6261,7 +6260,7 @@ PVMFStatus PVPlayerEngine::DoSetPlaybackRate(PVPlayerEngineCommand& aCmd) && iSourceNodePBCtrlIF == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoSetPlaybackRate() iSourceNodePBCtrlIF is NULL")); - return PVMFFailure; + return PVMFErrNotSupported; } // To do any direction change, the source node must have the direction control IF. @@ -6269,7 +6268,7 @@ PVMFStatus PVPlayerEngine::DoSetPlaybackRate(PVPlayerEngineCommand& aCmd) && iSourceNodeDirCtrlIF == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoSetPlaybackRate() iSourceNodeDirCtrlIF is NULL")); - return PVMFFailure; + return PVMFErrNotSupported; } // Reset the paused-due-to-EOS flag if direction changes @@ -6368,7 +6367,7 @@ PVMFStatus PVPlayerEngine::UpdateCurrentDirection(PVMFCommandId aCmdId, OsclAny* if (!iSourceNodeDirCtrlIF) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::UpdateCurrentDirection() Direction control IF on source node not available ")); - status = PVMFFailure; + status = PVMFErrNotSupported; PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "PVPlayerEngine::UpdateCurrentDirection() Out")); return status; } @@ -7845,7 +7844,7 @@ PVMFStatus PVPlayerEngine::DoSinkDecCleanupSourcePrepare(PVCommandId aCmdId, Osc // Clear the Track selection List iTrackSelectionList.clear(); - PVMFStatus cmdstatus = PVMFFailure; + PVMFStatus cmdstatus = PVMFErrNotSupported; // Notify the TargetNPT to the source node before calling Prepare. if (iSourceNodePBCtrlIF) @@ -8401,7 +8400,7 @@ PVMFStatus PVPlayerEngine::DoSourceNodeSetDataSourceDirection(PVCommandId aCmdId if (iSourceNodeDirCtrlIF == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVPlayerEngine::DoSourceNodeSetDataSourceDirection() No source direction control IF")); - return PVMFFailure; + return PVMFErrNotSupported; } // Pause the playback clock diff --git a/engines/player/src/pv_player_sdkinfo.h b/engines/player/src/pv_player_sdkinfo.h index 6e9748aa..7b9a1129 100644 --- a/engines/player/src/pv_player_sdkinfo.h +++ b/engines/player/src/pv_player_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVPLAYER_ENGINE_SDKINFO_LABEL "1039074" +#define PVPLAYER_ENGINE_SDKINFO_LABEL "1039670" #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20091023 #endif //PV_PLAYER_SDKINFO_H_INCLUDED -- 2.11.0