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

Commit 2b4f1f4c authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am f72dd019: Merge "Disable 10secs forward/backward seeking for rtsp as seek...

am f72dd019: Merge "Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality." into gingerbread

Merge commit 'f72dd019' into gingerbread-plus-aosp

* commit 'f72dd019':
  Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality.
parents 5dcf588a f72dd019
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ class Metadata {
    static const Type kPauseAvailable = 29;        // Boolean
    static const Type kSeekBackwardAvailable = 30; // Boolean
    static const Type kSeekForwardAvailable = 31;  // Boolean
    static const Type kSeekAvailable = 32;         // Boolean

    // @param p[inout] The parcel to append the metadata records
    // to. The global metadata header should have been set already.
+4 −3
Original line number Diff line number Diff line
@@ -45,13 +45,14 @@ public:
    virtual sp<MetaData> getMetaData();

    enum Flags {
        CAN_SEEK_BACKWARD  = 1,
        CAN_SEEK_FORWARD   = 2,
        CAN_SEEK_BACKWARD  = 1,  // the "seek 10secs back button"
        CAN_SEEK_FORWARD   = 2,  // the "seek 10secs forward button"
        CAN_PAUSE          = 4,
        CAN_SEEK           = 8,  // the "seek bar"
    };

    // If subclasses do _not_ override this, the default is
    // CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_PAUSE
    // CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_SEEK | CAN_PAUSE
    virtual uint32_t flags() const;

protected:
+2 −1
Original line number Diff line number Diff line
@@ -102,8 +102,9 @@ public class Metadata
    public static final int PAUSE_AVAILABLE = 29;         // Boolean
    public static final int SEEK_BACKWARD_AVAILABLE = 30; // Boolean
    public static final int SEEK_FORWARD_AVAILABLE = 31;  // Boolean
    public static final int SEEK_AVAILABLE = 32;          // Boolean

    private static final int LAST_SYSTEM = 31;
    private static final int LAST_SYSTEM = 32;
    private static final int FIRST_CUSTOM = 8192;

    // Shorthands to set the MediaPlayer's metadata filter.
+4 −0
Original line number Diff line number Diff line
@@ -180,6 +180,10 @@ status_t StagefrightPlayer::getMetadata(
            Metadata::kSeekForwardAvailable,
            flags & MediaExtractor::CAN_SEEK_FORWARD);

    metadata.appendBool(
            Metadata::kSeekAvailable,
            flags & MediaExtractor::CAN_SEEK);

    return OK;
}

+1 −3
Original line number Diff line number Diff line
@@ -868,9 +868,7 @@ status_t AwesomePlayer::getPosition(int64_t *positionUs) {
}

status_t AwesomePlayer::seekTo(int64_t timeUs) {
    if (mExtractorFlags
            & (MediaExtractor::CAN_SEEK_FORWARD
                | MediaExtractor::CAN_SEEK_BACKWARD)) {
    if (mExtractorFlags & MediaExtractor::CAN_SEEK) {
        Mutex::Autolock autoLock(mLock);
        return seekTo_l(timeUs);
    }
Loading