/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 "WVMFileSource.h"
|
||||
#include "WVMExtractorImpl.h"
|
||||
#include "WVMErrorCodes.h"
|
||||
#include "media/stagefright/foundation/ADebug.h"
|
||||
#include "media/stagefright/MediaErrors.h"
|
||||
#include "media/stagefright/MediaDefs.h"
|
||||
@@ -268,6 +267,11 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
|
||||
status_t status;
|
||||
|
||||
if (result >= WV_Status_Min_TP_Error && result <= WV_Status_Max_TP_Error) {
|
||||
// handle the third party error code range by mapping to a reserved
|
||||
// vendor defined range of media player error codes
|
||||
status = ERROR_DRM_WV_VENDOR_MIN + result - WV_Status_Min_TP_Error;
|
||||
} else {
|
||||
switch(result) {
|
||||
case WV_Status_End_Of_Media:
|
||||
status = ERROR_END_OF_STREAM;
|
||||
@@ -275,21 +279,6 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
case WV_Status_Terminate_Requested:
|
||||
status = ERROR_HEARTBEAT_TERMINATE_REQUESTED;
|
||||
break;
|
||||
case YT_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT:
|
||||
status = ERROR_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT;
|
||||
break;
|
||||
case YT_HEARTBEAT_CONCURRENT_PLAYBACK:
|
||||
status = ERROR_HEARTBEAT_CONCURRENT_PLAYBACK;
|
||||
break;
|
||||
case YT_HEARTBEAT_UNUSUAL_ACTIVITY:
|
||||
status = ERROR_HEARTBEAT_UNUSUAL_ACTIVITY;
|
||||
break;
|
||||
case YT_HEARTBEAT_STREAMING_UNAVAILABLE:
|
||||
status = ERROR_HEARTBEAT_STREAMING_UNAVAILABLE;
|
||||
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);
|
||||
@@ -298,6 +287,7 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
status = ERROR_IO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mediaBuf->release();
|
||||
return status;
|
||||
|
||||
@@ -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