Android MediaPlayer Error/Info Code

來源:互聯網
上載者:User

標籤:

1. 常見錯誤error(-38, 0)

我覺得-38表示在當前的MediaPlayer狀態下,不能運行你的操作。

詳細怎樣做請參考:Android MediaPlayer

另外我在其它資料中。發現有人覺得-38定義在:pvmf_return_codes.h檔案裡:

-38: DRM clock is not available or cannot be read

0: Return code for pending completion

  /*   * DRM clock is not available or cannot be read   */   const PVMFStatus PVMFErrDrmClockError = (-38);  /*   * Return code for pending completion   */   const PVMFStatus PVMFPending = 0;


error (1, -2147483648)

1: 事實上代表MEDIA_ERROR_UNKNOWN
-2147483648: (0x80000000)沒有做什麼說明,實際上它也是代表unknown error

這中錯誤大多是在播放MP4的時候出現,主要原因是由於當前的機器不支援這樣的視頻編碼(H263。H264,MPEG-3等,不是視頻容器格式)

2. MediaError.h

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_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,    INFO_OUTPUT_BUFFERS_CHANGED = MEDIA_ERROR_BASE - 14,    // 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                       = DRM_ERROR_BASE - 5,    ERROR_DRM_CANNOT_HANDLE                 = DRM_ERROR_BASE - 6,    ERROR_DRM_TAMPER_DETECTED               = DRM_ERROR_BASE - 7,    ERROR_DRM_NOT_PROVISIONED               = DRM_ERROR_BASE - 8,    ERROR_DRM_DEVICE_REVOKED                = DRM_ERROR_BASE - 9,    ERROR_DRM_RESOURCE_BUSY                 = DRM_ERROR_BASE - 10,    ERROR_DRM_VENDOR_MAX                    = DRM_ERROR_BASE - 500,    ERROR_DRM_VENDOR_MIN                    = DRM_ERROR_BASE - 999,    // Heartbeat Error Codes    HEARTBEAT_ERROR_BASE = -3000,    ERROR_HEARTBEAT_TERMINATE_REQUESTED                     = HEARTBEAT_ERROR_BASE,};


3. MediaPlayer

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 the file.See AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.OnInfoListener Constant Value: 801 (0x00000321) public static final int MEDIA_INFO_UNKNOWN Added in API level 3 Unspecified media player info.See AlsoMediaPlayer.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 AlsoMediaPlayer.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 AlsoMediaPlayer.OnInfoListener Constant Value: 700 (0x000002bc) 


Android MediaPlayer Error/Info Code

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.