1. ホーム
  2. Android

android MediaPlayerのエラーコード(エラーコード)まとめ

2022-02-21 07:59:25

  android.mediaで定義されているエラーメッセージです。

public static final int MEDIA_ERROR_IO 
Added in API level 17 File or network related operation errors. 

Constant Value: -1004 (0xfffffc14) 
public static final int MEDIA_ERROR_MALFORMED 
Added in API level 17 Bitstream is not conforming to the related coding standard or file spec. 

Constant Value: -1007 (0xfffffc11) 
public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK 
Added in API level 3 The video is streamed and its container is not valid for progressive playback i.e the video's index (e.g moov atom) is not at the start of i.e the video's index (e.g moov atom) is not at the start of the file.

See Also
MediaPlayer.OnErrorListener 
Constant Value: 200 (0x000000c8) 
public static final int MEDIA_ERROR_SERVER_DIED 
Added in API level 1 Media server died. In this case, the application must release the MediaPlayer object and instantiate a new one.

See Also
MediaPlayer.OnErrorListener 
Constant Value: 100 (0x00000064) 
public static final int MEDIA_ERROR_TIMED_OUT 
Added in API level 17 Some operation takes too long to complete, usually more than 3-5 seconds. 

Constant Value: -110 (0xffffff92) 
public static final int MEDIA_ERROR_UNKNOWN 
Added in API level 1 Unspecified media player error.

See Also
MediaPlayer.OnErrorListener 
Constant Value: 1 (0x00000001) 
public static final int MEDIA_ERROR_UNSUPPORTED 
Added in API level 17 Bitstream is conforming to the related coding standard or file spec, but the media framework does not support the feature. 

Constant Value: -1010 (0xfffffc0e) 
public static final int MEDIA_INFO_BAD_INTERLEAVING 
Added in API level 3 Bad interleaving means that a media has been improperly interleaved or not interleaved at all, e.g has all the video samples first then all the audio ones. Video is playing but a lot of disk seeks may be happening.

See Also
MediaPlayer.OnInfoListener 
Constant Value: 800 (0x00000320) 
public static final int MEDIA_INFO_BUFFERING_END 
Added in API level 9 MediaPlayer is resuming playback after filling buffers.

See Also
OnInfoListener 
Constant Value: 702 (0x000002be) 
public static final int MEDIA_INFO_BUFFERING_START 
Added in API level 9 MediaPlayer is temporarily pausing playback internally in order to buffer more data.

See Also
OnInfoListener 
Constant Value: 701 (0x000002bd) 
public static final int MEDIA_INFO_METADATA_UPDATE 
Added in API level 5 A new set of metadata is available.

See Also
OnInfoListener 
Constant Value: 802 (0x00000322) 
public static final int MEDIA_INFO_NOT_SEEKABLE 
Added in API level 3 The media cannot be seeked (e.g live stream)

See Also
OnInfoListener 
Constant Value: 801 (0x00000321) 
public static final int MEDIA_INFO_UNKNOWN 
Added in API level 3 Unspecified media player info.

See Also
MediaPlayer.OnInfoListener 
Constant Value: 1 (0x00000001) 
public static final int MEDIA_INFO_VIDEO_RENDERING_START 
Added in API level 17 The player just pushed the very first video frame for rendering.

See Also
OnInfoListener 
Constant Value: 3 (0x00000003) 
public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING 
Added in API level 3 The video is too complex for the decoder: it can't decode frames fast enough. Possibly only the audio plays fine at this stage.

See Also
MediaPlayer.OnInfoListener 
Constant Value: 700 (0x000002bc) 






Androidのソースコードです。\frameworks (baseincludemedia)

/*
 * Copyright (C) 2009 The Android Open Source Project
 * License under the Apache License, Version 2.0 (the "License")
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *You may not use this file except in compliance with the License.
 * http://www.apache.org/licenses/LICENSE-2.0
 *You may not use this file except in compliance with the License.
 * Unless required by applicable law or agreed to in writing, software
 * Unless required by applicable law or agreed in writing, software distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and * limitations under the License.
 */

