@@ -454,12 +454,12 @@ class OutputShardAccessBase {
454
454
if (output_) output_->SetNextTimestampBound (timestamp);
455
455
}
456
456
457
- bool IsClosed () { return output_ ? output_->IsClosed () : true ; }
457
+ bool IsClosed () const { return output_ ? output_->IsClosed () : true ; }
458
458
void Close () {
459
459
if (output_) output_->Close ();
460
460
}
461
461
462
- bool IsConnected () { return output_ != nullptr ; }
462
+ bool IsConnected () const { return output_ != nullptr ; }
463
463
464
464
protected:
465
465
const CalculatorContext& context_;
@@ -559,7 +559,7 @@ class InputShardAccess : public Packet<T> {
559
559
PacketBase packet () const && { return *this ; }
560
560
561
561
bool IsDone () const { return stream_->IsDone (); }
562
- bool IsConnected () { return stream_ != nullptr ; }
562
+ bool IsConnected () const { return stream_ != nullptr ; }
563
563
564
564
PacketBase Header () const { return FromOldPacket (stream_->Header ()); }
565
565
@@ -619,7 +619,7 @@ class InputSidePacketAccess : public Packet<T> {
619
619
const PacketBase& packet () const & { return *this ; }
620
620
PacketBase packet () const && { return *this ; }
621
621
622
- bool IsConnected () { return connected_; }
622
+ bool IsConnected () const { return connected_; }
623
623
624
624
private:
625
625
InputSidePacketAccess (const mediapipe::Packet* packet)
@@ -639,8 +639,8 @@ class InputShardOrSideAccess : public Packet<T> {
639
639
PacketBase packet () const && { return *this ; }
640
640
641
641
bool IsDone () const { return stream_->IsDone (); }
642
- bool IsConnected () { return connected_; }
643
- bool IsStream () { return stream_ != nullptr ; }
642
+ bool IsConnected () const { return connected_; }
643
+ bool IsStream () const { return stream_ != nullptr ; }
644
644
645
645
PacketBase Header () const { return FromOldPacket (stream_->Header ()); }
646
646
@@ -662,7 +662,7 @@ class InputShardOrSideAccess : public Packet<T> {
662
662
663
663
class PacketTypeAccess {
664
664
public:
665
- bool IsConnected () { return packet_type_ != nullptr ; }
665
+ bool IsConnected () const { return packet_type_ != nullptr ; }
666
666
667
667
protected:
668
668
PacketTypeAccess (PacketType* pt) : packet_type_(pt) {}
@@ -675,7 +675,7 @@ class PacketTypeAccess {
675
675
676
676
class PacketTypeAccessFallback : public PacketTypeAccess {
677
677
public:
678
- bool IsStream () { return is_stream_; }
678
+ bool IsStream () const { return is_stream_; }
679
679
680
680
private:
681
681
PacketTypeAccessFallback (PacketType* pt, bool is_stream)
0 commit comments