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

Commit cb09c034 authored by James Dong's avatar James Dong
Browse files

Added some debugging log messages at stop()

There are so many cases where the codecs just could not stopped ...

Change-Id: If9ff261fcd4726c2ee21ec7c9336ca9c2917d399
parent 05ea6434
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ status_t MPEG4Writer::pause() {
}

void MPEG4Writer::stopWriterThread() {
    LOGV("stopWriterThread");
    LOGD("Stopping writer thread");

    {
        Mutex::Autolock autolock(mLock);
@@ -517,6 +517,7 @@ void MPEG4Writer::stopWriterThread() {

    void *dummy;
    pthread_join(mThread, &dummy);
    LOGD("Writer thread stopped");
}

status_t MPEG4Writer::stop() {
@@ -1228,6 +1229,7 @@ status_t MPEG4Writer::Track::pause() {
}

status_t MPEG4Writer::Track::stop() {
    LOGD("Stopping %s track", mIsAudio? "Audio": "Video");
    if (mDone) {
        return OK;
    }
@@ -1239,6 +1241,7 @@ status_t MPEG4Writer::Track::stop() {

    status_t err = (status_t) dummy;

    LOGD("Stopping %s track source", mIsAudio? "Audio": "Video");
    {
        status_t status = mSource->stop();
        if (err == OK && status != OK && status != ERROR_END_OF_STREAM) {
@@ -1246,6 +1249,7 @@ status_t MPEG4Writer::Track::stop() {
        }
    }

    LOGD("%s track stopped", mIsAudio? "Audio": "Video");
    return err;
}