]> git.pld-linux.org Git - packages/opal.git/blob - opal-cxx11.patch
- updated to 3.18.8
[packages/opal.git] / opal-cxx11.patch
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
3 @@ -52,6 +52,7 @@
4  #include <ptclib/script.h>
5  #endif
6  
7 +#include <memory>
8  
9  class OpalEndPoint;
10  class OpalCall;
11 @@ -1931,10 +1932,10 @@ class OpalConnection : public PSafeObjec
12      virtual void DisableRecording();
13  
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);
17  #if OPAL_VIDEO
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);
21  #endif
22  
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
27      return;
28  
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));
35  }
36  
37  
38 -void OpalConnection::InternalOnRecordAudio(PString key, PAutoPtr<RTP_DataFrame> frame)
39 +void OpalConnection::InternalOnRecordAudio(PString key, std::shared_ptr<RTP_DataFrame> frame)
40  {
41    m_ownerCall.OnRecordAudio(key, *frame);
42  }
43 @@ -1192,13 +1192,13 @@ void OpalConnection::InternalOnRecordAud
44  void OpalConnection::OnRecordVideo(RTP_DataFrame & frame, P_INT_PTR param)
45  {
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));
52  }
53  
54  
55 -void OpalConnection::InternalOnRecordVideo(PString key, PAutoPtr<RTP_DataFrame> frame)
56 +void OpalConnection::InternalOnRecordVideo(PString key, std::shared_ptr<RTP_DataFrame> frame)
57  {
58    m_ownerCall.OnRecordVideo(key, *frame);
59  }
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
62 @@ -44,6 +44,7 @@
63  #include <im/im.h>
64  
65  #include <list>
66 +#include <memory>
67  #include <queue>
68  
69  class OpalManager;
70 @@ -337,10 +338,10 @@ class OpalPresentity : public PSafeObjec
71        const OpalPresenceInfo & info ///< Info on other presentity that changed state
72      );
73  
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>)
82  
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())
89      return;
90  
91 -  PAutoPtr<OpalPresenceInfo> pinfo(info.CloneAs<OpalPresenceInfo>());
92 +  std::shared_ptr<OpalPresenceInfo> pinfo(info.CloneAs<OpalPresenceInfo>());
93    m_onPresenceChangeNotifier(*this, pinfo);
94  }
95  
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);
100  }
101  
102 -void OpalManager_C::OnPresenceChange(OpalPresentity &, PAutoPtr<OpalPresenceInfo> info)
103 +void OpalManager_C::OnPresenceChange(OpalPresentity &, std::shared_ptr<OpalPresenceInfo> info)
104  {
105    OpalMessageBuffer message(OpalIndPresenceChange);
106    SET_MESSAGE_STRING(message, m_param.m_presenceStatus.m_entity,   info->m_entity.AsString());
This page took 0.110842 seconds and 3 git commands to generate.