File: 0001-pr320.patch

package info (click to toggle)
kodi-inputstream-ffmpegdirect 21.3.8%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,548 kB
  • sloc: cpp: 6,758; xml: 140; sh: 45; python: 15; makefile: 10
file content (96 lines) | stat: -rw-r--r-- 2,942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From bd32ef072f01aa157e61b3ca50157305d6f12f49 Mon Sep 17 00:00:00 2001
From: David Sh <7243697+David-EIPI@users.noreply.github.com>
Date: Fri, 28 Mar 2025 16:13:39 -0400
Subject: [PATCH 1/3] Put CVariant into ffmpegdirect namespace to avoid
 collision with CVariant in the main XBMC tree.

---
 src/stream/url/URL.cpp        | 1 +
 src/stream/url/UrlOptions.cpp | 2 +-
 src/stream/url/UrlOptions.h   | 4 ++--
 src/stream/url/Variant.cpp    | 2 ++
 src/stream/url/Variant.h      | 4 ++++
 5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/stream/url/URL.cpp b/src/stream/url/URL.cpp
index a01f4b1c..76060fca 100644
--- a/src/stream/url/URL.cpp
+++ b/src/stream/url/URL.cpp
@@ -25,6 +25,7 @@
 #include <kodi/tools/StringUtils.h>
 
 using namespace kodi::tools;
+using namespace ffmpegdirect;
 //using namespace ADDON;
 
 namespace
diff --git a/src/stream/url/UrlOptions.cpp b/src/stream/url/UrlOptions.cpp
index 38b42c46..d8d50a3b 100644
--- a/src/stream/url/UrlOptions.cpp
+++ b/src/stream/url/UrlOptions.cpp
@@ -157,7 +157,7 @@ bool CUrlOptions::HasOption(const std::string &key) const
   return m_options.find(key) != m_options.end();
 }
 
-bool CUrlOptions::GetOption(const std::string &key, CVariant &value) const
+bool CUrlOptions::GetOption(const std::string &key, ffmpegdirect::CVariant &value) const
 {
   if (key.empty())
     return false;
diff --git a/src/stream/url/UrlOptions.h b/src/stream/url/UrlOptions.h
index 589206e1..67e457dd 100644
--- a/src/stream/url/UrlOptions.h
+++ b/src/stream/url/UrlOptions.h
@@ -15,7 +15,7 @@
 class CUrlOptions
 {
 public:
-  typedef std::map<std::string, CVariant> UrlOptions;
+  typedef std::map<std::string, ffmpegdirect::CVariant> UrlOptions;
 
   CUrlOptions();
   CUrlOptions(const std::string &options, const char *strLead = "");
@@ -37,7 +37,7 @@ class CUrlOptions
   virtual void RemoveOption(const std::string &key);
 
   bool HasOption(const std::string &key) const;
-  bool GetOption(const std::string &key, CVariant &value) const;
+  bool GetOption(const std::string &key, ffmpegdirect::CVariant &value) const;
 
 protected:
   UrlOptions m_options;
diff --git a/src/stream/url/Variant.cpp b/src/stream/url/Variant.cpp
index a6ba76bf..1593dfbb 100644
--- a/src/stream/url/Variant.cpp
+++ b/src/stream/url/Variant.cpp
@@ -11,6 +11,8 @@
 #include <string.h>
 #include <utility>
 
+using namespace ffmpegdirect;
+
 #ifndef strtoll
 #ifdef TARGET_WINDOWS
 #define strtoll  _strtoi64
diff --git a/src/stream/url/Variant.h b/src/stream/url/Variant.h
index 5f609c11..28e6e840 100644
--- a/src/stream/url/Variant.h
+++ b/src/stream/url/Variant.h
@@ -25,6 +25,8 @@ double str2double(const std::wstring &str, double fallback = 0.0);
 #pragma pack(8)
 #endif
 
+namespace ffmpegdirect
+{
 class CVariant
 {
 public:
@@ -162,6 +164,8 @@ class CVariant
   static VariantMap EMPTY_MAP;
 };
 
+} // namespace ffmpegdirect
+
 #ifdef TARGET_WINDOWS_STORE
 #pragma pack(pop)
 #endif