Project import generated by Copybara.

GitOrigin-RevId: 9295f8ea2339edb71073695ed4fb3fded2f48c60
This commit is contained in:
MediaPipe Team
2020-08-13 01:32:08 -04:00
committed by chuoling
parent 6b0ab0e012
commit d7c287c4e9
248 changed files with 10356 additions and 5328 deletions
@@ -40,11 +40,13 @@ void OutputStreamShard::SetNextTimestampBound(Timestamp bound) {
return;
}
next_timestamp_bound_ = bound;
updated_next_timestamp_bound_ = next_timestamp_bound_;
}
void OutputStreamShard::Close() {
closed_ = true;
next_timestamp_bound_ = Timestamp::Done();
updated_next_timestamp_bound_ = next_timestamp_bound_;
}
bool OutputStreamShard::IsClosed() const { return closed_; }
@@ -122,6 +124,7 @@ Status OutputStreamShard::AddPacketInternal(T&& packet) {
// Otherwise, moves the packet into output_queue_.
output_queue_.push_back(std::forward<T>(packet));
next_timestamp_bound_ = timestamp.NextAllowedInStream();
updated_next_timestamp_bound_ = next_timestamp_bound_;
// TODO debug log?
@@ -152,6 +155,7 @@ Timestamp OutputStreamShard::LastAddedPacketTimestamp() const {
void OutputStreamShard::Reset(Timestamp next_timestamp_bound, bool close) {
output_queue_.clear();
next_timestamp_bound_ = next_timestamp_bound;
updated_next_timestamp_bound_ = Timestamp::Unset();
closed_ = close;
}