TextOverlay Timing

James jam at tigger.ws
Wed Mar 8 23:47:33 UTC 2023



> On 9 Mar 2023, at 6:09 am, James via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> 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

But waiting 1000 mS does work
so solvedish, unless someone can show me what to wait for

And coredumps show 

...
#10 0x00007fc977584129 in g_iconv_open () from /lib64/libglib-2.0.so.0
#11 0x00007fc9775845d4 in g_convert () from /lib64/libglib-2.0.so.0
#12 0x00007fc9775848e9 in g_convert_with_fallback () from /lib64/libglib-2.0.so.0
#13 0x00007fc9775ad6b1 in ?? () from /lib64/libglib-2.0.so.0
#14 0x00007fc9775ad8bc in ?? () from /lib64/libglib-2.0.so.0
#15 0x00007fc9775b0282 in g_print () from /lib64/libglib-2.0.so.0
#16 0x00000000004013f1 in handler (signum=10) at dvrRecord.c:72
#17 <signal handler called>
#18 0x00007fc9773ec958 in _int_malloc () from /lib64/libc.so.6
#19 0x00007fc9773ece1f in _int_memalign () from /lib64/libc.so.6
#20 0x00007fc9773ed5ea in _mid_memalign.constprop.0 () from /lib64/libc.so.6
#21 0x00007fc9773eed73 in posix_memalign () from /lib64/libc.so.6
#22 0x00007fc9775c4ea4 in ?? () from /lib64/libglib-2.0.so.0
#23 0x00007fc9775c5b1e in g_slice_alloc () from /lib64/libglib-2.0.so.0
#24 0x00007fc9775c5b89 in g_slice_alloc0 () from /lib64/libglib-2.0.so.0
#25 0x00007fc9776c461c in g_type_create_instance () from /lib64/libgobject-2.0.so.0
#26 0x00007fc9776a74b0 in ?? () from /lib64/libgobject-2.0.so.0
#27 0x00007fc9776a91d3 in g_object_new_valist () from /lib64/libgobject-2.0.so.0
#28 0x00007fc9776a9829 in g_object_new () from /lib64/libgobject-2.0.so.0
#29 0x00007fc9777a42f3 in ?? () from /lib64/libgstreamer-1.0.so.0
#30 0x00007fc97779cb5f in gst_update_registry () from /lib64/libgstreamer-1.0.so.0
#31 0x00007fc97772f05a in ?? () from /lib64/libgstreamer-1.0.so.0
#32 0x00007fc97772f875 in ?? () from /lib64/libgstreamer-1.0.so.0
#33 0x00007fc9775b46b1 in g_option_context_parse () from /lib64/libglib-2.0.so.0
#34 0x00007fc977727cf7 in gst_init_check () from /lib64/libgstreamer-1.0.so.0
#35 0x00007fc977727d44 in gst_init () from /lib64/libgstreamer-1.0.so.0
#36 0x0000000000401ecb in main (argc=6, argv=0x7ffe0ed61e28) at dvrRecord.c:373

James



More information about the gstreamer-devel mailing list