1 --- opal-3.18.8/include/opal/connection.h.orig 2022-03-27 16:06:21.000000000 +0200
2 +++ opal-3.18.8/include/opal/connection.h 2022-04-18 19:11:37.004196964 +0200
4 #include <ptclib/script.h>
11 @@ -1931,10 +1932,10 @@ class OpalConnection : public PSafeObjec
12 virtual void DisableRecording();
14 PDECLARE_NOTIFIER(RTP_DataFrame, OpalConnection, OnRecordAudio);
15 - void InternalOnRecordAudio(PString key, PAutoPtr<RTP_DataFrame> frame);
16 + void InternalOnRecordAudio(PString key, std::shared_ptr<RTP_DataFrame> frame);
18 PDECLARE_NOTIFIER(RTP_DataFrame, OpalConnection, OnRecordVideo);
19 - void InternalOnRecordVideo(PString key, PAutoPtr<RTP_DataFrame> frame);
20 + void InternalOnRecordVideo(PString key, std::shared_ptr<RTP_DataFrame> frame);
23 virtual void OnStartRecording(OpalMediaPatch * patch);
24 --- opal-3.18.8/src/opal/connection.cxx.orig 2022-03-27 16:06:21.000000000 +0200
25 +++ opal-3.18.8/src/opal/connection.cxx 2022-04-18 18:52:42.030345645 +0200
26 @@ -1175,13 +1175,13 @@ void OpalConnection::OnRecordAudio(RTP_D
29 const OpalMediaPatch * patch = (const OpalMediaPatch *)param;
30 - PAutoPtr<RTP_DataFrame> copyFrame(new RTP_DataFrame(frame.GetPointer(), frame.GetPacketSize()));
31 - GetEndPoint().GetManager().QueueDecoupledEvent(new PSafeWorkArg2<OpalConnection, PString, PAutoPtr<RTP_DataFrame> >(
32 + std::shared_ptr<RTP_DataFrame> copyFrame(new RTP_DataFrame(frame.GetPointer(), frame.GetPacketSize()));
33 + GetEndPoint().GetManager().QueueDecoupledEvent(new PSafeWorkArg2<OpalConnection, PString, std::shared_ptr<RTP_DataFrame> >(
34 this, MakeRecordingKey(*patch), copyFrame, &OpalConnection::InternalOnRecordAudio), psprintf("%p", this));
38 -void OpalConnection::InternalOnRecordAudio(PString key, PAutoPtr<RTP_DataFrame> frame)
39 +void OpalConnection::InternalOnRecordAudio(PString key, std::shared_ptr<RTP_DataFrame> frame)
41 m_ownerCall.OnRecordAudio(key, *frame);
43 @@ -1192,13 +1192,13 @@ void OpalConnection::InternalOnRecordAud
44 void OpalConnection::OnRecordVideo(RTP_DataFrame & frame, P_INT_PTR param)
46 const OpalMediaPatch * patch = (const OpalMediaPatch *)param;
47 - PAutoPtr<RTP_DataFrame> copyFrame(new RTP_DataFrame(frame.GetPointer(), frame.GetPacketSize()));
48 - GetEndPoint().GetManager().QueueDecoupledEvent(new PSafeWorkArg2<OpalConnection, PString, PAutoPtr<RTP_DataFrame> >(
49 + std::shared_ptr<RTP_DataFrame> copyFrame(new RTP_DataFrame(frame.GetPointer(), frame.GetPacketSize()));
50 + GetEndPoint().GetManager().QueueDecoupledEvent(new PSafeWorkArg2<OpalConnection, PString, std::shared_ptr<RTP_DataFrame> >(
51 this, MakeRecordingKey(*patch), copyFrame, &OpalConnection::InternalOnRecordVideo), psprintf("%p", this));
55 -void OpalConnection::InternalOnRecordVideo(PString key, PAutoPtr<RTP_DataFrame> frame)
56 +void OpalConnection::InternalOnRecordVideo(PString key, std::shared_ptr<RTP_DataFrame> frame)
58 m_ownerCall.OnRecordVideo(key, *frame);
60 --- opal-3.18.8/include/opal/pres_ent.h.orig 2022-03-27 16:06:21.000000000 +0200
61 +++ opal-3.18.8/include/opal/pres_ent.h 2022-04-18 19:32:14.790824632 +0200
70 @@ -337,10 +338,10 @@ class OpalPresentity : public PSafeObjec
71 const OpalPresenceInfo & info ///< Info on other presentity that changed state
74 - typedef PNotifierTemplate< PAutoPtr<OpalPresenceInfo> > PresenceChangeNotifier;
75 - #define PDECLARE_PresenceChangeNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalPresentity, cls, fn, PAutoPtr<OpalPresenceInfo>)
76 - #define PDECLARE_ASYNC_PresenceChangeNotifier(cls, fn) PDECLARE_ASYNC_NOTIFIER2(OpalPresentity, cls, fn, PAutoPtr<OpalPresenceInfo>)
77 - #define PCREATE_PresenceChangeNotifier(fn) PCREATE_NOTIFIER2(fn, PAutoPtr<OpalPresenceInfo>)
78 + typedef PNotifierTemplate< std::shared_ptr<OpalPresenceInfo> > PresenceChangeNotifier;
79 + #define PDECLARE_PresenceChangeNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalPresentity, cls, fn, std::shared_ptr<OpalPresenceInfo>)
80 + #define PDECLARE_ASYNC_PresenceChangeNotifier(cls, fn) PDECLARE_ASYNC_NOTIFIER2(OpalPresentity, cls, fn, std::shared_ptr<OpalPresenceInfo>)
81 + #define PCREATE_PresenceChangeNotifier(fn) PCREATE_NOTIFIER2(fn, std::shared_ptr<OpalPresenceInfo>)
83 /// Set the notifier for the OnPresenceChange() function.
84 void SetPresenceChangeNotifier(
85 --- opal-3.18.8/src/opal/pres_ent.cxx.orig 2022-03-27 16:06:21.000000000 +0200
86 +++ opal-3.18.8/src/opal/pres_ent.cxx 2022-04-18 19:35:12.363195973 +0200
87 @@ -323,7 +323,7 @@ void OpalPresentity::OnPresenceChange(co
88 if (m_onPresenceChangeNotifier.IsNULL())
91 - PAutoPtr<OpalPresenceInfo> pinfo(info.CloneAs<OpalPresenceInfo>());
92 + std::shared_ptr<OpalPresenceInfo> pinfo(info.CloneAs<OpalPresenceInfo>());
93 m_onPresenceChangeNotifier(*this, pinfo);
96 --- opal-3.18.8/src/opal/opal_c.cxx.orig 2022-03-27 16:06:21.000000000 +0200
97 +++ opal-3.18.8/src/opal/opal_c.cxx 2022-04-18 19:32:26.250762548 +0200
98 @@ -2969,7 +2969,7 @@ PString ConvertStringSetWithoutLastNewin
99 return strm.Left(strm.GetLength()-1);
102 -void OpalManager_C::OnPresenceChange(OpalPresentity &, PAutoPtr<OpalPresenceInfo> info)
103 +void OpalManager_C::OnPresenceChange(OpalPresentity &, std::shared_ptr<OpalPresenceInfo> info)
105 OpalMessageBuffer message(OpalIndPresenceChange);
106 SET_MESSAGE_STRING(message, m_param.m_presenceStatus.m_entity, info->m_entity.AsString());