To how make mediapipe graph input stream optional
Author: generalomoscoCreated Dec 1, 2023Updated Sep 30, 2026
Labelstype:supportstat:awaiting responseplatform:c++
I created a calculator and make MY_INPUT_INPUT_STREAM_DATA optional in c++ then in java anytime myInputEffectData is empty it will wait instead to pass the input! Is there any way to ignore this input stream or pass empty packet? I tried everything to pass empty byte array but it just raises errors.
MyInputProto.MyInput myInputEffectData;
This is not working.
if(myInputEffectData == null){
myInputEffectPacket= processor.getPacketCreator().createByteArray(new byte[0]);
processor .getGraph().addPacketToInputStream(MY_INPUT_INPUT_STREAM_DATA, myInputEffectPacket, timestamp);
}
Still not working too.
if(myInputEffectData == null){
myInputEffectPacket= null;
processor .getGraph().addPacketToInputStream(MY_INPUT_INPUT_STREAM_DATA, myInputEffectPacket, timestamp);
}
Source: google-ai-edge/mediapipe