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

Commit 22c74105 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "NuPlayer2Driver: send MEDIA2_INFO_DATA_SOURCE_REPEAT when looping"

parents 84cca0ae 9af566a4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -107,6 +107,9 @@ enum media2_info_type {
    // The player just completed the playback of all data sources.
    // But this is not visible in native code. Just keep this entry for completeness.
    MEDIA2_INFO_DATA_SOURCE_LIST_END = 6,
    // The player just completed an iteration of playback loop. This event is sent only when
    // looping is enabled.
    MEDIA2_INFO_DATA_SOURCE_REPEAT = 7,

    //1xx
    // The player just prepared a data source.
+6 −1
Original line number Diff line number Diff line
@@ -930,7 +930,12 @@ void NuPlayer2Driver::notifyListener_l(
                            // the last little bit of audio. In looping mode, we need to restart it.
                            mAudioSink->start();
                        }
                        // don't send completion event when looping

                        sp<AMessage> notify = new AMessage(kWhatNotifyListener, this);
                        notify->setInt64("srcId", srcId);
                        notify->setInt32("messageId", MEDIA2_INFO);
                        notify->setInt32("ext1", MEDIA2_INFO_DATA_SOURCE_REPEAT);
                        notify->post();
                        return;
                    }
                    if (property_get_bool("persist.debug.sf.stats", false)) {