Let's take a look at mediaplayer. H's definition of the Error Type:
// Generic error codes for the Media Player framework. errors are fatal, The // playback must abort. /// errors are communicated back to the client using the // mediaplayerlistener: Policy method defined below. // In this situation, 'privacy y' is invoked with the following: // 'msg 'is set to media_error. // 'exp1' shoshould be a value from the enum media_error_type. // 'ext2' contains an implementation dependant error code to provide // more details. shoshould default to 0 when not used. /// the codes are distributed as follow: // 0xx: Reserved // 1xx: Android player errors. something went wrong inside the mediaplayer. // 2XX: Media errors (E. g codec not supported ). there is a problem with the // media itself. // 3xx: runtime errors. some extraordinary condition arose making the playback // impossible. // Enum media_error_type {// 0xx media_error_unknown = 1, // 1xx media_error_server_died = 100, // 2XX Limit = 200, // 3xx };
Common error types
1.-2147483648 unknown error
For example, log output:
Mediaplayer: Error (1,-2147483648)
The first parameter 1 of error indicates an unknown error.
The error code-2147483648 is in decimal format and corresponds to the hexadecimal value 0x80000000.
It is defined in the file:/frameworks/native/include/utils/errors. h
Unknown_error = 0x80000000,
This error is generally thrown in the libmediaplayerservice and libstagefright directories of the framework.
This error is thrown when an action is canceled or interrupted.
It is also a common error. If you do not know the cause of the error, you can also throw this error.
2.-107 network connection Error
For example, log output:
Mediaplayer: Error (1,-107)