diff --git a/cpp/libs/gst_nmos_sender_plugin/gst_nmos_sender_plugin.cpp b/cpp/libs/gst_nmos_sender_plugin/gst_nmos_sender_plugin.cpp index 4d88232..b89d3bb 100644 --- a/cpp/libs/gst_nmos_sender_plugin/gst_nmos_sender_plugin.cpp +++ b/cpp/libs/gst_nmos_sender_plugin/gst_nmos_sender_plugin.cpp @@ -114,13 +114,12 @@ static void gst_nmossender_set_property(GObject* object, guint property_id, cons case PropertyId::DestinationAddress: self->config.network.destination_address = g_value_dup_string(value); - g_print("\n\n\n\n\n%s", self->config.network.destination_address.c_str()); g_object_set(G_OBJECT(self->udpsink), "host", self->config.network.destination_address.c_str(), NULL); break; case PropertyId::DestinationPort: - self->config.network.destination_port = g_value_dup_string(value); - g_object_set(G_OBJECT(self->udpsink), "port", atoi(self->config.network.destination_port.c_str()), NULL); + self->config.network.destination_port = atoi(g_value_get_string(value)); + g_object_set(G_OBJECT(self->udpsink), "port", self->config.network.destination_port, NULL); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; @@ -148,7 +147,7 @@ static void gst_nmossender_get_property(GObject* object, guint property_id, GVal case PropertyId::DestinationAddress: g_value_set_string(value, self->config.network.destination_address.c_str()); break; - case PropertyId::DestinationPort: g_value_set_string(value, self->config.network.destination_port.c_str()); break; + case PropertyId::DestinationPort: g_value_set_int(value, self->config.network.destination_port); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } diff --git a/cpp/libs/gst_nmos_sender_plugin/utils.cpp b/cpp/libs/gst_nmos_sender_plugin/utils.cpp index 5513e0c..254c5f9 100644 --- a/cpp/libs/gst_nmos_sender_plugin/utils.cpp +++ b/cpp/libs/gst_nmos_sender_plugin/utils.cpp @@ -45,7 +45,7 @@ void create_default_config_fields(config_fields_t* config) config->network.source_address = "192.168.1.120"; config->network.interface_name = "wlp1s0"; config->network.destination_address = "192.168.1.120"; - config->network.destination_port = "9999"; + config->network.destination_port = 9999; // Initialize config_fields_t config->sender_id = "1c920570-e0b4-4637-b02c-26c9d4275c71"; diff --git a/cpp/libs/gst_nmos_sender_plugin/utils.h b/cpp/libs/gst_nmos_sender_plugin/utils.h index b84a8a2..2d371ac 100644 --- a/cpp/libs/gst_nmos_sender_plugin/utils.h +++ b/cpp/libs/gst_nmos_sender_plugin/utils.h @@ -39,7 +39,7 @@ typedef struct network_fields_t std::string source_address; std::string interface_name; std::string destination_address; - std::string destination_port; + gint destination_port; } network_fields_t; typedef struct config_fields_t