Add new DemuxFilterStatus NO_DATA

Bug: 260651195
Test: test on cf_x86_tv-userdebug
Change-Id: I56619579ebf09b49d288254f2d77320cd5575d69
This commit is contained in:
Ray Chin
2022-12-13 17:50:59 +08:00
parent a9bffa86ad
commit 191f76bb38
3 changed files with 8 additions and 0 deletions

View File

@@ -39,4 +39,5 @@ enum DemuxFilterStatus {
LOW_WATER = 2,
HIGH_WATER = 4,
OVERFLOW = 8,
NO_DATA = 16,
}

View File

@@ -46,4 +46,9 @@ enum DemuxFilterStatus {
* discarded.
*/
OVERFLOW = 1 << 3,
/**
* Indicating there is no data coming to the filter.
*/
NO_DATA = 1 << 4,
}

View File

@@ -691,6 +691,8 @@ DemuxFilterStatus Filter::checkFilterStatusChange(uint32_t availableToWrite,
return DemuxFilterStatus::OVERFLOW;
} else if (availableToRead > highThreshold) {
return DemuxFilterStatus::HIGH_WATER;
} else if (availableToRead == 0) {
return DemuxFilterStatus::NO_DATA;
} else if (availableToRead < lowThreshold) {
return DemuxFilterStatus::LOW_WATER;
}