How to monitor whether proper I-frame is received or not

We are using below pipeline to stream the video , But when we start it that time IDR frame is missed and its showing blank screen until we get the next IDR frame.

In logs we see -
94202 2024/10/22 23:26:42.615053 1142.9352 4 ECU1 AVB GSTR 617 log info verbose 2 broken/invalid nal Type: 1 Slice, Size: 7294 will be dropped
94213 2024/10/22 23:26:42.675893 1142.9725 5 ECU1 AVB GSTR 617 log info verbose 2 broken/invalid nal Type: 1 Slice, Size: 2442 will be dropped

Pipeline used :
pipeline.pipeline = gst_parse_launch (“v4l2src device=/dev/video0 ! video/x-h264, width=1920, height=720, framerate=30/1, stream-format=byte-stream ! h264parse ! omxh264dec ! queue max-size-time=400000000 ! vspfilter devfile-input=/dev/video11 devfile-output=/dev/video12 ! video/x-raw, format="BGRA", width=1920, height=720 ! kmssink driver-name=rcar-du connector-id=60 plane-id=34 sync=true”, &error);

Qusetion is -

  1. How to monitor if IDR frame is missed ?
  2. is there any way to monitor the IDR frame for user application side ? becasue atleast if we miss the IDR frame then until we get next IDR frame we can show some message on the screen instead of blank screen.
  3. is there any way to check for invalid frame ?

Done…Implemented working solution