Skip to content

How to invoke Calculator Process method when optional input packet is missing #6226

@Honya2000

Description

@Honya2000

Hello,
I declare my calculator contract this way:

  static constexpr Input<GpuBuffer> kInputTick{ kTickTag };
  static constexpr Input<GpuBuffer> kInputFallback{ kFallbackTag };
  static constexpr Input<GpuBuffer>::Optional kInput{ kInputTag };
  static constexpr Output<bool> kOutputPresence{ kPresenceTag };
  static constexpr Output<GpuBuffer> kOutput{ kOutputTag };

  MEDIAPIPE_NODE_CONTRACT(kInputTick, kInputFallback, kInput, kOutputPresence, kOutput);

During graph run i'm not supplying any packet to kInput tag, because i'm checking it presence in Process method (it declared Optional).

But problem is Process metod is not called for this calculator at all which causes whole graph deadlock.
How to setup graph node to call Process method even when some optional streams are missing?

I tried everything: cc->SetProcessTimestampBounds(true), cc->SetOffset(TimestampDiff(0)).

Nothing helps. Process method is never invoke for this calculator because it waits for kInput stream.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions