Project import generated by Copybara.

GitOrigin-RevId: d8caa66de45839696f5bd0786ad3bfbcb9cff632
This commit is contained in:
MediaPipe Team
2020-12-09 22:43:33 -05:00
committed by chuoling
parent f15da632de
commit 2b58cceec9
750 changed files with 22901 additions and 9478 deletions
+8 -8
View File
@@ -34,7 +34,7 @@ const std::string& OutputStreamShard::Name() const {
void OutputStreamShard::SetNextTimestampBound(Timestamp bound) {
if (!bound.IsAllowedInStream() && bound != Timestamp::OneOverPostStream()) {
output_stream_spec_->TriggerErrorCallback(
::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
<< "In stream \"" << Name()
<< "\", timestamp bound set to illegal value: " << bound.DebugString());
return;
@@ -54,7 +54,7 @@ bool OutputStreamShard::IsClosed() const { return closed_; }
void OutputStreamShard::SetOffset(TimestampDiff offset) {
if (output_stream_spec_->locked_intro_data) {
output_stream_spec_->TriggerErrorCallback(
::mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
<< "SetOffset must be called from Calculator::Open(). Stream: \""
<< output_stream_spec_->name << "\".");
return;
@@ -66,7 +66,7 @@ void OutputStreamShard::SetOffset(TimestampDiff offset) {
void OutputStreamShard::SetHeader(const Packet& header) {
if (closed_) {
output_stream_spec_->TriggerErrorCallback(
::mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
<< "SetHeader must be called before the stream is closed. Stream: \""
<< output_stream_spec_->name << "\".");
return;
@@ -74,7 +74,7 @@ void OutputStreamShard::SetHeader(const Packet& header) {
if (output_stream_spec_->locked_intro_data) {
output_stream_spec_->TriggerErrorCallback(
::mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
<< "SetHeader must be called from Calculator::Open(). Stream: \""
<< output_stream_spec_->name << "\".");
return;
@@ -96,18 +96,18 @@ const Packet& OutputStreamShard::Header() const {
template <typename T>
Status OutputStreamShard::AddPacketInternal(T&& packet) {
if (IsClosed()) {
return ::mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
return mediapipe::FailedPreconditionErrorBuilder(MEDIAPIPE_LOC)
<< "Packet sent to closed stream \"" << Name() << "\".";
}
if (packet.IsEmpty()) {
return ::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
return mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
<< "Empty packet sent to stream \"" << Name() << "\".";
}
const Timestamp timestamp = packet.Timestamp();
if (!timestamp.IsAllowedInStream()) {
return ::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
return mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
<< "In stream \"" << Name()
<< "\", timestamp not specified or set to illegal value: "
<< timestamp.DebugString();
@@ -128,7 +128,7 @@ Status OutputStreamShard::AddPacketInternal(T&& packet) {
// TODO debug log?
return ::mediapipe::OkStatus();
return mediapipe::OkStatus();
}
void OutputStreamShard::AddPacket(const Packet& packet) {