From d8296b8a7296b952ce36d6d5a3730f1d935da3b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 24 Oct 2020 10:44:30 +0200 Subject: [PATCH] - build with libupnp 1.14 - rel 9 --- libupnp-1.14.patch | 370 ++++++++++++++++++++++++++++++++++++++++++++- mediastreamer.spec | 10 +- 2 files changed, 374 insertions(+), 6 deletions(-) diff --git a/libupnp-1.14.patch b/libupnp-1.14.patch index 44a9323..e596ecf 100644 --- a/libupnp-1.14.patch +++ b/libupnp-1.14.patch @@ -1,6 +1,6 @@ diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd.c mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd.c --- mediastreamer-2.16.1/src/upnp/upnp_igd.c 2017-04-06 11:27:56.000000000 +0200 -+++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd.c 2020-10-23 14:04:57.300609331 +0200 ++++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd.c 2020-10-24 09:56:24.947219573 +0200 @@ -395,7 +395,7 @@ * d_event -- event associated with the new device * @@ -52,6 +52,15 @@ diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd.c mediastreamer-2.16.1-upnp-1.14 IGDServiceType[service], &serviceId, &event_url, &controlURL)) { upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Subscribing to EventURL %s...",event_url); ret = +@@ -883,7 +883,7 @@ + * cookie -- Optional data specified during callback registration + * + ********************************************************************************/ +-int upnp_igd_callback(Upnp_EventType event_type, void* event, void *cookie) { ++int upnp_igd_callback(Upnp_EventType event_type, const void* event, void *cookie) { + int ret = 1; + upnp_igd_context *igd_ctxt = (upnp_igd_context*)cookie; + upnp_context_add_client(igd_ctxt); @@ -891,16 +891,16 @@ switch(event_type) { case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE: @@ -74,7 +83,7 @@ diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd.c mediastreamer-2.16.1-upnp-1.14 } else { upnp_igd_add_device(igd_ctxt, desc_doc, d_event); } -@@ -910,11 +910,11 @@ +@@ -910,64 +910,64 @@ } break; case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: { @@ -90,3 +99,360 @@ diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd.c mediastreamer-2.16.1-upnp-1.14 } break; /* SOAP Stuff */ + case UPNP_CONTROL_ACTION_COMPLETE: { +- struct Upnp_Action_Complete *a_event = (struct Upnp_Action_Complete *)event; ++ UpnpActionComplete *a_event = (UpnpActionComplete *)event; + +- if (a_event->ErrCode != UPNP_E_SUCCESS) { +- upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Action Complete Callback -- %d", a_event->ErrCode); ++ if (UpnpActionComplete_get_ErrCode(a_event) != UPNP_E_SUCCESS) { ++ upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Action Complete Callback -- %d", UpnpActionComplete_get_ErrCode(a_event)); + } else { +- upnp_igd_handle_send_action(igd_ctxt, UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult); ++ upnp_igd_handle_send_action(igd_ctxt, UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), UpnpActionComplete_get_ActionRequest(a_event), UpnpActionComplete_get_ActionResult(a_event)); + } + } + break; + case UPNP_CONTROL_GET_VAR_COMPLETE: { +- struct Upnp_State_Var_Complete *sv_event = (struct Upnp_State_Var_Complete *)event; ++ UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)event; + +- if (sv_event->ErrCode != UPNP_E_SUCCESS) { +- upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get Var Complete Callback -- %d", sv_event->ErrCode); ++ if (UpnpStateVarComplete_get_ErrCode(sv_event) != UPNP_E_SUCCESS) { ++ upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get Var Complete Callback -- %d", UpnpStateVarComplete_get_ErrCode(sv_event)); + } else { +- upnp_igd_handle_get_var(igd_ctxt, UPNP_STRING(sv_event->CtrlUrl), sv_event->StateVarName, sv_event->CurrentVal); ++ upnp_igd_handle_get_var(igd_ctxt, UPNP_STRING(UpnpStateVarComplete_get_CtrlUrl(sv_event)), UpnpStateVarComplete_get_StateVarName_cstr(sv_event), UpnpStateVarComplete_get_CurrentVal_cstr(sv_event)); + } + } + break; + /* GENA Stuff */ + case UPNP_EVENT_RECEIVED: { +- struct Upnp_Event *e_event = (struct Upnp_Event *)event; ++ UpnpEvent *e_event = (UpnpEvent *)event; + +- upnp_igd_handle_event(igd_ctxt, e_event->Sid, e_event->EventKey, e_event->ChangedVariables); ++ upnp_igd_handle_event(igd_ctxt, UpnpEvent_get_SID_cstr(e_event), UpnpEvent_get_EventKey(e_event), UpnpEvent_get_ChangedVariables(e_event)); + } + break; + case UPNP_EVENT_SUBSCRIBE_COMPLETE: + case UPNP_EVENT_UNSUBSCRIBE_COMPLETE: + case UPNP_EVENT_RENEWAL_COMPLETE: { +- struct Upnp_Event_Subscribe *es_event = (struct Upnp_Event_Subscribe *)event; ++ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event; + +- if (es_event->ErrCode != UPNP_E_SUCCESS) { +- upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Event Subscribe Callback -- %d", es_event->ErrCode); ++ if (UpnpEventSubscribe_get_ErrCode(es_event) != UPNP_E_SUCCESS) { ++ upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Event Subscribe Callback -- %d", UpnpEventSubscribe_get_ErrCode(es_event)); + } else { +- upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(es_event->PublisherUrl), es_event->Sid, es_event->TimeOut); ++ upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), UpnpEventSubscribe_get_SID_cstr(es_event), UpnpEventSubscribe_get_TimeOut(es_event)); + } + } + break; + case UPNP_EVENT_AUTORENEWAL_FAILED: + case UPNP_EVENT_SUBSCRIPTION_EXPIRED: { +- struct Upnp_Event_Subscribe *es_event = (struct Upnp_Event_Subscribe *)event; ++ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event; + int TimeOut = 1801; + Upnp_SID newSID; + int ret; + +- ret = UpnpSubscribe(igd_ctxt->upnp_handle, UPNP_STRING(es_event->PublisherUrl), &TimeOut, newSID); ++ ret = UpnpSubscribe(igd_ctxt->upnp_handle, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), &TimeOut, newSID); + if (ret == UPNP_E_SUCCESS) { + upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Subscribed to EventURL with SID=%s", newSID); +- upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(es_event->PublisherUrl), newSID, TimeOut); ++ upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), newSID, TimeOut); + } else { + upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error Subscribing to EventURL -- %d", ret); + } +@@ -1070,9 +1070,9 @@ + + upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Initializing uPnP IGD with ipaddress:%s port:%u", ip_address ? ip_address : "{NULL}", port); + +- ret = UpnpInit(ip_address, port); ++ ret = UpnpInit2(ip_address, port); + if (ret != UPNP_E_SUCCESS) { +- upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "UpnpInit() Error: %d", ret); ++ upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "UpnpInit2() Error: %d", ret); + UpnpFinish(); + ithread_mutex_destroy(&igd_ctxt->print_mutex); + ithread_mutex_destroy(&igd_ctxt->devices_mutex); +diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd_cmd.c mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_cmd.c +--- mediastreamer-2.16.1/src/upnp/upnp_igd_cmd.c 2017-04-06 11:27:56.000000000 +0200 ++++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_cmd.c 2020-10-24 09:59:22.519393813 +0200 +@@ -103,8 +103,8 @@ + + switch(event_type) { + case UPNP_CONTROL_ACTION_COMPLETE: { +- struct Upnp_Action_Complete *a_event = (struct Upnp_Action_Complete *)event; +- upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, a_event->ErrCode, UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult); ++ struct UpnpActionComplete *a_event = (UpnpActionComplete *)event; ++ upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, UpnpActionComplete_get_ErrCode(a_event), UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), UpnpActionComplete_get_ActionRequest(a_event), UpnpActionComplete_get_ActionResult(a_event)); + } + break; + +diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd_private.h mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_private.h +--- mediastreamer-2.16.1/src/upnp/upnp_igd_private.h 2017-04-06 11:27:56.000000000 +0200 ++++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_private.h 2020-10-24 09:56:45.997524838 +0200 +@@ -144,7 +144,7 @@ + void upnp_context_handle_callbacks(upnp_igd_context *igd_ctx); + void upnp_context_free_callbacks(upnp_igd_context *igd_ctx); + +-int upnp_igd_callback(Upnp_EventType event_type, void* event, void *cookie); ++int upnp_igd_callback(Upnp_EventType event_type, const void* event, void *cookie); + int upnp_igd_send_action(upnp_igd_context* igd_ctxt, upnp_igd_device_node *device_node, int service, + const char *actionname, const char **param_name, const char **param_val, int param_count, + Upnp_FunPtr fun, const void *cookie); +diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd_utils.c mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_utils.c +--- mediastreamer-2.16.1/src/upnp/upnp_igd_utils.c 2017-04-06 11:27:56.000000000 +0200 ++++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_utils.c 2020-10-24 10:41:27.658376656 +0200 +@@ -178,7 +178,7 @@ + } + } + +-void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level, Upnp_EventType EventType, void *Event) { ++void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level, Upnp_EventType EventType, const void *Event) { + ithread_mutex_lock(&igd_ctxt->print_mutex); + + upnp_igd_print(igd_ctxt, level, "======================================================================"); +@@ -188,18 +188,18 @@ + case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE: + case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: + case UPNP_DISCOVERY_SEARCH_RESULT: { +- struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event; ++ UpnpDiscovery *d_event = (UpnpDiscovery *)Event; + + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(d_event->ErrCode), d_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "Expires = %d", d_event->Expires); +- upnp_igd_print(igd_ctxt, level, "DeviceId = %s", d_event->DeviceId); +- upnp_igd_print(igd_ctxt, level, "DeviceType = %s", d_event->DeviceType); +- upnp_igd_print(igd_ctxt, level, "ServiceType = %s", d_event->ServiceType); +- upnp_igd_print(igd_ctxt, level, "ServiceVer = %s", d_event->ServiceVer); +- upnp_igd_print(igd_ctxt, level, "Location = %s", d_event->Location); +- upnp_igd_print(igd_ctxt, level, "OS = %s", d_event->Os); +- upnp_igd_print(igd_ctxt, level, "Ext = %s", d_event->Ext); ++ UpnpGetErrorMessage(UpnpDiscovery_get_ErrCode(d_event)), UpnpDiscovery_get_ErrCode(d_event)); ++ upnp_igd_print(igd_ctxt, level, "Expires = %d", UpnpDiscovery_get_Expires(d_event)); ++ upnp_igd_print(igd_ctxt, level, "DeviceId = %s", UpnpDiscovery_get_DeviceID_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "DeviceType = %s", UpnpDiscovery_get_DeviceType_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "ServiceType = %s", UpnpDiscovery_get_ServiceType_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "ServiceVer = %s", UpnpDiscovery_get_ServiceVer_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "Location = %s", UpnpDiscovery_get_Location_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "OS = %s", UpnpDiscovery_get_Os_cstr(d_event)); ++ upnp_igd_print(igd_ctxt, level, "Ext = %s", UpnpDiscovery_get_Ext_cstr(d_event)); + break; + } + case UPNP_DISCOVERY_SEARCH_TIMEOUT: +@@ -207,18 +207,18 @@ + break; + /* SOAP */ + case UPNP_CONTROL_ACTION_REQUEST: { +- struct Upnp_Action_Request *a_event = +- (struct Upnp_Action_Request *)Event; ++ UpnpActionRequest *a_event = ++ (UpnpActionRequest *)Event; + char *xmlbuff = NULL; + + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(a_event->ErrCode), a_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "ErrStr = %s", a_event->ErrStr); +- upnp_igd_print(igd_ctxt, level, "ActionName = %s", a_event->ActionName); +- upnp_igd_print(igd_ctxt, level, "UDN = %s", a_event->DevUDN); +- upnp_igd_print(igd_ctxt, level, "ServiceID = %s", a_event->ServiceID); +- if (a_event->ActionRequest) { +- xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionRequest); ++ UpnpGetErrorMessage(UpnpActionRequest_get_ErrCode(a_event)), UpnpActionRequest_get_ErrCode(a_event)); ++ upnp_igd_print(igd_ctxt, level, "ErrStr = %s", UpnpActionRequest_get_ErrStr_cstr(a_event)); ++ upnp_igd_print(igd_ctxt, level, "ActionName = %s", UpnpActionRequest_get_ActionName(a_event)); ++ upnp_igd_print(igd_ctxt, level, "UDN = %s", UpnpActionRequest_get_DevUDN_cstr(a_event)); ++ upnp_igd_print(igd_ctxt, level, "ServiceID = %s", UpnpActionRequest_get_ServiceID_cstr(a_event)); ++ if (UpnpActionRequest_get_ActionRequest(a_event)) { ++ xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionRequest_get_ActionRequest(a_event)); + if (xmlbuff) { + upnp_igd_print(igd_ctxt, level, "ActRequest = %s", xmlbuff); + ixmlFreeDOMString(xmlbuff); +@@ -227,8 +227,8 @@ + } else { + upnp_igd_print(igd_ctxt, level, "ActRequest = (null)"); + } +- if (a_event->ActionResult) { +- xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionResult); ++ if (UpnpActionRequest_get_ActionResult(a_event)) { ++ xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionRequest_get_ActionResult(a_event)); + if (xmlbuff) { + upnp_igd_print(igd_ctxt, level, "ActResult = %s", xmlbuff); + ixmlFreeDOMString(xmlbuff); +@@ -240,15 +240,15 @@ + break; + } + case UPNP_CONTROL_ACTION_COMPLETE: { +- struct Upnp_Action_Complete *a_event = +- (struct Upnp_Action_Complete *)Event; ++ UpnpActionComplete *a_event = ++ (UpnpActionComplete *)Event; + char *xmlbuff = NULL; + + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(a_event->ErrCode), a_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "CtrlUrl = %s", a_event->CtrlUrl); +- if (a_event->ActionRequest) { +- xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionRequest); ++ UpnpGetErrorMessage(UpnpActionComplete_get_ErrCode(a_event)), UpnpActionComplete_get_ErrCode(a_event)); ++ upnp_igd_print(igd_ctxt, level, "CtrlUrl = %s", UpnpActionComplete_get_CtrlUrl_cstr(a_event)); ++ if (UpnpActionComplete_get_ActionRequest(a_event)) { ++ xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionComplete_get_ActionRequest(a_event)); + if (xmlbuff) { + upnp_igd_print(igd_ctxt, level, "ActRequest = %s", xmlbuff); + ixmlFreeDOMString(xmlbuff); +@@ -257,8 +257,8 @@ + } else { + upnp_igd_print(igd_ctxt, level, "ActRequest = (null)"); + } +- if (a_event->ActionResult) { +- xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionResult); ++ if (UpnpActionComplete_get_ActionResult(a_event)) { ++ xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionComplete_get_ActionResult(a_event)); + if (xmlbuff) { + upnp_igd_print(igd_ctxt, level, "ActResult = %s", xmlbuff); + ixmlFreeDOMString(xmlbuff); +@@ -270,83 +270,83 @@ + break; + } + case UPNP_CONTROL_GET_VAR_REQUEST: { +- struct Upnp_State_Var_Request *sv_event = +- (struct Upnp_State_Var_Request *)Event; ++ UpnpStateVarRequest *sv_event = ++ (UpnpStateVarRequest *)Event; + + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(sv_event->ErrCode), sv_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "ErrStr = %s", sv_event->ErrStr); +- upnp_igd_print(igd_ctxt, level, "UDN = %s", sv_event->DevUDN); +- upnp_igd_print(igd_ctxt, level, "ServiceID = %s", sv_event->ServiceID); +- upnp_igd_print(igd_ctxt, level, "StateVarName= %s", sv_event->StateVarName); +- upnp_igd_print(igd_ctxt, level, "CurrentVal = %s", sv_event->CurrentVal); ++ UpnpGetErrorMessage(UpnpStateVarRequest_get_ErrCode(sv_event)), UpnpStateVarRequest_get_ErrCode(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "ErrStr = %s", UpnpStateVarRequest_get_ErrStr_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "UDN = %s", UpnpStateVarRequest_get_DevUDN_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "ServiceID = %s", UpnpStateVarRequest_get_ServiceID_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "StateVarName= %s", UpnpStateVarRequest_get_StateVarName_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "CurrentVal = %s", UpnpStateVarRequest_get_CurrentVal_cstr(sv_event)); + break; + } + case UPNP_CONTROL_GET_VAR_COMPLETE: { +- struct Upnp_State_Var_Complete *sv_event = +- (struct Upnp_State_Var_Complete *)Event; ++ UpnpStateVarComplete *sv_event = ++ (UpnpStateVarComplete *)Event; + + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(sv_event->ErrCode), sv_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "CtrlUrl = %s", sv_event->CtrlUrl); +- upnp_igd_print(igd_ctxt, level, "StateVarName= %s", sv_event->StateVarName); +- upnp_igd_print(igd_ctxt, level, "CurrentVal = %s", sv_event->CurrentVal); ++ UpnpGetErrorMessage(UpnpStateVarComplete_get_ErrCode(sv_event)), UpnpStateVarComplete_get_ErrCode(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "CtrlUrl = %s", UpnpStateVarComplete_get_CtrlUrl_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "StateVarName= %s", UpnpStateVarComplete_get_StateVarName_cstr(sv_event)); ++ upnp_igd_print(igd_ctxt, level, "CurrentVal = %s", UpnpStateVarComplete_get_CurrentVal_cstr(sv_event)); + break; + } + /* GENA */ + case UPNP_EVENT_SUBSCRIPTION_REQUEST: { +- struct Upnp_Subscription_Request *sr_event = +- (struct Upnp_Subscription_Request *)Event; ++ UpnpSubscriptionRequest *sr_event = ++ (UpnpSubscriptionRequest *)Event; + +- upnp_igd_print(igd_ctxt, level, "ServiceID = %s", sr_event->ServiceId); +- upnp_igd_print(igd_ctxt, level, "UDN = %s", sr_event->UDN); +- upnp_igd_print(igd_ctxt, level, "SID = %s", sr_event->Sid); ++ upnp_igd_print(igd_ctxt, level, "ServiceID = %s", UpnpSubscriptionRequest_get_ServiceId_cstr(sr_event)); ++ upnp_igd_print(igd_ctxt, level, "UDN = %s", UpnpSubscriptionRequest_get_UDN_cstr(sr_event)); ++ upnp_igd_print(igd_ctxt, level, "SID = %s", UpnpSubscriptionRequest_get_SID_cstr(sr_event)); + break; + } + case UPNP_EVENT_RECEIVED: { +- struct Upnp_Event *e_event = (struct Upnp_Event *)Event; ++ UpnpEvent *e_event = (UpnpEvent *)Event; + char *xmlbuff = NULL; + +- upnp_igd_print(igd_ctxt, level, "SID = %s", e_event->Sid); +- upnp_igd_print(igd_ctxt, level, "EventKey = %d", e_event->EventKey); +- xmlbuff = ixmlPrintNode((IXML_Node *)e_event->ChangedVariables); ++ upnp_igd_print(igd_ctxt, level, "SID = %s", UpnpEvent_get_SID_cstr(e_event)); ++ upnp_igd_print(igd_ctxt, level, "EventKey = %d", UpnpEvent_get_EventKey(e_event)); ++ xmlbuff = ixmlPrintNode((IXML_Node *)UpnpEvent_get_ChangedVariables(e_event)); + upnp_igd_print(igd_ctxt, level, "ChangedVars = %s", xmlbuff); + ixmlFreeDOMString(xmlbuff); + xmlbuff = NULL; + break; + } + case UPNP_EVENT_RENEWAL_COMPLETE: { +- struct Upnp_Event_Subscribe *es_event = +- (struct Upnp_Event_Subscribe *)Event; ++ UpnpEventSubscribe *es_event = ++ (UpnpEventSubscribe *)Event; + +- upnp_igd_print(igd_ctxt, level, "SID = %s", es_event->Sid); ++ upnp_igd_print(igd_ctxt, level, "SID = %s", UpnpEventSubscribe_get_SID_cstr(es_event)); + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "TimeOut = %d", es_event->TimeOut); ++ UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event)); ++ upnp_igd_print(igd_ctxt, level, "TimeOut = %d", UpnpEventSubscribe_get_TimeOut(es_event)); + break; + } + case UPNP_EVENT_SUBSCRIBE_COMPLETE: + case UPNP_EVENT_UNSUBSCRIBE_COMPLETE: { +- struct Upnp_Event_Subscribe *es_event = +- (struct Upnp_Event_Subscribe *)Event; ++ UpnpEventSubscribe *es_event = ++ (UpnpEventSubscribe *)Event; + +- upnp_igd_print(igd_ctxt, level, "SID = %s", es_event->Sid); ++ upnp_igd_print(igd_ctxt, level, "SID = %s", UpnpEventSubscribe_get_SID_cstr(es_event)); + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "PublisherURL= %s", es_event->PublisherUrl); +- upnp_igd_print(igd_ctxt, level, "TimeOut = %d", es_event->TimeOut); ++ UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event)); ++ upnp_igd_print(igd_ctxt, level, "PublisherURL= %s", UpnpEventSubscribe_get_PublisherUrl_cstr(es_event)); ++ upnp_igd_print(igd_ctxt, level, "TimeOut = %d", UpnpEventSubscribe_get_TimeOut(es_event)); + break; + } + case UPNP_EVENT_AUTORENEWAL_FAILED: + case UPNP_EVENT_SUBSCRIPTION_EXPIRED: { +- struct Upnp_Event_Subscribe *es_event = +- (struct Upnp_Event_Subscribe *)Event; ++ UpnpEventSubscribe *es_event = ++ (UpnpEventSubscribe *)Event; + +- upnp_igd_print(igd_ctxt, level, "SID = %s", es_event->Sid); ++ upnp_igd_print(igd_ctxt, level, "SID = %s", UpnpEventSubscribe_get_SID_cstr(es_event)); + upnp_igd_print(igd_ctxt, level, "ErrCode = %s(%d)", +- UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode); +- upnp_igd_print(igd_ctxt, level, "PublisherURL= %s", es_event->PublisherUrl); +- upnp_igd_print(igd_ctxt, level, "TimeOut = %d", es_event->TimeOut); ++ UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event)); ++ upnp_igd_print(igd_ctxt, level, "PublisherURL= %s", UpnpEventSubscribe_get_PublisherUrl_cstr(es_event)); ++ upnp_igd_print(igd_ctxt, level, "TimeOut = %d", UpnpEventSubscribe_get_TimeOut(es_event)); + break; + } + } +diff -ur mediastreamer-2.16.1/src/upnp/upnp_igd_utils.h mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_utils.h +--- mediastreamer-2.16.1/src/upnp/upnp_igd_utils.h 2017-04-06 11:27:56.000000000 +0200 ++++ mediastreamer-2.16.1-upnp-1.14/src/upnp/upnp_igd_utils.h 2020-10-24 09:57:35.918190644 +0200 +@@ -39,7 +39,7 @@ + + void upnp_igd_print(upnp_igd_context *uIGD, upnp_igd_print_level level, const char *fmt, ...); + void upnp_igd_print_event_type(upnp_igd_context *uIGD, upnp_igd_print_level level, Upnp_EventType S); +-void upnp_igd_print_event(upnp_igd_context *uIGD, upnp_igd_print_level level, Upnp_EventType EventType, void *Event); ++void upnp_igd_print_event(upnp_igd_context *uIGD, upnp_igd_print_level level, Upnp_EventType EventType, const void *Event); + char *upnp_igd_get_first_document_item(upnp_igd_context *uIGD, IXML_Document *doc, const char *item); + char *upnp_igd_get_element_value(upnp_igd_context *uIGD, IXML_Element *element); + char *upnp_igd_get_first_element_item(upnp_igd_context *uIGD,IXML_Element *element, const char *item); diff --git a/mediastreamer.spec b/mediastreamer.spec index bcea9f2..a286002 100644 --- a/mediastreamer.spec +++ b/mediastreamer.spec @@ -17,13 +17,14 @@ Summary: Audio/Video real-time streaming Summary(pl.UTF-8): Przesyłanie strumieni audio/video w czasie rzeczywistym Name: mediastreamer Version: 2.16.1 -Release: 8 +Release: 9 License: GPL v2+ Group: Libraries Source0: https://linphone.org/releases/sources/mediastreamer/%{name}-%{version}.tar.gz # Source0-md5: 15b8b129a922180855d04d58cdd08d43 Patch0: build.patch Patch1: libsrtp2.patch +Patch2: libupnp-1.14.patch URL: http://www.linphone.org/technical-corner/mediastreamer2/overview %{?with_opengl:BuildRequires: OpenGL-GLX-devel} BuildRequires: SDL-devel >= 1.2.0 @@ -44,7 +45,7 @@ BuildRequires: libgsm-devel %{?with_pcap:BuildRequires: libpcap-devel} BuildRequires: libtheora-devel >= 1.0-0.alpha7 BuildRequires: libtool >= 2:2 -BuildRequires: libupnp1.6-devel +BuildRequires: libupnp-devel BuildRequires: libv4l-devel BuildRequires: libvpx-devel >= 0.9.6 %{?with_matroska:BuildRequires: matroska-foundation-devel} @@ -66,7 +67,7 @@ Requires: bctoolbox >= 0.4.0 %{?with_zrtp:Requires: bzrtp >= 1.0.6} %{?with_opengl:Requires: glew >= 1.5} Requires: libtheora >= 1.0-0.alpha7 -Requires: libupnp1.6 +Requires: libupnp Requires: libvpx >= 0.9.6 Requires: opus >= 0.9.0 Requires: ortp >= 1.0.0 @@ -99,7 +100,7 @@ Requires: bctoolbox-devel >= 0.4.0 Requires: ffmpeg-devel %{?with_opengl:Requires: glew-devel >= 1.5} Requires: libtheora-devel >= 1.0-0.alpha7 -Requires: libupnp1.6-devel +Requires: libupnp-devel Requires: libv4l-devel Requires: libvpx-devel >= 0.9.6 %{?with_matroska:Requires: matroska-foundation-devel} @@ -137,6 +138,7 @@ Statyczne biblioteki mediastreamer. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 [ ! -e gitversion.h ] && echo '#define MS2_GIT_VERSION "%{version}"' > src/gitversion.h -- 2.44.0