|
@@ -4,7 +4,7 @@
|
|
|
* @Autor: lishengyin
|
|
|
* @Date: 2021-10-13 09:35:37
|
|
|
* @LastEditors: lishengyin
|
|
|
- * @LastEditTime: 2022-10-09 10:50:38
|
|
|
+ * @LastEditTime: 2022-10-11 09:38:19
|
|
|
*/
|
|
|
#include "inference.h"
|
|
|
|
|
@@ -58,10 +58,22 @@ map<string, map<int, queue<std::shared_ptr<cv::Mat>>>> m_frames;
|
|
|
namespace MIVA{
|
|
|
ThreadPool pool(4,ThreadPool::PRIORITY_HIGHEST, false);
|
|
|
std::shared_ptr<Inference> m_Inference = nullptr;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: Inference
|
|
|
+ * @param {*}
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
Inference::Inference()
|
|
|
{
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: ~
|
|
|
+ * @param {*}
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
Inference::~Inference()
|
|
|
{
|
|
|
this->m_InferInfo = NULL;
|
|
@@ -162,18 +174,11 @@ namespace MIVA{
|
|
|
g_object_set (G_OBJECT (this->pgie), "batch-size", g_num_sources, NULL);
|
|
|
}
|
|
|
|
|
|
- // this->tiler_rows = (guint) sqrt (g_num_sources);
|
|
|
- // this->tiler_columns = (guint) ceil (1.0 * g_num_sources / this->tiler_rows);
|
|
|
-
|
|
|
- // /* we set the tiler properties here */
|
|
|
- // g_object_set (G_OBJECT (this->tiler), "rows", this->tiler_rows, "columns", this->tiler_columns,
|
|
|
- // "width", TILED_OUTPUT_WIDTH, "height", TILED_OUTPUT_HEIGHT, NULL);
|
|
|
-
|
|
|
+
|
|
|
g_object_set (G_OBJECT (this->nvosd), "process-mode", OSD_PROCESS_MODE,
|
|
|
"display-text", OSD_DISPLAY_TEXT, NULL);
|
|
|
g_object_set (G_OBJECT (this->nvosd), "display-bbox", 0, NULL);
|
|
|
- // g_object_set (G_OBJECT (this->nvosd), "display-mask", 0, NULL);
|
|
|
-
|
|
|
+
|
|
|
g_object_set (G_OBJECT (this->sink), "qos", 0, NULL);
|
|
|
|
|
|
this->bus = gst_pipeline_get_bus (GST_PIPELINE (this->pipeline));
|
|
@@ -191,7 +196,7 @@ namespace MIVA{
|
|
|
|
|
|
// this->tiler, this->queue4,
|
|
|
// this->nvosd, this->queue4,
|
|
|
-
|
|
|
+
|
|
|
this->tiler_sink_pad = gst_element_get_static_pad (this->nvvidconv, "src");
|
|
|
gst_pad_add_probe (this->tiler_sink_pad, GST_PAD_PROBE_TYPE_BUFFER,
|
|
|
tiler_sink_pad_buffer_probe, NULL, NULL);
|
|
@@ -398,6 +403,7 @@ namespace MIVA{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
recorder::Ptr m_recorder = recorder::CreateNew();
|
|
|
|
|
|
if(m_recorder->RecordEnable){
|
|
@@ -498,6 +504,11 @@ namespace MIVA{
|
|
|
return GST_PAD_PROBE_OK;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @description: 记录
|
|
|
+ * @param {*}
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
int32_t Inference::Recorder()
|
|
|
{
|
|
|
if(m_frames.size() == 0) return -1;
|