#ifndef MEDIA_ERRORS_H_

#define MEDIA_ERRORS_H_

#include <utils/Errors.h>

namespace android {

enum {
    MEDIA_ERROR_BASE = -1000,

    ERROR_ALREADY_CONNECTED = MEDIA_ERROR_BASE,
    ERROR_NOT_CONNECTED = MEDIA_ERROR_BASE - 1,
    ERROR_UNKNOWN_HOST = MEDIA_ERROR_BASE - 2,
    ERROR_CANNOT_CONNECT = MEDIA_ERROR_BASE - 3,
    ERROR_IO = MEDIA_ERROR_BASE - 4,
    ERROR_CONNECTION_LOST = MEDIA_ERROR_BASE - 5, ERROR_CONNECTION_LOST = MEDIA_ERROR_BASE - 5,
    ERROR_MALFORMED = MEDIA_ERROR_BASE - 7,
    ERROR_OUT_OF_RANGE = MEDIA_ERROR_BASE - 8,
    ERROR_BUFFER_TOO_SMALL = MEDIA_ERROR_BASE - 9,
    ERROR_UNSUPPORTED = MEDIA_ERROR_BASE - 10,
    ERROR_END_OF_STREAM = MEDIA_ERROR_BASE - 11,

    // Not technically an error.
    INFO_FORMAT_CHANGED = MEDIA_ERROR_BASE - 12,
    INFO_DISCONTINUITY = MEDIA_ERROR_BASE - 13,

    // The following constant values should be in sync with
    // drm/drm_framework_common.h
    DRM_ERROR_BASE = -2000,

    ERROR_DRM_UNKNOWN = DRM_ERROR_BASE,
    ERROR_DRM_NO_LICENSE = DRM_ERROR_BASE - 1,
    ERROR_DRM_LICENSE_EXPIRED = DRM_ERROR_BASE - 2,
    ERROR_DRM_SESSION_NOT_OPENED = DRM_ERROR_BASE - 3,
    ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED = DRM_ERROR_BASE - 4, ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED = DRM_ERROR_BASE - 4,
    ERROR_DRM_DECRYPT = DRM_ERROR_BASE - 5,
    ERROR_DRM_CANNOT_HANDLE = DRM_ERROR_BASE - 6, ERROR_DRM_CANNOT_HANDLE = DRM_ERROR_BASE - 6,
    ERROR_DRM_TAMPER_DETECTED = DRM_ERROR_BASE - 7,

    // Heartbeat Error Codes
    HEARTBEAT_ERROR_BASE = -3000,

    ERROR_HEARTBEAT_AUTHENTICATION_FAILURE = HEARTBEAT_ERROR_BASE,
    ERROR_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT = HEARTBEAT_ERROR_BASE - 1,
    ERROR_HEARTBEAT_CONCURRENT_PLAYBACK = HEARTBEAT_ERROR_BASE - 2,
    ERROR_HEARTBEAT_UNUSUAL_ACTIVITY = HEARTBEAT_ERROR_BASE - 3,
    ERROR_HEARTBEAT_STREAMING_UNAVAILABLE = HEARTBEAT_ERROR_BASE - 4,
    ERROR_HEARTBEAT_CANNOT_ACTIVATE_RENTAL = HEARTBEAT_ERROR_BASE - 5,
    ERROR_HEARTBEAT_TERMINATE_REQUESTED = HEARTBEAT_ERROR_BASE - 6,
};

} // namespace android

#endif // MEDIA_ERRORS_H_







http://sourceforge.net/p/android-x86/korg_external_opencore/ci/master/tree/pvmi/pvmf/include/pvmf_return_codes.h

