mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
FIX: [STUDIO-2340] [STUDIO-2297] handle linux gstreamer error
Change-Id: Iadc6dcb9d7a9f2c5d1ce9cf979bbbfbd0f805d19
This commit is contained in:
parent
0e3364a415
commit
a401c0fa2e
4 changed files with 37 additions and 10 deletions
|
@ -259,6 +259,8 @@ gst_bambusrc_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
}
|
||||
|
||||
int gst_bambu_last_error = 0;
|
||||
|
||||
static GstFlowReturn
|
||||
gst_bambusrc_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
||||
{
|
||||
|
@ -286,7 +288,8 @@ gst_bambusrc_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
|||
}
|
||||
|
||||
if (rv != Bambu_success) {
|
||||
return GST_FLOW_ERROR;
|
||||
gst_bambu_last_error = rv;
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
#if GLIB_CHECK_VERSION(2,68,0)
|
||||
|
@ -316,7 +319,7 @@ gst_bambusrc_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
|||
//if (GST_CLOCK_TIME_NONE == src->sttime)
|
||||
// src->sttime
|
||||
GST_DEBUG_OBJECT(src,
|
||||
"sttime init to %llu.",
|
||||
"sttime init to %lu.",
|
||||
src->sttime);
|
||||
}
|
||||
//GST_BUFFER_DTS(*outbuf) = gst_element_get_current_clock_time((GstElement *)psrc) - src->sttime;
|
||||
|
@ -325,7 +328,7 @@ gst_bambusrc_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
|||
GST_BUFFER_DURATION(*outbuf) = GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
GST_DEBUG_OBJECT(src,
|
||||
"sttime:%llu, DTS:%llu, PTS: %llu~",
|
||||
"sttime:%lu, DTS:%lu, PTS: %lu~",
|
||||
src->sttime, GST_BUFFER_DTS(*outbuf), GST_BUFFER_PTS(*outbuf));
|
||||
|
||||
return GST_FLOW_OK;
|
||||
|
@ -377,6 +380,7 @@ gst_bambusrc_start (GstBaseSrc * bsrc)
|
|||
BAMBULIB(Bambu_Close)(src->tnl);
|
||||
BAMBULIB(Bambu_Destroy)(src->tnl);
|
||||
src->tnl = NULL;
|
||||
gst_bambu_last_error = rv;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue