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

Commit 008d15d3 authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am ee178668: Use incremental updates sent by surface flinger

* commit 'ee178668':
  Use incremental updates sent by surface flinger
parents 4cb8a163 ee178668
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ status_t Converter::initEncoder() {
        mOutputFormat->setInt32("bitrate", audioBitrate);
        mOutputFormat->setInt32("bitrate", audioBitrate);
    } else {
    } else {
        mOutputFormat->setInt32("bitrate", videoBitrate);
        mOutputFormat->setInt32("bitrate", videoBitrate);
        mOutputFormat->setInt32("frame-rate", 24);
        mOutputFormat->setInt32("frame-rate", 60);
        mOutputFormat->setInt32("i-frame-interval", 1);  // Iframes every 1 secs
        mOutputFormat->setInt32("i-frame-interval", 1);  // Iframes every 1 secs
        // mOutputFormat->setInt32("prepend-sps-pps-to-idr-frames", 1);
        // mOutputFormat->setInt32("prepend-sps-pps-to-idr-frames", 1);
    }
    }
+3 −5
Original line number Original line Diff line number Diff line
@@ -267,7 +267,7 @@ WifiDisplaySource::PlaybackSession::PlaybackSession(
      mSendSRPending(false),
      mSendSRPending(false),
      mHistoryLength(0)
      mHistoryLength(0)
#if TRACK_BANDWIDTH
#if TRACK_BANDWIDTH
      ,mFirstPacketTimeUs(-1ll),
      ,mFirstPacketTimeUs(-1ll)
      ,mTotalBytesSent(0ll)
      ,mTotalBytesSent(0ll)
#endif
#endif
#if LOG_TRANSPORT_STREAM
#if LOG_TRANSPORT_STREAM
@@ -885,10 +885,8 @@ status_t WifiDisplaySource::PlaybackSession::addVideoSource() {


    source->setUseAbsoluteTimestamps();
    source->setUseAbsoluteTimestamps();


    sp<MediaSource> videoSource = new RepeaterSource(source, 24.0f);

    size_t numInputBuffers;
    size_t numInputBuffers;
    status_t err = addSource(true /* isVideo */, videoSource, &numInputBuffers);
    status_t err = addSource(true /* isVideo */, source, &numInputBuffers);


    if (err != OK) {
    if (err != OK) {
        return err;
        return err;
@@ -1122,7 +1120,7 @@ ssize_t WifiDisplaySource::PlaybackSession::appendTSData(
            int64_t delayUs = ALooper::GetNowUs() - mFirstPacketTimeUs;
            int64_t delayUs = ALooper::GetNowUs() - mFirstPacketTimeUs;


            if (delayUs > 0ll) {
            if (delayUs > 0ll) {
                ALOGV("approx. net bandwidth used: %.2f Mbit/sec",
                ALOGI("approx. net bandwidth used: %.2f Mbit/sec",
                        mTotalBytesSent * 8.0 / delayUs);
                        mTotalBytesSent * 8.0 / delayUs);
            }
            }
#endif
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -539,7 +539,7 @@ status_t WifiDisplaySource::sendM4(int32_t sessionID) {
    //   use "78 00 02 02 00008000 00000000 00000000 00 0000 0000 00 none none\r\n"
    //   use "78 00 02 02 00008000 00000000 00000000 00 0000 0000 00 none none\r\n"
    AString body = StringPrintf(
    AString body = StringPrintf(
        "wfd_video_formats: "
        "wfd_video_formats: "
        "78 00 02 02 00008000 00000000 00000000 00 0000 0000 00 none none\r\n"
        "30 00 02 02 00000040 00000000 00000000 00 0000 0000 00 none none\r\n"
        "wfd_audio_codecs: AAC 00000001 00\r\n"  // 2 ch AAC 48kHz
        "wfd_audio_codecs: AAC 00000001 00\r\n"  // 2 ch AAC 48kHz
        "wfd_presentation_URL: rtsp://%s/wfd1.0/streamid=0 none\r\n"
        "wfd_presentation_URL: rtsp://%s/wfd1.0/streamid=0 none\r\n"
        "wfd_client_rtp_ports: RTP/AVP/%s;unicast 19000 0 mode=play\r\n",
        "wfd_client_rtp_ports: RTP/AVP/%s;unicast 19000 0 mode=play\r\n",