Browse Source

优化代码结构

lishengyin 2 years ago
parent
commit
e6d6a5942d

BIN
lib/libmodules.so


+ 4 - 8
modules/inference/src/inference.cpp

@@ -4,7 +4,7 @@
  * @Autor: lishengyin
  * @Date: 2021-10-13 09:35:37
  * @LastEditors: lishengyin
- * @LastEditTime: 2022-10-09 10:37:13
+ * @LastEditTime: 2022-10-09 10:50:38
  */
 #include "inference.h"
 
@@ -655,7 +655,7 @@ namespace MIVA{
     void Inference::decodebin_child_added (GstChildProxy * child_proxy, GObject * object,
         gchar * name, gpointer user_data)
     {
-        WarnL << "Decodebin child added: " << name;
+        //WarnL << "Decodebin child added: " << name;
         if (g_strrstr (name, "decodebin") == name) {
             
             g_signal_connect (G_OBJECT (object), "child-added",
@@ -728,8 +728,7 @@ namespace MIVA{
         GstCaps *caps = gst_pad_query_caps (pad, NULL);
         const GstStructure *str = gst_caps_get_structure (caps, 0);
         const gchar *name = gst_structure_get_name (str);
-
-        WarnL << "decodebin new pad " << name;
+        // WarnL << "decodebin new pad " << name;
         if (!strncmp (name, "video", 5)) {
             gint source_id = (*(gint *) data);
             gchar pad_name[16] = { 0 };
@@ -739,8 +738,6 @@ namespace MIVA{
             if(sinkpad == NULL) sinkpad = gst_element_get_request_pad (g_streammux, pad_name);
             if (gst_pad_link (pad, sinkpad) != GST_PAD_LINK_OK) {
                 ErrorL << "Failed to link decodebin to pipeline: " << pad_name;
-            } else {
-                InfoL << "Decodebin linked to pipeline";
             }
             gst_object_unref (sinkpad);
         }
@@ -757,8 +754,7 @@ namespace MIVA{
     {
         GstElement *bin = NULL;
         gchar bin_name[16] = { };
-
-        DebugL << "creating uridecodebin for [" << filename << "] index:" << index;
+        // DebugL << "creating uridecodebin for [" << filename << "] index:" << index;
         g_source_id_list[index] = index;
         g_snprintf (bin_name, 15, "source-bin-%02d", index);
         bin = gst_element_factory_make ("uridecodebin", bin_name);

BIN
source/bin/gstshark_2022-10-09_10:48:18/datastream


+ 66 - 0
source/bin/gstshark_2022-10-09_10:48:18/metadata

@@ -0,0 +1,66 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+
+trace {
+    major = 1;
+    minor = 3;
+    uuid = "d18e6374-35a1-cd42-8e70-a9cffa712793";
+    byte_order = le;
+    packet.header := struct {
+        uint32_t magic;
+        uint8_t  uuid[16];
+        uint32_t stream_id;
+    };
+};
+
+clock { 
+    name = monotonic; 
+    uuid = "84db105b-b3f4-4821-b662-efc51455106a"; 
+    description = "Monotonic Clock"; 
+    freq = 1000000; /* Frequency, in Hz */ 
+    /* clock value offset from Epoch is: offset * (1/freq) */ 
+    offset_s = 21600; 
+};
+
+typealias integer {
+    size = 32; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint32_clock_monotonic_t;
+
+typealias integer {
+    size = 64; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint64_clock_monotonic_t;
+
+struct packet_context {
+    uint64_clock_monotonic_t timestamp_begin;
+    uint64_clock_monotonic_t timestamp_end;
+};
+
+struct event_header {
+    enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
+    variant <id> {
+        struct {
+            uint32_t timestamp;
+        } compact;
+        struct {
+            uint32_t id;
+            uint64_t timestamp;
+        } extended;
+    } v;
+} align(8);
+
+stream {
+    id = 0;
+    event.header := struct event_header;
+    packet.context := struct packet_context;
+};
+
+event {
+    name = init;
+    id = 0;
+    stream_id = 0;
+};

BIN
source/bin/gstshark_2022-10-09_10:49:42/datastream


+ 66 - 0
source/bin/gstshark_2022-10-09_10:49:42/metadata

@@ -0,0 +1,66 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+
+trace {
+    major = 1;
+    minor = 3;
+    uuid = "d18e6374-35a1-cd42-8e70-a9cffa712793";
+    byte_order = le;
+    packet.header := struct {
+        uint32_t magic;
+        uint8_t  uuid[16];
+        uint32_t stream_id;
+    };
+};
+
+clock { 
+    name = monotonic; 
+    uuid = "84db105b-b3f4-4821-b662-efc51455106a"; 
+    description = "Monotonic Clock"; 
+    freq = 1000000; /* Frequency, in Hz */ 
+    /* clock value offset from Epoch is: offset * (1/freq) */ 
+    offset_s = 21600; 
+};
+
+typealias integer {
+    size = 32; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint32_clock_monotonic_t;
+
+typealias integer {
+    size = 64; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint64_clock_monotonic_t;
+
+struct packet_context {
+    uint64_clock_monotonic_t timestamp_begin;
+    uint64_clock_monotonic_t timestamp_end;
+};
+
+struct event_header {
+    enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
+    variant <id> {
+        struct {
+            uint32_t timestamp;
+        } compact;
+        struct {
+            uint32_t id;
+            uint64_t timestamp;
+        } extended;
+    } v;
+} align(8);
+
+stream {
+    id = 0;
+    event.header := struct event_header;
+    packet.context := struct packet_context;
+};
+
+event {
+    name = init;
+    id = 0;
+    stream_id = 0;
+};

BIN
source/bin/gstshark_2022-10-09_10:51:21/datastream


+ 66 - 0
source/bin/gstshark_2022-10-09_10:51:21/metadata

@@ -0,0 +1,66 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+
+trace {
+    major = 1;
+    minor = 3;
+    uuid = "d18e6374-35a1-cd42-8e70-a9cffa712793";
+    byte_order = le;
+    packet.header := struct {
+        uint32_t magic;
+        uint8_t  uuid[16];
+        uint32_t stream_id;
+    };
+};
+
+clock { 
+    name = monotonic; 
+    uuid = "84db105b-b3f4-4821-b662-efc51455106a"; 
+    description = "Monotonic Clock"; 
+    freq = 1000000; /* Frequency, in Hz */ 
+    /* clock value offset from Epoch is: offset * (1/freq) */ 
+    offset_s = 21600; 
+};
+
+typealias integer {
+    size = 32; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint32_clock_monotonic_t;
+
+typealias integer {
+    size = 64; align = 8; signed = false;
+    map = clock.monotonic.value;
+} := uint64_clock_monotonic_t;
+
+struct packet_context {
+    uint64_clock_monotonic_t timestamp_begin;
+    uint64_clock_monotonic_t timestamp_end;
+};
+
+struct event_header {
+    enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
+    variant <id> {
+        struct {
+            uint32_t timestamp;
+        } compact;
+        struct {
+            uint32_t id;
+            uint64_t timestamp;
+        } extended;
+    } v;
+} align(8);
+
+stream {
+    id = 0;
+    event.header := struct event_header;
+    packet.context := struct packet_context;
+};
+
+event {
+    name = init;
+    id = 0;
+    stream_id = 0;
+};