Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdfd48df authored by Sudhir Sharma's avatar Sudhir Sharma Committed by Steve Kondik
Browse files

frameworks/av: Add support for Quality Of Experience (QOE) events in MediaPlayer

- Add MEDIA_QOE event type
- Allow MEDIA_QOE event to be passed to Application after reset
  is completed, similar to MEDIA_ERROR

Change-Id: I71e3d9e1f5f934c5844d80c65c653b2702a22ca1
parent d42f0662
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ enum media_event_type {
    MEDIA_TIMED_TEXT        = 99,
    MEDIA_ERROR             = 100,
    MEDIA_INFO              = 200,
    MEDIA_QOE               = 300,
};

// Generic error codes for the media player framework.  Errors are fatal, the
+4 −1
Original line number Diff line number Diff line
@@ -683,7 +683,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
    }

    // Allows calls from JNI in idle state to notify errors
    if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) {
    if (!((msg == MEDIA_ERROR || msg == MEDIA_QOE) && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) {
        ALOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2);
        if (locked) mLock.unlock();   // release the lock when done.
        return;
@@ -756,6 +756,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
    case MEDIA_TIMED_TEXT:
        ALOGV("Received timed text message");
        break;
    case MEDIA_QOE:
        ALOGV("Received QOE Message for event : %d",ext2);
        break;
    default:
        ALOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2);
        break;