Skip to content

Commit f440dfd

Browse files
committed
..?
1 parent 7b82f0f commit f440dfd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

publish.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
import random
23
import ssl
34
import websockets
@@ -466,6 +467,19 @@ def select_display_sink(default_sink: str = "autovideosink") -> str:
466467
display_detected = check_drm_displays()
467468
if display_detected:
468469
printc('\nThere is at least one connected display.', "00F")
470+
if is_jetson_device():
471+
using_wayland = bool(os.environ.get("WAYLAND_DISPLAY"))
472+
using_x11 = bool(os.environ.get("DISPLAY")) and not using_wayland
473+
if using_x11:
474+
if gst_element_available("xvimagesink"):
475+
printc(" ! Jetson desktop (X11) detected. Using xvimagesink to avoid EGL issues.", "0AF")
476+
return "xvimagesink sync=false"
477+
if gst_element_available("ximagesink"):
478+
printc(" ! Jetson desktop (X11) detected. Using ximagesink to avoid EGL issues.", "0AF")
479+
return "ximagesink sync=false"
480+
if gst_element_available("glimagesink"):
481+
printc(" ! Jetson desktop (X11) detected. Using glimagesink to avoid EGL issues.", "0AF")
482+
return "glimagesink sync=true"
469483
return default_sink
470484

471485
if is_jetson_device():

0 commit comments

Comments
 (0)