/* ------------------------------------------------------------------
 * Copyright (C) 1998-2010 PacketVideo
 * Licensed under the Apache License, Version 2.0 (the "License")
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *You may not use this file except in compliance with the License.
 * http://www.apache.org/licenses/LICENSE-2.0
 *You may not use this file except in compliance with the License.
 * Unless required by applicable law or agreed to in writing, software
 Unless required by applicable law or agreed in writing, the software * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied.
 * See the License for the specific language governing permissions
 See the License for the specific language governing permissions * and limitations under the License.
 * -------------------------------------------------------------------
 */

/**
 * @file pv_return_codes.h
 * @brief This file defines the general return and event codes to be used by PVMF elements.
 Error codes are negative values and informational * codes are positive values.
 Error codes are negative values and informational * codes are positive values.
 * NOTE: If you add any new event, update the PVMFStatusToString method as well.
 */

#ifndef PVMF_RETURN_CODES_H_INCLUDED
#define PVMF_RETURN_CODES_H_INCLUDED

#ifndef OSCL_BASE_H_INCLUDED
#include "oscl_base.h"
#endif


typedef int32 PVMFStatus;

// Return codes
/*
 Return code for general success
 */
const PVMFStatus PVMFSuccess = 1;
/*
 Return code for pending completion
 */
const PVMFStatus PVMFPending = 0;
/*
 Return code for never set
 */
const PVMFStatus PVMFNotSet = 2;
/*
 Return code for Command Complete
 */
const PVMFStatus PVMFCmdCompleted = 3;


// Error codes (negative values)

/*
 Definition of first error event in range (not an actual error code).
 */
const PVMFStatus PVMFErrFirst = (-1);
/*
 Return code for general failure
 */
const PVMFStatus PVMFFailure = (-1);
/*
 Error due to cancellation
 */
const PVMFStatus PVMFErrCancelled = (-2);
/*
 Error due to no memory being available
 */
const PVMFStatus PVMFErrNoMemory = (-3);
/*
 Error due to request not being supported
 */
const PVMFStatus PVMFErrNotSupported = (-4);
/*
 Error due to invalid argument
 */
const PVMFStatus PVMFErrArgument = (-5);
/*
 Error due to invalid resource handle being specified
 */
const PVMFStatus PVMFErrBadHandle = (-6);
/*
 Error due to resource already exists and another one cannot be created
 */
const PVMFStatus PVMFErrAlreadyExists = (-7);
/*
 Error due to resource being busy and request cannot be handled
 */
const PVMFStatus PVMFErrBusy = (-8);
/*
 Error due to resource not ready to accept request
 */
const PVMFStatus PVMFErrNotReady = (-9);
/*
 Error due to data corruption being detected
 */
const PVMFStatus PVMFErrCorrupt = (-10);
/*
 Error due to request timing out
 */
const PVMFStatus PVMFErrTimeout = (-11);
/*
 Error due to general overflow
 */
const PVMFStatus PVMFErrOverflow = (-12);
/*
 Error due to general underflow
 */
const PVMFStatus PVMFErrUnderflow = (-13);
/*
 Error due to resource being in wrong state to handle request
 */
const PVMFStatus PVMFErrInvalidState = (-14);
/*
 Error due to resource not being available
 */
const PVMFStatus PVMFErrNoResources = (-15);
/*
 Error due to invalid configuration of resource
 */
const PVMFStatus PVMFErrResourceConfiguration = (-16);
/*
 Error due to general error in underlying resource
 */
const PVMFStatus PVMFErrResource = (-17);
/*
 Error due to general data processing
 */
