Tuner JNI: fix the DATA_READY and DATA_CONSUMED flags
Bug: 161481210 Test: cuttlefish Change-Id: Ifd8b03259eff2296d1420695176d34026ba586fd
This commit is contained in:
@@ -3497,6 +3497,10 @@ static jlong android_media_tv_Tuner_read_dvr(JNIEnv *env, jobject dvr, jlong siz
|
||||
} else {
|
||||
ALOGE("dvrMq.beginWrite failed");
|
||||
}
|
||||
|
||||
if (ret > 0) {
|
||||
dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_READY));
|
||||
}
|
||||
return (jlong) ret;
|
||||
}
|
||||
|
||||
@@ -3524,7 +3528,7 @@ static jlong android_media_tv_Tuner_read_dvr_from_array(
|
||||
|
||||
if (dvrSp->mDvrMQ->write(reinterpret_cast<unsigned char*>(src) + offset, size)) {
|
||||
env->ReleaseByteArrayElements(buffer, src, 0);
|
||||
dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_CONSUMED));
|
||||
dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_READY));
|
||||
} else {
|
||||
ALOGD("Failed to write FMQ");
|
||||
env->ReleaseByteArrayElements(buffer, src, 0);
|
||||
@@ -3585,6 +3589,9 @@ static jlong android_media_tv_Tuner_write_dvr(JNIEnv *env, jobject dvr, jlong si
|
||||
} else {
|
||||
ALOGE("dvrMq.beginRead failed");
|
||||
}
|
||||
if (ret > 0) {
|
||||
dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_CONSUMED));
|
||||
}
|
||||
|
||||
return (jlong) ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user