Commit Graph

6 Commits

Author SHA1 Message Date
chunmao.guo a401c0fa2e FIX: [STUDIO-2340] [STUDIO-2297] handle linux gstreamer error
Change-Id: Iadc6dcb9d7a9f2c5d1ce9cf979bbbfbd0f805d19
2023-04-17 15:39:02 +08:00
lane.wei ad9eccc5f4 ENH: gstreamer: use gst_clock_get_time insteadof gst_element_get_current_time
gst_element_get_current_time is only available since gst 1.18
2023-02-02 16:53:45 +08:00
lane.wei 6b15afc7b6 ENH: refine the timestamp when using P1P
the timestamp of mjpeg is not accurate
we simulate one

Change-Id: I9198f1ba930994cc4f86e8d3a3c778539d04ccb3
2023-02-01 16:24:44 +08:00
lane.wei 8a81df98b5 ENH: add the liveview support of P1P
P1P uses Mjpeg instead of h264

Change-Id: I41c8a6b7c13ed027350939bea3d9cb74757c0b63
2023-01-28 16:18:05 +08:00
Joshua Wise 745076805e gstbambusrc: improve compatibility with older GStreamer versions 2023-01-12 14:56:04 +08:00
Joshua Wise 43a7f88c6c Add support for Bambu Lab X1 series live video stream on Linux.
wxWidgets on Linux uses GStreamer as its back-end for wxMediaCtrl, which
doesn't have a bambu: URI handler.  On Windows, this is handled by a Windows
Media subsystem plugin, and on Mac, this is handled with a BambuPlayer
class.  Luckily, the libBambuSource.so binary that is distributed with the
network plugin package already contains support for receiving h.264 data
from the network, and the API is the same as is used by the tiny
bambusource.exe binary on Windows; we glue this into a GStreamer source
plugin that registers a URI handler for bambu:.

To make this work, we make a few additional changes elsewhere.  GStreamer
seems to have trouble rendering an Xv overlay onto a 32bpp X visual, but
Bambu Slicer seems to request a 32bpp visual for some background
transparency in the Notebook; it doesn't seem to use it in an interesting
way on Linux, though, so we remove that request for transparency to allow
Bambu Studio to render to a 24bpp visual.  The media controller
infrastructure also makes a few assumptions about when sizing information
can be queried from a wxMediaCtrl backend that do not hold true on Linux; we
either fix those assumptions, or fake them out, as needed.  We also make a
few changes needed to successfully compile C.

This has only been tested with the GStreamer backend for wxWidgets --
notably, not the GStreamer-play backend (these are, astonishingly, two
different things!).  If you find that this seems not to work, consider
*un*installing the libgstreamer-plugins-bad1.0-dev package and then
rebuilding wxWidgets.
2023-01-12 14:56:04 +08:00