/vendor/widevine portion of removing YouTube-specific error codes
Multi-repository change. See also update to MediaErrors.h in a separate CL. related-to-bug: 5883949 Change-Id: I505486a86a87b690aa13f813f4b88edd386382ce
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
#include "WVMMediaSource.h"
|
#include "WVMMediaSource.h"
|
||||||
#include "WVMFileSource.h"
|
#include "WVMFileSource.h"
|
||||||
#include "WVMExtractorImpl.h"
|
#include "WVMExtractorImpl.h"
|
||||||
#include "WVMErrorCodes.h"
|
|
||||||
#include "media/stagefright/foundation/ADebug.h"
|
#include "media/stagefright/foundation/ADebug.h"
|
||||||
#include "media/stagefright/MediaErrors.h"
|
#include "media/stagefright/MediaErrors.h"
|
||||||
#include "media/stagefright/MediaDefs.h"
|
#include "media/stagefright/MediaDefs.h"
|
||||||
@@ -268,35 +267,26 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
|||||||
|
|
||||||
status_t status;
|
status_t status;
|
||||||
|
|
||||||
switch(result) {
|
if (result >= WV_Status_Min_TP_Error && result <= WV_Status_Max_TP_Error) {
|
||||||
case WV_Status_End_Of_Media:
|
// handle the third party error code range by mapping to a reserved
|
||||||
status = ERROR_END_OF_STREAM;
|
// vendor defined range of media player error codes
|
||||||
break;
|
status = ERROR_DRM_WV_VENDOR_MIN + result - WV_Status_Min_TP_Error;
|
||||||
case WV_Status_Terminate_Requested:
|
} else {
|
||||||
status = ERROR_HEARTBEAT_TERMINATE_REQUESTED;
|
switch(result) {
|
||||||
break;
|
case WV_Status_End_Of_Media:
|
||||||
case YT_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT:
|
status = ERROR_END_OF_STREAM;
|
||||||
status = ERROR_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT;
|
break;
|
||||||
break;
|
case WV_Status_Terminate_Requested:
|
||||||
case YT_HEARTBEAT_CONCURRENT_PLAYBACK:
|
status = ERROR_HEARTBEAT_TERMINATE_REQUESTED;
|
||||||
status = ERROR_HEARTBEAT_CONCURRENT_PLAYBACK;
|
break;
|
||||||
break;
|
default:
|
||||||
case YT_HEARTBEAT_UNUSUAL_ACTIVITY:
|
if (mLogOnce) {
|
||||||
status = ERROR_HEARTBEAT_UNUSUAL_ACTIVITY;
|
ALOGE("WV_GetEsData returned ERROR %d in WVMMediaSource::read\n", result);
|
||||||
break;
|
mLogOnce = false;
|
||||||
case YT_HEARTBEAT_STREAMING_UNAVAILABLE:
|
}
|
||||||
status = ERROR_HEARTBEAT_STREAMING_UNAVAILABLE;
|
status = ERROR_IO;
|
||||||
break;
|
break;
|
||||||
case YT_HEARTBEAT_CANNOT_ACTIVATE_RENTAL:
|
|
||||||
status = ERROR_HEARTBEAT_CANNOT_ACTIVATE_RENTAL;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (mLogOnce) {
|
|
||||||
ALOGE("WV_GetEsData returned ERROR %d in WVMMediaSource::read\n", result);
|
|
||||||
mLogOnce = false;
|
|
||||||
}
|
}
|
||||||
status = ERROR_IO;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mediaBuf->release();
|
mediaBuf->release();
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
enum {
|
|
||||||
// YouTube Heartbeat error codes
|
|
||||||
YT_HEARTBEAT_CANNOT_AUTHENTICATE = 513,
|
|
||||||
YT_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT = 514,
|
|
||||||
YT_HEARTBEAT_CONCURRENT_PLAYBACK = 515,
|
|
||||||
YT_HEARTBEAT_UNUSUAL_ACTIVITY = 516,
|
|
||||||
YT_HEARTBEAT_STREAMING_UNAVAILABLE = 517,
|
|
||||||
YT_HEARTBEAT_CANNOT_ACTIVATE_RENTAL = 518,
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user