con
const PVMFStatus PVMFErrDrmDeviceDataMismatch = (-45);
/*
DRM cryptography operation failed
*/
const PVMFStatus PVMFErrDrmCryptoError = (-46);
/*
DRM license not found, but a preview of the content is available.
/* DRM license not found, but a preview of the content is available.
const PVMFStatus PVMFErrDrmLicenseNotFoundPreviewAvailable = (-47);
/*
Error due to unable to communicate with server
*/
const PVMFStatus PVMFErrDrmServerError = (-48);
/*
Error when a license server requests registration to a domain.
*/
const PVMFStatus PVMFErrDrmDomainRequired = (-49);
/*
Error when a license server requests renewal of a domain registration.
*/
const PVMFStatus PVMFErrDrmDomainRenewRequired = (-50);
/*
Error when a license server reports that the device is not part of the domain.
*/
const PVMFStatus PVMFErrDrmDomainNotAMember = (-51);
/*
Error due to device currently not activated for drm-protected content playback
*/
const PVMFStatus PVMFErrDrmDeviceNotActivated = (-52);
/*
Service specific server error.
*/
const PVMFStatus PVMFErrDrmServerServiceSpecific = (-53);
/*
... This range reserved for future DRM-related errors
*/
/* ... this range reserved for future DRM-related errors */
DRM Operational Error not otherwise specified
*/
const PVMFStatus PVMFErrDrmOperationFailed = (-81);
/*
Error returned when the video container is not valid for progressive playback.
/* Error returned when the video container is not valid for progressive playback.
const PVMFStatus PVMFErrContentInvalidForProgressivePlayback = (-82);

/*
 Placeholder for last event in range.
 */
const PVMFStatus PVMFErrLast = (-100);
/*
 Macro to tell if a value is in PVMFErr range
 */
#define IsPVMFErrCode(s) ((PVMFErrLast<=s)&&(s<=PVMFErrFirst))

// Informational codes (positive values)

const PVMFStatus PVMFInfoFirst = 10;

/*
 Notification that a port was created
 */
const PVMFStatus PVMFInfoPortCreated = 10;
/*
 Notification that a port was deleted
 */
const PVMFStatus PVMFInfoPortDeleted = 11;
/*
 Notification that a port was connected
 */
const PVMFStatus PVMFInfoPortConnected = 12;
/*
 Notification that a port was disconnected
 */
const PVMFStatus PVMFInfoPortDisconnected = 13;
/*
 Notification that an overflow occurred (not fatal error)
 */
const PVMFStatus PVMFInfoOverflow = 14;
/*
 Notification that an underflow occurred (not fatal error)
 */
const PVMFStatus PVMFInfoUnderflow = 15;
/*
 Notification that a processing failure occurred (not fatal error)
 */
const PVMFStatus PVMFInfoProcessingFailure = 16;
/*
 Notification that end of data stream has been reached
 */
const PVMFStatus PVMFInfoEndOfData = 17;
/*
 Notification that a data buffer has been created
 */
const PVMFStatus PVMFInfoBufferCreated = 18;
/*
 Notification that buffering of data has started
 */
const PVMFStatus PVMFInfoBufferingStart = 19;
/*
 Notification for data buffering level status
 */
const PVMFStatus PVMFInfoBufferingStatus = 20;
/*
 Notification that data buffering has completed
 */
const PVMFStatus PVMFInfoBufferingComplete = 21;
/*
 Notification that data is ready for use
 */
const PVMFStatus PVMFInfoDataReady = 22;
/*
 Notification for position status
 */
const PVMFStatus PVMFInfoPositionStatus = 23;
/*
 Notification for node state change
 */
const PVMFStatus PVMFInfoStateChanged = 24;
/*
 Notification that data was discarded during synchronization.
 */
const PVMFStatus PVMFInfoDataDiscarded = 25;
/*
 Notification that error handling has started
 */
const PVMFStatus PVMFInfoErrorHandlingStart = 26;
/*
 Notification that error handling has completed
 */
const PVMFStatus PVMFInfoErrorHandlingComplete = 27;
/*
 Notification from a remote source
 */
const PVMFStatus PVMFInfoRemoteSourceNotification = 28;
/*
 Notification that license acquisition has started.
 */
const