TextOverlay Timing

James jam at tigger.ws
Wed Mar 8 22:09:54 UTC 2023


I have an application that may preview or may preview and record a video feed.
There is a GUI overlay setup. The overlay is dynamic.
At start of preview or record the overlay is automatically inherited.
The preview and record are handled by seperate processes which are compiled C code.
Since I have encountered an issue all debugging is on.
waitForStarted and waitForFinished are used appropriately

The problem is intermitent about 1 in 3 times

preview

record (gets no textoverlay update)

logs show

 [record1]
    [startRecord] chan:1 tellDBUS:1
      PREVIEW -> RECORDING
      terminate preview[1]
      [ manageTitlebar] 1 recording
          /usr/bin/titlebar 1.rec
      sets> channel1/path = /home/dvr
      sets> vumeter/source1 alsa_input.usb-0d8c_USB_Sound_Device-00.analog-stereo
      sets> bitrate = 4000 Kb/s
      start to record
      [workFile/]
      dvrRecord 1 /dev/video0 alsa_input.usb-0d8c_USB_Sound_Device-00.analog-stereo /home/dvr/Channel1.09Mar2023.045730.mp4 0x1a00006
      start timer
    dbus> record 1
  [dbusAction/ 04:57:30] toolbar record 1
record1 [data handler] file:/dev/shm/c1.gst
read /dev/shm/c1.gst 30
C:font-desc="Sans oblique 11"
set object> font_desc Sans oblique 11
record1 [data handler] file:/dev/shm/c1.gst
record1 read /dev/shm/c1.gst 65
record1 O1:text="hello" font-desc="Sans oblique 11" deltax=20 deltay=150

record1 set object> [O1] text="hello" font-desc="Sans oblique 11" deltax=20 deltay=150
record1 [data handler] file:/dev/shm/c1.gst
record1 read /dev/shm/c1.gst 61
record1 O2:text="c" font-desc="Sans oblique 11" deltax=20 deltay=195

From the overlay GUI

[dbusAction] toolbar record 1
----JFUNC> C:font-desc="Sans oblique 11"
----JFUNC> [doInt] 19983
----JFUNC> [drawLine] 1-1
----JFUNC>   O1:text="hello" font-desc="Sans oblique 11" deltax=20 deltay=150
----JFUNC>   [doInt] 19983
----JFUNC> [drawLine] 1-2
----JFUNC>   O2:text="c" font-desc="Sans oblique 11" deltax=20 deltay=195
----JFUNC>   [doInt] 19983

Later all works normally. On i3 or i7 the problem does not occur, first time I'm using Rysan

Since the overlay does NOT appear when the recording process has received the message and updated GST

#                  if DEBUG & 1
                    g_print ("set object> [%s] text=\"%s\" font-desc=\"%s\" deltax=%d deltay=%d\n",
                    elementName, text, font, xval, yval);
#                  endif
                    g_object_set (line, "text", text, "font-desc", font, "deltax", xval, "deltay", yval, NULL);

And occurs at startup only, and Rysan only, this must be a timing problem.
Waiting (an arbitary) 500mS after the program starts does NOT solve the issue.
Is there any feedback from GST to say ready-for-overlay-now
The clockoverlay does NOT accept font-desc when textoverlay wont accept text

James


More information about the gstreamer-devel mailing list