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

Commit f4284584 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Tuning the number of packets for one read in StreamingSource" am: 9cd5f811 am: a4afeea0

am: 2a9cf2ee

* commit '2a9cf2ee':
  Tuning the number of packets for one read in StreamingSource
parents 5a2ab8f1 2a9cf2ee
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@

namespace android {

const int32_t kNumListenerQueuePackets = 80;

NuPlayer::StreamingSource::StreamingSource(
        const sp<AMessage> &notify,
        const sp<IStreamSource> &source)
@@ -84,7 +86,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
}

void NuPlayer::StreamingSource::onReadBuffer() {
    for (int32_t i = 0; i < 50; ++i) {
    for (int32_t i = 0; i < kNumListenerQueuePackets; ++i) {
        char buffer[188];
        sp<AMessage> extra;
        ssize_t n = mStreamListener->read(buffer, sizeof(buffer), &extra);