external/opencore
修订版 | d8246c8d2622e0b65335b56c4a6783307d95b48a (tree) |
---|---|
时间 | 2010-04-16 05:34:32 |
作者 | PacketVideo CM <engbuild@pv.c...> |
Commiter | PacketVideo CM |
RIO-8909: Re-submit ASF source node playlist support after fixing silent audio sample handling.
Change-Id: I7b9674c58162a91a3763284b713749c82dc3dffb
@@ -21,7 +21,7 @@ | ||
21 | 21 | // This header file is automatically generated at build-time |
22 | 22 | // *** OFFICIAL RELEASE INFO -- Will not auto update |
23 | 23 | |
24 | -#define PV2WAY_ENGINE_SDKINFO_LABEL "1363430" | |
24 | +#define PV2WAY_ENGINE_SDKINFO_LABEL "1364347" | |
25 | 25 | #define PV2WAY_ENGINE_SDKINFO_DATE 0x20100407 |
26 | 26 | |
27 | 27 | #endif //PV_2WAY_SDKINFO_H_INCLUDED |
@@ -21,7 +21,7 @@ | ||
21 | 21 | // This header file is automatically generated at build-time |
22 | 22 | // *** OFFICIAL RELEASE INFO -- Will not auto update |
23 | 23 | |
24 | -#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1363430" | |
24 | +#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1364347" | |
25 | 25 | #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100407 |
26 | 26 | |
27 | 27 | #endif //PV_AUTHOR_SDKINFO_H_INCLUDED |
@@ -16583,44 +16583,28 @@ PVMFStatus PVPlayerEngine::DoCancelGetLicense(PVMFCommandId aCmdId, PVPlayerEngi | ||
16583 | 16583 | |
16584 | 16584 | void PVPlayerEngine::IssueSourceNodeAudioSinkEvent(const PVMFAsyncEvent& aEvent) |
16585 | 16585 | { |
16586 | - bool retVal = false; | |
16587 | - int32 datapathIndex = -1; | |
16588 | - // Make sure there are no video tracks | |
16589 | - retVal = FindDatapathForTrackUsingMimeString(true, false, false, datapathIndex); | |
16590 | - if (retVal == false) | |
16591 | - { | |
16592 | - // Make sure there are no text tracks | |
16593 | - retVal = FindDatapathForTrackUsingMimeString(false, false, true, datapathIndex); | |
16594 | - if (retVal == false) | |
16595 | - { | |
16596 | - retVal = FindDatapathForTrackUsingMimeString(false, true, false, datapathIndex); | |
16597 | - if (retVal) | |
16598 | - { | |
16599 | - uint32 *data = (uint32*) aEvent.GetEventData(); | |
16600 | - uint32 clipId = *(data + 1); | |
16601 | - uint8 localbuffer[8]; | |
16602 | - oscl_memcpy(localbuffer, &clipId, sizeof(uint32)); | |
16586 | + uint32 *data = (uint32*) aEvent.GetEventData(); | |
16587 | + uint32 clipId = *(data + 1); | |
16588 | + uint8 localbuffer[8]; | |
16589 | + oscl_memcpy(localbuffer, &clipId, sizeof(uint32)); | |
16603 | 16590 | |
16604 | - int32 eventType = aEvent.GetEventType(); | |
16591 | + int32 eventType = aEvent.GetEventType(); | |
16605 | 16592 | |
16606 | - if (eventType == PVMFInfoStartOfData) | |
16607 | - { | |
16608 | - if (iNumPVMFInfoStartOfDataPending == 0) | |
16609 | - { | |
16610 | - SendInformationalEvent(PVPlayerInfoClipPlaybackStarted, NULL, aEvent.GetEventData(), localbuffer, 8); | |
16611 | - } | |
16612 | - } | |
16613 | - else // aEvent == PVMFInfoEndOfData | |
16614 | - { | |
16615 | - SendInformationalEvent(PVPlayerInfoClipPlaybackEnded, NULL, aEvent.GetEventData(), localbuffer, 8); | |
16616 | - } | |
16617 | - if (clipId + 1 <= iDataSource->GetNumClips()) | |
16618 | - { | |
16619 | - iSourceNodeInitIF->AudioSinkEvent(eventType, clipId); | |
16620 | - } | |
16621 | - } | |
16593 | + if (eventType == PVMFInfoStartOfData) | |
16594 | + { | |
16595 | + if (iNumPVMFInfoStartOfDataPending == 0) | |
16596 | + { | |
16597 | + SendInformationalEvent(PVPlayerInfoClipPlaybackStarted, NULL, aEvent.GetEventData(), localbuffer, 8); | |
16622 | 16598 | } |
16623 | 16599 | } |
16600 | + else // aEvent == PVMFInfoEndOfData | |
16601 | + { | |
16602 | + SendInformationalEvent(PVPlayerInfoClipPlaybackEnded, NULL, aEvent.GetEventData(), localbuffer, 8); | |
16603 | + } | |
16604 | + if (clipId + 1 <= iDataSource->GetNumClips()) | |
16605 | + { | |
16606 | + iSourceNodeInitIF->AudioSinkEvent(eventType, clipId); | |
16607 | + } | |
16624 | 16608 | } |
16625 | 16609 | |
16626 | 16610 | OSCL_EXPORT_REF void |
@@ -21,7 +21,7 @@ | ||
21 | 21 | // This header file is automatically generated at build-time |
22 | 22 | // *** OFFICIAL RELEASE INFO -- Will not auto update |
23 | 23 | |
24 | -#define PVPLAYER_ENGINE_SDKINFO_LABEL "1363430" | |
24 | +#define PVPLAYER_ENGINE_SDKINFO_LABEL "1364347" | |
25 | 25 | #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100407 |
26 | 26 | |
27 | 27 | #endif //PV_PLAYER_SDKINFO_H_INCLUDED |
@@ -339,6 +339,13 @@ int32 CreatePlaylist(const char* aFileName, PVMFFormatType& aFileType, char**& a | ||
339 | 339 | invalidFileName += DEFAULT_INVALID_MP4_PLAYLIST; |
340 | 340 | defaultPlaylist = true; |
341 | 341 | } |
342 | + else if (oscl_strstr(aFileName, ".wma") != NULL || oscl_strstr(aFileName, ".WMA") != NULL || | |
343 | + oscl_strstr(aFileName, ".asf") != NULL || oscl_strstr(aFileName, ".ASF") != NULL) | |
344 | + { | |
345 | + validFileName += DEFAULT_VALID_WMA_PLAYLIST; | |
346 | + invalidFileName += DEFAULT_INVALID_WMA_PLAYLIST; | |
347 | + defaultPlaylist = true; | |
348 | + } | |
342 | 349 | else if (oscl_strstr(aFileName, ".txt") != NULL || oscl_strstr(aFileName, ".TXT") != NULL) |
343 | 350 | { |
344 | 351 | // using input text file from command line |
@@ -338,6 +338,15 @@ class pvplayer_async_test_playlist_playback : public pvplayer_async_test_base | ||
338 | 338 | iAlternateMimeType = PVMF_MIME_MPEG4FF; |
339 | 339 | } |
340 | 340 | } |
341 | + else if (iFileType == PVMF_MIME_ASFFF) | |
342 | + { | |
343 | + iSinkFileNameSubString += _STRLIT_WCHAR("wma"); | |
344 | + | |
345 | + if (iInvalidMimeTypeTest) | |
346 | + { | |
347 | + iAlternateMimeType = PVMF_MIME_MP3FF; | |
348 | + } | |
349 | + } | |
341 | 350 | else //(iFileType == PVMF_MIME_MP4FF) |
342 | 351 | { |
343 | 352 | iSinkFileNameSubString += _STRLIT_WCHAR("mp4"); |
@@ -709,6 +718,10 @@ class pvplayer_async_test_playlist_seek_skip : public pvplayer_async_test_base | ||
709 | 718 | { |
710 | 719 | iSinkFileNameSubString += _STRLIT_WCHAR("mp3"); |
711 | 720 | } |
721 | + else if (iFileType == PVMF_MIME_ASFFF) | |
722 | + { | |
723 | + iSinkFileNameSubString += _STRLIT_WCHAR("wma"); | |
724 | + } | |
712 | 725 | else //(iFileType == PVMF_MIME_MP4FF) |
713 | 726 | { |
714 | 727 | iSinkFileNameSubString += _STRLIT_WCHAR("mp4"); |
@@ -1245,3 +1258,4 @@ class pvplayer_async_test_validate_gapless : public pvplayer_async_test_base | ||
1245 | 1258 | |
1246 | 1259 | |
1247 | 1260 | #endif //TEST_PV_PLAYER_ENGINE_TESTSET_PLAYLIST_H_INCLUDED |
1261 | + |
@@ -43,9 +43,12 @@ | ||
43 | 43 | |
44 | 44 | #define DEFAULT_VALID_MP3_PLAYLIST "test_valid_mp3_playlist.txt" |
45 | 45 | #define DEFAULT_VALID_MP4_PLAYLIST "test_valid_mp4_playlist.txt" |
46 | +#define DEFAULT_VALID_WMA_PLAYLIST "test_valid_wma_playlist.txt" | |
46 | 47 | #define DEFAULT_INVALID_MP3_PLAYLIST "test_invalid_mp3_playlist.txt" |
47 | 48 | #define DEFAULT_INVALID_MP4_PLAYLIST "test_invalid_mp4_playlist.txt" |
49 | +#define DEFAULT_INVALID_WMA_PLAYLIST "test_invalid_wma_playlist.txt" | |
48 | 50 | |
49 | 51 | #define PLAYLIST_READ_BUFFER_SIZE 6 * 1024 |
50 | 52 | |
51 | 53 | #endif |
54 | + |
@@ -5634,7 +5634,7 @@ void PVMFMP4FFParserNode::CleanupFileSource() | ||
5634 | 5634 | // delete file parser object, if any |
5635 | 5635 | if (clipInfo.iParserObj) |
5636 | 5636 | { |
5637 | - ReleaseMP4FileParser(iClipInfoList.size() - 1); | |
5637 | + ReleaseMP4FileParser(iClipInfoList.size() - 1, true); | |
5638 | 5638 | } |
5639 | 5639 | // clear the vector element |
5640 | 5640 | iClipInfoList.pop_back(); |
@@ -8971,11 +8971,12 @@ PVMFStatus PVMFMP4FFParserNode::ConstructMP4FileParser(PVMFStatus* aStatus, int3 | ||
8971 | 8971 | } |
8972 | 8972 | |
8973 | 8973 | |
8974 | -PVMFStatus PVMFMP4FFParserNode::ReleaseMP4FileParser(int32 aClipIndex) | |
8974 | +PVMFStatus PVMFMP4FFParserNode::ReleaseMP4FileParser(int32 aClipIndex, bool cleanParserAtLastIndex) | |
8975 | 8975 | { |
8976 | 8976 | PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "PVMFMP4FFParserNode::ReleaseMP4FileParser() In ClipIndex[%d]", aClipIndex)); |
8977 | 8977 | PVMFStatus status = PVMFFailure; |
8978 | - if (aClipIndex >= 0) | |
8978 | + // don't clean up parser object if there is only one clip in the list, unless it is requested | |
8979 | + if (aClipIndex >= 0 && (iNumClipsInPlayList > 1 || cleanParserAtLastIndex)) | |
8979 | 8980 | { |
8980 | 8981 | if (((uint32) aClipIndex == iClipInfoList[iClipInfoList.size() - 1].iClipInfo.GetClipIndex()) || |
8981 | 8982 | iPlaylistExhausted) |
@@ -470,7 +470,7 @@ class PVMFMP4FFParserNode | ||
470 | 470 | |
471 | 471 | // create parser objects for gapless |
472 | 472 | PVMFStatus ConstructMP4FileParser(PVMFStatus* aStatus, int32 aClipIndex, PVMFCPMPluginAccessInterfaceFactory* aCPMFactory); |
473 | - PVMFStatus ReleaseMP4FileParser(int32 aClipIndex); | |
473 | + PVMFStatus ReleaseMP4FileParser(int32 aClipIndex, bool cleanParserAtLastIndex = false); | |
474 | 474 | PVMFStatus InitNextValidClipInPlaylist(PVMFStatus* aStatus = NULL, int32 aSkipToTrack = -1, PVMFDataStreamFactory* aDataStreamFactory = NULL); |
475 | 475 | IMpeg4File* GetParserObjAtIndex(int32 aClipIndex = -1); |
476 | 476 |