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

Commit 9cd5f811 authored by Marco Nelissen's avatar Marco Nelissen Committed by Gerrit Code Review
Browse files

Merge "Tuning the number of packets for one read in StreamingSource"

parents 140359b7 8cf4ced8
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);