File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
12import random
23import ssl
34import 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 ('\n There 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 ():
You can’t perform that action at this time.
0 commit comments