Merge branch 'master' of https://github.com/Bubble-be/void-packages
This commit is contained in:
commit
652d1c9ef0
|
@ -1,16 +1,16 @@
|
|||
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
index ae7ccb5..d8fd7fc 100644
|
||||
index ab14942..cf9d73d 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
+#include <paths.h>
|
||||
#ifdef TARGET_POSIX
|
||||
#include "PlatformDefs.h" // for __stat64
|
||||
#endif
|
||||
@@ -466,13 +467,10 @@ extern "C"
|
||||
#include "XFileUtils.h"
|
||||
@@ -476,13 +477,10 @@ extern "C"
|
||||
EmuFileObject* o = g_emuFileWrapper.GetFileObjectByDescriptor(fd);
|
||||
if (o)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
}
|
||||
else if (!IS_STD_DESCRIPTOR(fd))
|
||||
{
|
||||
@@ -535,7 +533,7 @@ extern "C"
|
||||
@@ -545,7 +543,7 @@ extern "C"
|
||||
return -1;
|
||||
}
|
||||
object->mode = iMode;
|
||||
|
@ -34,7 +34,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
}
|
||||
delete pFile;
|
||||
return -1;
|
||||
@@ -1181,8 +1179,8 @@ extern "C"
|
||||
@@ -1214,8 +1212,8 @@ extern "C"
|
||||
{
|
||||
FILE* file = NULL;
|
||||
#if defined(TARGET_LINUX) && !defined(TARGET_ANDROID)
|
||||
|
@ -45,7 +45,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
{
|
||||
CLog::Log(LOGINFO, "%s - something opened the mount file, let's hope it knows what it's doing", __FUNCTION__);
|
||||
return fopen(filename, mode);
|
||||
@@ -1572,7 +1570,7 @@ extern "C"
|
||||
@@ -1622,7 +1620,7 @@ extern "C"
|
||||
int ret;
|
||||
|
||||
ret = dll_fgetpos64(stream, &tmpPos);
|
||||
|
@ -54,7 +54,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
*pos = (fpos_t)tmpPos;
|
||||
#else
|
||||
pos->__pos = (off_t)tmpPos.__pos;
|
||||
@@ -1585,8 +1583,9 @@ extern "C"
|
||||
@@ -1635,8 +1633,9 @@ extern "C"
|
||||
CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream);
|
||||
if (pFile != NULL)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
#else
|
||||
pos->__pos = pFile->GetPosition();
|
||||
#endif
|
||||
@@ -1607,8 +1606,9 @@ extern "C"
|
||||
@@ -1657,8 +1656,9 @@ extern "C"
|
||||
int fd = g_emuFileWrapper.GetDescriptorByStream(stream);
|
||||
if (fd >= 0)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
#else
|
||||
if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0)
|
||||
#endif
|
||||
@@ -1624,7 +1624,7 @@ extern "C"
|
||||
@@ -1674,7 +1674,7 @@ extern "C"
|
||||
{
|
||||
// it might be something else than a file, or the file is not emulated
|
||||
// let the operating system handle it
|
||||
|
@ -87,7 +87,7 @@ index ae7ccb5..d8fd7fc 100644
|
|||
return fsetpos(stream, pos);
|
||||
#else
|
||||
return fsetpos64(stream, pos);
|
||||
@@ -1640,7 +1640,7 @@ extern "C"
|
||||
@@ -1690,7 +1690,7 @@ extern "C"
|
||||
if (fd >= 0)
|
||||
{
|
||||
fpos64_t tmpPos;
|
||||
|
@ -97,10 +97,10 @@ index ae7ccb5..d8fd7fc 100644
|
|||
#else
|
||||
tmpPos.__pos = (off64_t)(pos->__pos);
|
||||
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
index ae9b1c4..3b19122 100644
|
||||
index 3294d9a..3ce8b24 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -24,7 +24,7 @@
|
||||
#define _onexit_t void*
|
||||
#endif
|
||||
|
||||
|
@ -110,10 +110,10 @@ index ae9b1c4..3b19122 100644
|
|||
typedef int64_t off64_t;
|
||||
typedef off64_t __off64_t;
|
||||
diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
index cf8a060..9110312 100644
|
||||
index 8927d41..0e78707 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
+++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
@@ -27,12 +27,7 @@ CEmuFileWrapper g_emuFileWrapper;
|
||||
@@ -53,15 +53,7 @@ constexpr bool isValidFilePtr(FILE* f)
|
||||
CEmuFileWrapper::CEmuFileWrapper()
|
||||
{
|
||||
// since we always use dlls we might just initialize it directly
|
||||
|
@ -121,13 +121,16 @@ index cf8a060..9110312 100644
|
|||
- {
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
-#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900)
|
||||
- m_files[i].file_emu._Placeholder = new kodi_iobuf();
|
||||
-#endif
|
||||
- FileDescriptor(m_files[i].file_emu)->_file = -1;
|
||||
- }
|
||||
+ memset(m_files, 0, sizeof(m_files));
|
||||
}
|
||||
|
||||
CEmuFileWrapper::~CEmuFileWrapper()
|
||||
@@ -43,22 +38,7 @@ void CEmuFileWrapper::CleanUp()
|
||||
@@ -73,29 +65,7 @@ void CEmuFileWrapper::CleanUp()
|
||||
{
|
||||
CSingleLock lock(m_criticalSection);
|
||||
for (int i = 0; i < MAX_EMULATED_FILES; i++)
|
||||
|
@ -140,18 +143,25 @@ index cf8a060..9110312 100644
|
|||
- if (m_files[i].file_lock)
|
||||
- {
|
||||
- delete m_files[i].file_lock;
|
||||
- m_files[i].file_lock = NULL;
|
||||
- m_files[i].file_lock = nullptr;
|
||||
- }
|
||||
-#if !defined(TARGET_WINDOWS)
|
||||
- //Don't memset on Windows as it overwrites our pointer
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
-#endif
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
- FileDescriptor(m_files[i].file_emu)->_file = -1;
|
||||
- }
|
||||
-#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900)
|
||||
- delete static_cast<kodi_iobuf*>(m_files[i].file_emu._Placeholder);
|
||||
- m_files[i].file_emu._Placeholder = nullptr;
|
||||
-#endif
|
||||
- }
|
||||
+ UnRegisterFileObject(&m_files[i], true);
|
||||
}
|
||||
|
||||
EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
@@ -69,13 +49,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
@@ -106,13 +76,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
|
||||
for (int i = 0; i < MAX_EMULATED_FILES; i++)
|
||||
{
|
||||
|
@ -162,11 +172,11 @@ index cf8a060..9110312 100644
|
|||
object = &m_files[i];
|
||||
- object->used = true;
|
||||
object->file_xbmc = pFile;
|
||||
- object->file_emu._file = (i + FILE_WRAPPER_OFFSET);
|
||||
- FileDescriptor(object->file_emu)->_file = (i + FILE_WRAPPER_OFFSET);
|
||||
object->file_lock = new CCriticalSection();
|
||||
break;
|
||||
}
|
||||
@@ -84,82 +62,71 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
@@ -121,82 +89,70 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
return object;
|
||||
}
|
||||
|
||||
|
@ -174,49 +184,49 @@ index cf8a060..9110312 100644
|
|||
+void CEmuFileWrapper::UnRegisterFileObject(EmuFileObject *object, bool free_file)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
+ if (object && object->file_xbmc)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
+ if (object->file_xbmc && free_file)
|
||||
{
|
||||
- if (! (i >= 0 && i < MAX_EMULATED_FILES))
|
||||
+ if (! (object && object->file_xbmc))
|
||||
return;
|
||||
|
||||
- if (!m_files[i].used)
|
||||
- return;
|
||||
-
|
||||
- CSingleLock lock(m_criticalSection);
|
||||
-
|
||||
- // we assume the emulated function alreay deleted the CFile object
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- if (m_files[i].file_lock)
|
||||
- {
|
||||
+ if (object->file_xbmc && free_file)
|
||||
{
|
||||
- delete m_files[i].file_lock;
|
||||
- m_files[i].file_lock = NULL;
|
||||
- }
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
- }
|
||||
- m_files[i].file_lock = nullptr;
|
||||
+ CSingleLock lock(m_criticalSection);
|
||||
+
|
||||
+ object->file_xbmc->Close();
|
||||
+ delete object->file_xbmc;
|
||||
}
|
||||
-#if !defined(TARGET_WINDOWS)
|
||||
- //Don't memset on Windows as it overwrites our pointer
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
-#endif
|
||||
- m_files[i].used = false;
|
||||
- FileDescriptor(m_files[i].file_emu)->_file = -1;
|
||||
+ if (object->file_lock)
|
||||
+ {
|
||||
+ delete object->file_lock;
|
||||
+ }
|
||||
+
|
||||
+ memset(object, 0, sizeof(*object));
|
||||
}
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
+void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd)
|
||||
+{
|
||||
+ CSingleLock lock(m_criticalSection);
|
||||
+ UnRegisterFileObject(GetFileObjectByDescriptor(fd), false);
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
void CEmuFileWrapper::UnRegisterFileObjectByStream(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- if (isValidFilePtr(stream))
|
||||
- {
|
||||
- return UnRegisterFileObjectByDescriptor(stream->_file);
|
||||
- return UnRegisterFileObjectByDescriptor(FileDescriptor(*stream)->_file);
|
||||
- }
|
||||
+ CSingleLock lock(m_criticalSection);
|
||||
+ UnRegisterFileObject(GetFileObjectByStream(stream), false);
|
||||
|
@ -238,37 +248,32 @@ index cf8a060..9110312 100644
|
|||
}
|
||||
|
||||
bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd)
|
||||
-{
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- return m_files[i].file_lock->try_lock();
|
||||
- }
|
||||
+{
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
+ {
|
||||
+ return object->file_lock->try_lock();
|
||||
}
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
void CEmuFileWrapper::UnlockFileObjectByDescriptor(int fd)
|
||||
-{
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- m_files[i].file_lock->unlock();
|
||||
- }
|
||||
+{
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
+ {
|
||||
+ object->file_lock->unlock();
|
||||
}
|
||||
}
|
||||
|
@ -284,18 +289,18 @@ index cf8a060..9110312 100644
|
|||
{
|
||||
return &m_files[i];
|
||||
}
|
||||
@@ -167,20 +134,38 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd)
|
||||
return NULL;
|
||||
@@ -204,20 +160,38 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
-EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream)
|
||||
+int CEmuFileWrapper::GetDescriptorByFileObject(EmuFileObject *object)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- if (isValidFilePtr(stream))
|
||||
+ int i = object - m_files;
|
||||
+ if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
{
|
||||
- return GetFileObjectByDescriptor(stream->_file);
|
||||
- return GetFileObjectByDescriptor(FileDescriptor(*stream)->_file);
|
||||
+ return 0x7000000 + i;
|
||||
}
|
||||
+ return -1;
|
||||
|
@ -311,7 +316,7 @@ index cf8a060..9110312 100644
|
|||
+ return object;
|
||||
+ }
|
||||
+ }
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+FILE* CEmuFileWrapper::GetStreamByFileObject(EmuFileObject *object)
|
||||
|
@ -321,33 +326,33 @@ index cf8a060..9110312 100644
|
|||
+
|
||||
XFILE::CFile* CEmuFileWrapper::GetFileXbmcByDescriptor(int fd)
|
||||
{
|
||||
EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != NULL && object->used)
|
||||
+ if (object != NULL)
|
||||
auto object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != nullptr && object->used)
|
||||
+ if (object != nullptr)
|
||||
{
|
||||
return object->file_xbmc;
|
||||
}
|
||||
@@ -191,8 +176,8 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
@@ -228,8 +202,8 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
{
|
||||
if (stream != NULL)
|
||||
if (isValidFilePtr(stream))
|
||||
{
|
||||
- EmuFileObject* object = GetFileObjectByDescriptor(stream->_file);
|
||||
- if (object != NULL && object->used)
|
||||
+ EmuFileObject* object = GetFileObjectByStream(stream);
|
||||
+ if (object != NULL)
|
||||
- auto object = GetFileObjectByDescriptor(FileDescriptor(*stream)->_file);
|
||||
- if (object != nullptr && object->used)
|
||||
+ auto object = GetFileObjectByStream(stream);
|
||||
+ if (object != nullptr)
|
||||
{
|
||||
return object->file_xbmc;
|
||||
}
|
||||
@@ -202,42 +187,20 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
@@ -239,32 +213,25 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
|
||||
int CEmuFileWrapper::GetDescriptorByStream(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- if (isValidFilePtr(stream))
|
||||
- {
|
||||
- int i = stream->_file - FILE_WRAPPER_OFFSET;
|
||||
- int i = FileDescriptor(*stream)->_file - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- return stream->_file;
|
||||
- return i + FILE_WRAPPER_OFFSET;
|
||||
- }
|
||||
- }
|
||||
- return -1;
|
||||
|
@ -356,40 +361,35 @@ index cf8a060..9110312 100644
|
|||
|
||||
FILE* CEmuFileWrapper::GetStreamByDescriptor(int fd)
|
||||
{
|
||||
- EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != NULL && object->used)
|
||||
- auto object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != nullptr && object->used)
|
||||
- {
|
||||
- return &object->file_emu;
|
||||
- }
|
||||
- return NULL;
|
||||
- return nullptr;
|
||||
+ return GetStreamByFileObject(GetFileObjectByDescriptor(fd));
|
||||
}
|
||||
|
||||
bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- return true;
|
||||
- }
|
||||
- return false;
|
||||
+ return GetFileObjectByDescriptor(fd) != NULL;
|
||||
}
|
||||
|
||||
bool CEmuFileWrapper::StreamIsEmulatedFile(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- {
|
||||
- return DescriptorIsEmulatedFile(stream->_file);
|
||||
- }
|
||||
- return false;
|
||||
+ return GetFileObjectByStream(stream) != NULL;
|
||||
if (isValidFilePtr(stream))
|
||||
{
|
||||
- return DescriptorIsEmulatedFile(FileDescriptor(*stream)->_file);
|
||||
+ return DescriptorIsEmulatedFile(GetDescriptorByStream(stream));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd)
|
||||
+{
|
||||
+ return GetFileObjectByDescriptor(fd) != NULL;
|
||||
+}
|
||||
+
|
||||
diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
index 3d79c7a..1b3e62f 100644
|
||||
index 786fa85..311a5cf 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
+++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
@@ -27,14 +27,14 @@
|
||||
@@ -25,14 +25,14 @@
|
||||
#include "system.h"
|
||||
#include "threads/CriticalSection.h"
|
||||
|
||||
|
@ -405,26 +405,25 @@ index 3d79c7a..1b3e62f 100644
|
|||
+//#endif
|
||||
|
||||
#define MAX_EMULATED_FILES 50
|
||||
-#define FILE_WRAPPER_OFFSET 0x00000100
|
||||
+//#define FILE_WRAPPER_OFFSET 0x00000100
|
||||
-#define FILE_WRAPPER_OFFSET 0x00000200
|
||||
+//#define FILE_WRAPPER_OFFSET 0x00000200
|
||||
|
||||
namespace XFILE
|
||||
{
|
||||
@@ -43,11 +43,9 @@ namespace XFILE
|
||||
@@ -47,12 +47,9 @@ struct kodi_iobuf {
|
||||
|
||||
typedef struct stEmuFileObject
|
||||
{
|
||||
- bool used;
|
||||
- FILE file_emu;
|
||||
- XFILE::CFile* file_xbmc;
|
||||
+ XFILE::CFile* file_xbmc;
|
||||
XFILE::CFile* file_xbmc;
|
||||
CCriticalSection *file_lock;
|
||||
- int mode;
|
||||
+ int mode;
|
||||
int mode;
|
||||
- //Stick this last to avoid 3-7 bytes of padding
|
||||
- bool used;
|
||||
} EmuFileObject;
|
||||
|
||||
class CEmuFileWrapper
|
||||
@@ -62,19 +60,22 @@ public:
|
||||
@@ -67,22 +64,22 @@ public:
|
||||
void CleanUp();
|
||||
|
||||
EmuFileObject* RegisterFileObject(XFILE::CFile* pFile);
|
||||
|
@ -434,18 +433,19 @@ index 3d79c7a..1b3e62f 100644
|
|||
void LockFileObjectByDescriptor(int fd);
|
||||
bool TryLockFileObjectByDescriptor(int fd);
|
||||
void UnlockFileObjectByDescriptor(int fd);
|
||||
- EmuFileObject* GetFileObjectByDescriptor(int fd);
|
||||
- EmuFileObject* GetFileObjectByStream(FILE* stream);
|
||||
+ EmuFileObject* GetFileObjectByDescriptor(int fd);
|
||||
EmuFileObject* GetFileObjectByDescriptor(int fd);
|
||||
+ int GetDescriptorByFileObject(EmuFileObject*);
|
||||
+ EmuFileObject* GetFileObjectByStream(FILE* stream);
|
||||
EmuFileObject* GetFileObjectByStream(FILE* stream);
|
||||
+ FILE* GetStreamByFileObject(EmuFileObject*);
|
||||
XFILE::CFile* GetFileXbmcByDescriptor(int fd);
|
||||
XFILE::CFile* GetFileXbmcByStream(FILE* stream);
|
||||
- static int GetDescriptorByStream(FILE* stream);
|
||||
+ int GetDescriptorByStream(FILE* stream);
|
||||
FILE* GetStreamByDescriptor(int fd);
|
||||
- static bool DescriptorIsEmulatedFile(int fd);
|
||||
- static constexpr bool DescriptorIsEmulatedFile(int fd)
|
||||
- {
|
||||
- return fd >= FILE_WRAPPER_OFFSET && fd < FILE_WRAPPER_OFFSET + MAX_EMULATED_FILES;
|
||||
- }
|
||||
- static bool StreamIsEmulatedFile(FILE* stream);
|
||||
+ bool DescriptorIsEmulatedFile(int fd);
|
||||
+ bool StreamIsEmulatedFile(FILE* stream);
|
||||
|
@ -453,7 +453,7 @@ index 3d79c7a..1b3e62f 100644
|
|||
EmuFileObject m_files[MAX_EMULATED_FILES];
|
||||
CCriticalSection m_criticalSection;
|
||||
diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
index a9225e5..355da1c 100644
|
||||
index e363662..4498c27 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
+++ b/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
@@ -39,7 +39,7 @@
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +0,0 @@
|
|||
--- a/xbmc/cores/DllLoader/ldt_keeper.c.orig 2016-03-25 17:39:06.790371676 +0100
|
||||
+++ b/xbmc/cores/DllLoader/ldt_keeper.c 2016-03-25 17:38:24.376370166 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
+#include <syscall.h>
|
||||
#include "mmap_anon.h"
|
||||
#if defined( __linux__ ) && !defined(__powerpc__)
|
||||
#include <asm/unistd.h>
|
||||
@@ -202,7 +203,7 @@ ldt_fs_t* Setup_LDT_Keeper(void)
|
||||
array.limit_in_pages = 0;
|
||||
#ifdef __linux__
|
||||
/* ret=LDT_Modify(0x1, &array, sizeof(struct modify_ldt_ldt_s)); */
|
||||
- ret = modify_ldt(0x1, &array, sizeof(struct modify_ldt_ldt_s));
|
||||
+ ret = syscall(SYS_modify_ldt, 0x1, &array, sizeof(struct modify_ldt_ldt_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
perror("install_fs");
|
|
@ -1,55 +1,56 @@
|
|||
diff -upr xbmc-16.0-Jarvis.orig/configure.ac xbmc-16.0-Jarvis/configure.ac
|
||||
--- xbmc-16.0-Jarvis.orig/configure.ac 2016-03-19 07:28:05.389703445 +0100
|
||||
+++ xbmc-16.0-Jarvis/configure.ac 2016-03-19 07:35:44.771669064 +0100
|
||||
@@ -564,7 +564,7 @@ case $host in
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9bd8d6e..205acfc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -526,7 +526,7 @@ case $host in
|
||||
use_x11=no
|
||||
build_shared_lib=yes
|
||||
;;
|
||||
- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-linux-musl*)
|
||||
+ i*86*-linux-*)
|
||||
target_platform=target_linux
|
||||
CORE_SYSTEM_NAME=linux
|
||||
ARCH="i486-linux"
|
||||
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
|
||||
@@ -586,7 +586,7 @@ case $host in
|
||||
@@ -549,7 +549,7 @@ case $host in
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
|
||||
+ x86_64-*-linux-*)
|
||||
target_platform=target_linux
|
||||
CORE_SYSTEM_NAME=linux
|
||||
ARCH="x86_64-linux"
|
||||
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
|
||||
@@ -645,7 +645,7 @@ case $host in
|
||||
powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
|
||||
ARCH="powerpc64-linux"
|
||||
;;
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*)
|
||||
target_platform=target_linux
|
||||
ARCH="arm"
|
||||
use_arch="arm"
|
||||
diff -upr xbmc-16.0-Jarvis.orig/m4/xbmc_arch.m4 xbmc-16.0-Jarvis/m4/xbmc_arch.m4
|
||||
--- xbmc-16.0-Jarvis.orig/m4/xbmc_arch.m4 2016-02-20 16:21:19.000000000 +0100
|
||||
+++ xbmc-16.0-Jarvis/m4/xbmc_arch.m4 2016-03-19 07:37:37.070660659 +0100
|
||||
diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4
|
||||
index d28f263..6fb6210 100644
|
||||
--- a/m4/xbmc_arch.m4
|
||||
+++ b/m4/xbmc_arch.m4
|
||||
@@ -2,10 +2,10 @@ AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[
|
||||
|
||||
# build detection and setup - this is the native arch
|
||||
case $build in
|
||||
- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-linux-musl*)
|
||||
+ i*86*-linux-*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
|
||||
+ x86_64-*-linux-*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
i386-*-freebsd*)
|
||||
@@ -23,7 +23,7 @@ case $build in
|
||||
powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
|
||||
@@ -17,13 +17,13 @@ case $build in
|
||||
*86*-apple-darwin*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
|
||||
;;
|
||||
- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
|
||||
+ powerpc-*-linux-*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
|
||||
;;
|
||||
- powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
|
||||
+ powerpc64-*-linux-*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
|
||||
;;
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*)
|
||||
+ arm*-*-linux-*)
|
||||
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
*)
|
||||
|
@ -58,20 +59,66 @@ diff -upr xbmc-16.0-Jarvis.orig/m4/xbmc_arch.m4 xbmc-16.0-Jarvis/m4/xbmc_arch.m4
|
|||
# host detection and setup - this is the target arch
|
||||
case $host in
|
||||
- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|*i*86*-linux-musl*)
|
||||
+ i*86*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
|
||||
+ x86_64-*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
i386-*-freebsd*)
|
||||
@@ -60,7 +60,7 @@ case $host in
|
||||
powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
|
||||
@@ -54,16 +54,16 @@ case $host in
|
||||
powerpc-apple-darwin*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
|
||||
;;
|
||||
- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
|
||||
+ powerpc-*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
|
||||
;;
|
||||
- powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*)
|
||||
+ powerpc64*-*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
|
||||
;;
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-linux-musl*)
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
mips*-*-linux-gnu*|mips*-*-linux-uclibc*)
|
||||
- mips*-*-linux-gnu*|mips*-*-linux-uclibc*)
|
||||
+ mips*-*-linux-*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
*-*linux-android*)
|
||||
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
|
||||
index 3626ea5..f178f7a 100644
|
||||
--- a/tools/depends/configure.ac
|
||||
+++ b/tools/depends/configure.ac
|
||||
@@ -120,13 +120,13 @@ platform_cc=gcc
|
||||
platform_cxx=g++
|
||||
|
||||
case $build in
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-*)
|
||||
build_os="linux"
|
||||
;;
|
||||
- *i686*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-*-linux-*)
|
||||
build_os="linux"
|
||||
;;
|
||||
- x86_64*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64*-linux-*)
|
||||
build_os="linux"
|
||||
;;
|
||||
*darwin*)
|
||||
diff --git a/xbmc/cores/DllLoader/ldt_keeper.c b/xbmc/cores/DllLoader/ldt_keeper.c
|
||||
index 3fe6854..ca78612 100644
|
||||
--- a/xbmc/cores/DllLoader/ldt_keeper.c
|
||||
+++ b/xbmc/cores/DllLoader/ldt_keeper.c
|
||||
@@ -48,7 +48,7 @@ extern "C" {
|
||||
#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
|
||||
_syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
|
||||
#else
|
||||
-#if defined(TARGET_ANDROID) && defined(__i386__) && !defined(modify_ldt)
|
||||
+#if defined(__linux__) && !defined(__GLIBC__) && !defined(modify_ldt)
|
||||
#define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c);
|
||||
#else
|
||||
int modify_ldt(int func, void *ptr, unsigned long bytecount);
|
||||
|
|
|
@ -1,641 +0,0 @@
|
|||
|
||||
Changes from original commit are only in file paths & quilt refresh.
|
||||
|
||||
commit c31b7d374062f87c7512d9872cbceac920465913
|
||||
Author: Philip Langdale <philipl@overt.org>
|
||||
Date: Mon Sep 21 19:49:36 2015 -0700
|
||||
|
||||
ffmpeg: Update AVPixelFormat and AV_PIX_FMT_* to compile with master
|
||||
|
||||
The deprecated PixelFormat and PIX_FMT_* names have been removed in
|
||||
ffmpeg master.
|
||||
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/FFmpeg.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "utils/CPUInfo.h"
|
||||
|
||||
extern "C" {
|
||||
-#include "libswscale/swscale.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavutil/avutil.h"
|
||||
@@ -33,23 +32,6 @@ extern "C" {
|
||||
#include "libpostproc/postprocess.h"
|
||||
}
|
||||
|
||||
-inline int SwScaleCPUFlags()
|
||||
-{
|
||||
- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
|
||||
- int flags = 0;
|
||||
-
|
||||
- if (cpuFeatures & CPU_FEATURE_MMX)
|
||||
- flags |= SWS_CPU_CAPS_MMX;
|
||||
- if (cpuFeatures & CPU_FEATURE_MMX2)
|
||||
- flags |= SWS_CPU_CAPS_MMX2;
|
||||
- if (cpuFeatures & CPU_FEATURE_3DNOW)
|
||||
- flags |= SWS_CPU_CAPS_3DNOW;
|
||||
- if (cpuFeatures & CPU_FEATURE_ALTIVEC)
|
||||
- flags |= SWS_CPU_CAPS_ALTIVEC;
|
||||
-
|
||||
- return flags;
|
||||
-}
|
||||
-
|
||||
inline int PPCPUFlags()
|
||||
{
|
||||
unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
|
||||
@@ -39,7 +39,7 @@ extern "C" {
|
||||
#include "libswscale/swscale.h"
|
||||
}
|
||||
|
||||
-// allocate a new picture (PIX_FMT_YUV420P)
|
||||
+// allocate a new picture (AV_PIX_FMT_YUV420P)
|
||||
DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight)
|
||||
{
|
||||
DVDVideoPicture* pPicture = new DVDVideoPicture;
|
||||
@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert
|
||||
|
||||
int dstformat;
|
||||
if (format == RENDER_FMT_UYVY422)
|
||||
- dstformat = PIX_FMT_UYVY422;
|
||||
+ dstformat = AV_PIX_FMT_UYVY422;
|
||||
else
|
||||
- dstformat = PIX_FMT_YUYV422;
|
||||
+ dstformat = AV_PIX_FMT_YUYV422;
|
||||
|
||||
- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P,
|
||||
+ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P,
|
||||
pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat,
|
||||
- SWS_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ SWS_BILINEAR, NULL, NULL, NULL);
|
||||
sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride);
|
||||
sws_freeContext(ctx);
|
||||
}
|
||||
@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur
|
||||
}
|
||||
|
||||
struct EFormatMap {
|
||||
- PixelFormat pix_fmt;
|
||||
+ AVPixelFormat pix_fmt;
|
||||
ERenderFormat format;
|
||||
};
|
||||
|
||||
static const EFormatMap g_format_map[] = {
|
||||
- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
|
||||
-, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
|
||||
-, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
|
||||
-, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
|
||||
-, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
|
||||
-, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
|
||||
-, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
|
||||
-, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
|
||||
-, { PIX_FMT_NONE , RENDER_FMT_NONE }
|
||||
+ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
|
||||
+, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
|
||||
+, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
|
||||
+, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
|
||||
+, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
|
||||
+, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
|
||||
+, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
|
||||
+, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
|
||||
+, { AV_PIX_FMT_NONE , RENDER_FMT_NONE }
|
||||
};
|
||||
|
||||
ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt)
|
||||
{
|
||||
- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
|
||||
+ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
|
||||
{
|
||||
if(p->pix_fmt == fmt)
|
||||
return p->format;
|
||||
@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro
|
||||
|
||||
int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt)
|
||||
{
|
||||
- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
|
||||
+ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
|
||||
{
|
||||
if(p->format == fmt)
|
||||
return p->pix_fmt;
|
||||
}
|
||||
- return PIX_FMT_NONE;
|
||||
+ return AV_PIX_FMT_NONE;
|
||||
}
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
|
||||
@@ -77,8 +77,8 @@ enum DecoderState
|
||||
STATE_SW_MULTI
|
||||
};
|
||||
|
||||
-enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
|
||||
- , const PixelFormat * fmt )
|
||||
+enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
|
||||
+ , const AVPixelFormat * fmt )
|
||||
{
|
||||
CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque;
|
||||
|
||||
@@ -104,8 +104,8 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
|
||||
avctx->hwaccel_context = 0;
|
||||
}
|
||||
|
||||
- const PixelFormat * cur = fmt;
|
||||
- while(*cur != PIX_FMT_NONE)
|
||||
+ const AVPixelFormat * cur = fmt;
|
||||
+ while(*cur != AV_PIX_FMT_NONE)
|
||||
{
|
||||
#ifdef HAVE_LIBVDPAU
|
||||
if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVDPAU))
|
||||
@@ -137,7 +137,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
|
||||
#endif
|
||||
#ifdef HAVE_LIBVA
|
||||
// mpeg4 vaapi decoding is disabled
|
||||
- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
|
||||
+ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
|
||||
{
|
||||
VAAPI::CDecoder* dec = new VAAPI::CDecoder();
|
||||
if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true)
|
||||
@@ -214,11 +214,11 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre
|
||||
|
||||
for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it)
|
||||
{
|
||||
- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
|
||||
+ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
|
||||
if(*it == RENDER_FMT_YUV420P)
|
||||
- m_formats.push_back(PIX_FMT_YUVJ420P);
|
||||
+ m_formats.push_back(AV_PIX_FMT_YUVJ420P);
|
||||
}
|
||||
- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
|
||||
+ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
|
||||
|
||||
pCodec = avcodec_find_decoder(hints.codec);
|
||||
|
||||
@@ -655,7 +655,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom
|
||||
pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc;
|
||||
pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace;
|
||||
if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG
|
||||
- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P)
|
||||
+ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P)
|
||||
pDvdVideoPicture->color_range = 1;
|
||||
else
|
||||
pDvdVideoPicture->color_range = 0;
|
||||
@@ -738,8 +738,8 @@ bool CDVDVideoCodecFFmpeg::GetPicture(DV
|
||||
pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED;
|
||||
pDvdVideoPicture->extended_format = 0;
|
||||
|
||||
- PixelFormat pix_fmt;
|
||||
- pix_fmt = (PixelFormat)m_pFrame->format;
|
||||
+ AVPixelFormat pix_fmt;
|
||||
+ pix_fmt = (AVPixelFormat)m_pFrame->format;
|
||||
|
||||
pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt);
|
||||
return true;
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
public:
|
||||
IHardwareDecoder() {}
|
||||
virtual ~IHardwareDecoder() {};
|
||||
- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0;
|
||||
+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0;
|
||||
virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0;
|
||||
virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0;
|
||||
virtual int Check (AVCodecContext* avctx) = 0;
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
void SetHardware(IHardwareDecoder* hardware);
|
||||
|
||||
protected:
|
||||
- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt);
|
||||
+ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt);
|
||||
|
||||
int FilterOpen(const std::string& filters, bool scale);
|
||||
void FilterClose();
|
||||
@@ -119,7 +119,7 @@ protected:
|
||||
int m_iLastKeyframe;
|
||||
double m_dts;
|
||||
bool m_started;
|
||||
- std::vector<PixelFormat> m_formats;
|
||||
+ std::vector<AVPixelFormat> m_formats;
|
||||
double m_decoderPts;
|
||||
int m_skippedDeint;
|
||||
bool m_requestSkipDeint;
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
@@ -554,11 +554,11 @@ void CDVDVideoCodecVDA::DisplayQueuePop(
|
||||
|
||||
void CDVDVideoCodecVDA::UYVY422_to_YUV420P(uint8_t *yuv422_ptr, int yuv422_stride, DVDVideoPicture *picture)
|
||||
{
|
||||
- // convert PIX_FMT_UYVY422 to PIX_FMT_YUV420P.
|
||||
+ // convert AV_PIX_FMT_UYVY422 to AV_PIX_FMT_YUV420P.
|
||||
struct SwsContext *swcontext = sws_getContext(
|
||||
- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_UYVY422,
|
||||
- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
|
||||
- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_UYVY422,
|
||||
+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
|
||||
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
if (swcontext)
|
||||
{
|
||||
uint8_t *src[] = { yuv422_ptr, 0, 0, 0 };
|
||||
@@ -574,11 +574,11 @@ void CDVDVideoCodecVDA::UYVY422_to_YUV42
|
||||
|
||||
void CDVDVideoCodecVDA::BGRA_to_YUV420P(uint8_t *bgra_ptr, int bgra_stride, DVDVideoPicture *picture)
|
||||
{
|
||||
- // convert PIX_FMT_BGRA to PIX_FMT_YUV420P.
|
||||
+ // convert AV_PIX_FMT_BGRA to AV_PIX_FMT_YUV420P.
|
||||
struct SwsContext *swcontext = sws_getContext(
|
||||
- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_BGRA,
|
||||
- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
|
||||
- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_BGRA,
|
||||
+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
|
||||
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
if (swcontext)
|
||||
{
|
||||
uint8_t *src[] = { bgra_ptr, 0, 0, 0 };
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
|
||||
@@ -886,7 +886,7 @@ static bool CheckCompatibility(AVCodecCo
|
||||
return true;
|
||||
}
|
||||
|
||||
-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
|
||||
+bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
|
||||
{
|
||||
if (!CheckCompatibility(avctx))
|
||||
return false;
|
||||
@@ -1135,9 +1135,9 @@ bool CDecoder::OpenDecoder()
|
||||
return true;
|
||||
}
|
||||
|
||||
-bool CDecoder::Supports(enum PixelFormat fmt)
|
||||
+bool CDecoder::Supports(enum AVPixelFormat fmt)
|
||||
{
|
||||
- if(fmt == PIX_FMT_DXVA2_VLD)
|
||||
+ if(fmt == AV_PIX_FMT_DXVA2_VLD)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
|
||||
@@ -141,7 +141,7 @@ class CDecoder
|
||||
public:
|
||||
CDecoder();
|
||||
~CDecoder();
|
||||
- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces);
|
||||
+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces);
|
||||
virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
|
||||
virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
|
||||
virtual int Check (AVCodecContext* avctx);
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
|
||||
void RelBuffer(uint8_t *data);
|
||||
|
||||
- static bool Supports(enum PixelFormat fmt);
|
||||
+ static bool Supports(enum AVPixelFormat fmt);
|
||||
|
||||
void CloseDXVADecoder();
|
||||
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
@@ -479,7 +479,7 @@ CDecoder::~CDecoder()
|
||||
Close();
|
||||
}
|
||||
|
||||
-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
|
||||
+bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
|
||||
{
|
||||
// don't support broken wrappers by default
|
||||
// nvidia cards with a vaapi to vdpau wrapper
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
CDecoder();
|
||||
virtual ~CDecoder();
|
||||
|
||||
- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
|
||||
+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
|
||||
virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
|
||||
virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
|
||||
virtual void Reset();
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
|
||||
@@ -186,7 +186,7 @@ void CDecoder::Close()
|
||||
m_bitstream = NULL;
|
||||
}
|
||||
|
||||
-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
|
||||
+bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
|
||||
{
|
||||
Close();
|
||||
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
|
||||
@@ -35,7 +35,7 @@ class CDecoder
|
||||
public:
|
||||
CDecoder();
|
||||
~CDecoder();
|
||||
- virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
|
||||
+ virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
|
||||
virtual int Decode(AVCodecContext* avctx, AVFrame* frame);
|
||||
virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
|
||||
virtual int Check(AVCodecContext* avctx);
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
@@ -486,7 +486,7 @@ CDecoder::CDecoder() : m_vdpauOutput(&m_
|
||||
m_vdpauConfig.context = 0;
|
||||
}
|
||||
|
||||
-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
|
||||
+bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
|
||||
{
|
||||
// check if user wants to decode this format with VDPAU
|
||||
std::string gpuvendor = g_Windowing.GetRenderVendor();
|
||||
@@ -760,7 +760,7 @@ int CDecoder::Check(AVCodecContext* avct
|
||||
return 0;
|
||||
}
|
||||
|
||||
-bool CDecoder::IsVDPAUFormat(PixelFormat format)
|
||||
+bool CDecoder::IsVDPAUFormat(AVPixelFormat format)
|
||||
{
|
||||
if (format == AV_PIX_FMT_VDPAU)
|
||||
return true;
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
|
||||
@@ -556,7 +556,7 @@ public:
|
||||
CDecoder();
|
||||
virtual ~CDecoder();
|
||||
|
||||
- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
|
||||
+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
|
||||
virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
|
||||
virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
|
||||
virtual void Reset();
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
bool Supports(VdpVideoMixerFeature feature);
|
||||
bool Supports(EINTERLACEMETHOD method);
|
||||
EINTERLACEMETHOD AutoInterlaceMethod();
|
||||
- static bool IsVDPAUFormat(PixelFormat fmt);
|
||||
+ static bool IsVDPAUFormat(AVPixelFormat fmt);
|
||||
|
||||
static void FFReleaseBuffer(void *opaque, uint8_t *data);
|
||||
static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
|
||||
@@ -1638,7 +1638,7 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPack
|
||||
|
||||
// for video we need a decoder to get desired information into codec context
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata &&
|
||||
- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE))
|
||||
+ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE))
|
||||
{
|
||||
// open a decoder, it will be cleared down by ffmpeg on closing the stream
|
||||
if (!st->codec->codec)
|
||||
@@ -1695,7 +1695,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
|
||||
st = m_pFormatContext->streams[idx];
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
{
|
||||
- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
|
||||
+ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
|
||||
return true;
|
||||
hasVideo = true;
|
||||
}
|
||||
@@ -1708,7 +1708,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
|
||||
st = m_pFormatContext->streams[i];
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
{
|
||||
- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
|
||||
+ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
|
||||
return true;
|
||||
hasVideo = true;
|
||||
}
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
|
||||
@@ -275,7 +275,7 @@ bool CDVDFileInfo::ExtractThumb(const st
|
||||
|
||||
uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4];
|
||||
struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight,
|
||||
- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
if (context)
|
||||
{
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
|
||||
@@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
|
||||
}
|
||||
else if (m_format == RENDER_FMT_NV12)
|
||||
{
|
||||
- srcFormat = PIX_FMT_NV12;
|
||||
+ srcFormat = AV_PIX_FMT_NV12;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
src[i] = im->plane[i];
|
||||
@@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
|
||||
}
|
||||
else if (m_format == RENDER_FMT_YUYV422)
|
||||
{
|
||||
- srcFormat = PIX_FMT_YUYV422;
|
||||
+ srcFormat = AV_PIX_FMT_YUYV422;
|
||||
src[0] = im->plane[0];
|
||||
srcStride[0] = im->stride[0];
|
||||
}
|
||||
else if (m_format == RENDER_FMT_UYVY422)
|
||||
{
|
||||
- srcFormat = PIX_FMT_UYVY422;
|
||||
+ srcFormat = AV_PIX_FMT_UYVY422;
|
||||
src[0] = im->plane[0];
|
||||
srcStride[0] = im->stride[0];
|
||||
}
|
||||
@@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
|
||||
|
||||
m_context = sws_getCachedContext(m_context,
|
||||
im->width, im->height, (AVPixelFormat)srcFormat,
|
||||
- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA,
|
||||
- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA,
|
||||
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 };
|
||||
int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
|
||||
@@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
|
||||
|
||||
if (m_format == RENDER_FMT_YUV420P)
|
||||
{
|
||||
- srcFormat = PIX_FMT_YUV420P;
|
||||
+ srcFormat = AV_PIX_FMT_YUV420P;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
srcTop[i] = im->plane[i];
|
||||
@@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
|
||||
}
|
||||
else if (m_format == RENDER_FMT_NV12)
|
||||
{
|
||||
- srcFormat = PIX_FMT_NV12;
|
||||
+ srcFormat = AV_PIX_FMT_NV12;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
srcTop[i] = im->plane[i];
|
||||
@@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
|
||||
}
|
||||
else if (m_format == RENDER_FMT_YUYV422)
|
||||
{
|
||||
- srcFormat = PIX_FMT_YUYV422;
|
||||
+ srcFormat = AV_PIX_FMT_YUYV422;
|
||||
srcTop[0] = im->plane[0];
|
||||
srcStrideTop[0] = im->stride[0] * 2;
|
||||
srcBot[0] = im->plane[0] + im->stride[0];
|
||||
@@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
|
||||
}
|
||||
else if (m_format == RENDER_FMT_UYVY422)
|
||||
{
|
||||
- srcFormat = PIX_FMT_UYVY422;
|
||||
+ srcFormat = AV_PIX_FMT_UYVY422;
|
||||
srcTop[0] = im->plane[0];
|
||||
srcStrideTop[0] = im->stride[0] * 2;
|
||||
srcBot[0] = im->plane[0] + im->stride[0];
|
||||
@@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I
|
||||
|
||||
m_context = sws_getCachedContext(m_context,
|
||||
im->width, im->height >> 1, (AVPixelFormat)srcFormat,
|
||||
- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA,
|
||||
- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA,
|
||||
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 };
|
||||
uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 };
|
||||
int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
@@ -2006,8 +2006,8 @@ void CLinuxRendererGLES::UploadYV12Textu
|
||||
#endif
|
||||
{
|
||||
m_sw_context = sws_getCachedContext(m_sw_context,
|
||||
- im->width, im->height, PIX_FMT_YUV420P,
|
||||
- im->width, im->height, PIX_FMT_RGBA,
|
||||
+ im->width, im->height, AV_PIX_FMT_YUV420P,
|
||||
+ im->width, im->height, AV_PIX_FMT_RGBA,
|
||||
SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
uint8_t *src[] = { im->plane[0], im->plane[1], im->plane[2], 0 };
|
||||
Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/WinRenderer.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
|
||||
@@ -94,16 +94,16 @@ CWinRenderer::~CWinRenderer()
|
||||
UnInit();
|
||||
}
|
||||
|
||||
-static enum PixelFormat PixelFormatFromFormat(ERenderFormat format)
|
||||
+static enum AVPixelFormat PixelFormatFromFormat(ERenderFormat format)
|
||||
{
|
||||
- if (format == RENDER_FMT_DXVA) return PIX_FMT_NV12;
|
||||
- if (format == RENDER_FMT_YUV420P) return PIX_FMT_YUV420P;
|
||||
- if (format == RENDER_FMT_YUV420P10) return PIX_FMT_YUV420P10;
|
||||
- if (format == RENDER_FMT_YUV420P16) return PIX_FMT_YUV420P16;
|
||||
- if (format == RENDER_FMT_NV12) return PIX_FMT_NV12;
|
||||
- if (format == RENDER_FMT_UYVY422) return PIX_FMT_UYVY422;
|
||||
- if (format == RENDER_FMT_YUYV422) return PIX_FMT_YUYV422;
|
||||
- return PIX_FMT_NONE;
|
||||
+ if (format == RENDER_FMT_DXVA) return AV_PIX_FMT_NV12;
|
||||
+ if (format == RENDER_FMT_YUV420P) return AV_PIX_FMT_YUV420P;
|
||||
+ if (format == RENDER_FMT_YUV420P10) return AV_PIX_FMT_YUV420P10;
|
||||
+ if (format == RENDER_FMT_YUV420P16) return AV_PIX_FMT_YUV420P16;
|
||||
+ if (format == RENDER_FMT_NV12) return AV_PIX_FMT_NV12;
|
||||
+ if (format == RENDER_FMT_UYVY422) return AV_PIX_FMT_UYVY422;
|
||||
+ if (format == RENDER_FMT_YUYV422) return AV_PIX_FMT_YUYV422;
|
||||
+ return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
void CWinRenderer::ManageTextures()
|
||||
@@ -719,13 +719,13 @@ void CWinRenderer::Render(DWORD flags)
|
||||
|
||||
void CWinRenderer::RenderSW()
|
||||
{
|
||||
- enum PixelFormat format = PixelFormatFromFormat(m_format);
|
||||
+ enum AVPixelFormat format = PixelFormatFromFormat(m_format);
|
||||
|
||||
// 1. convert yuv to rgb
|
||||
m_sw_scale_ctx = sws_getCachedContext(m_sw_scale_ctx,
|
||||
m_sourceWidth, m_sourceHeight, format,
|
||||
- m_sourceWidth, m_sourceHeight, PIX_FMT_BGRA,
|
||||
- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ m_sourceWidth, m_sourceHeight, AV_PIX_FMT_BGRA,
|
||||
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
YUVBuffer* buf = (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer];
|
||||
|
||||
Index: xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/pictures/Picture.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
|
||||
@@ -342,9 +342,9 @@ bool CPicture::ScaleImage(uint8_t *in_pi
|
||||
uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch,
|
||||
CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */)
|
||||
{
|
||||
- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA,
|
||||
- out_width, out_height, PIX_FMT_BGRA,
|
||||
- CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL);
|
||||
+ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA,
|
||||
+ out_width, out_height, AV_PIX_FMT_BGRA,
|
||||
+ CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm), NULL, NULL, NULL);
|
||||
|
||||
uint8_t *src[] = { in_pixels, 0, 0, 0 };
|
||||
int srcStride[] = { (int)in_pitch, 0, 0, 0 };
|
||||
Index: xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
|
||||
===================================================================
|
||||
--- xbmc-16.0-Jarvis.orig/xbmc/video/FFmpegVideoDecoder.cpp
|
||||
+++ xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
|
||||
@@ -252,7 +252,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
|
||||
return false;
|
||||
|
||||
// Due to a bug in swsscale we need to allocate one extra line of data
|
||||
- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
|
||||
+ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
|
||||
|
||||
// We got the video frame, render it into the picture buffer
|
||||
struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
|
||||
- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
|
||||
+ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
|
||||
|
||||
sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height,
|
||||
m_pFrameRGB->data, m_pFrameRGB->linesize );
|
|
@ -0,0 +1,10 @@
|
|||
--- a/system/addon-manifest.xml.orig
|
||||
+++ b/system/addon-manifest.xml
|
||||
@@ -28,7 +28,6 @@
|
||||
<addon>screensaver.xbmc.builtin.black</addon>
|
||||
<addon>screensaver.xbmc.builtin.dim</addon>
|
||||
<addon>script.module.pil</addon>
|
||||
- <addon>service.xbmc.versioncheck</addon>
|
||||
<addon>skin.estuary</addon>
|
||||
<addon>skin.estouchy</addon>
|
||||
<addon>webinterface.default</addon>
|
|
@ -1,16 +1,16 @@
|
|||
# Template file for 'kodi'
|
||||
pkgname=kodi
|
||||
version=16.1
|
||||
revision=7
|
||||
version=17.1
|
||||
revision=1
|
||||
patch_args="-Np1"
|
||||
_codename="Jarvis"
|
||||
_codename="Krypton"
|
||||
wrksrc="xbmc-${version}-${_codename}"
|
||||
short_desc="A software media player and entertainment hub for digital media"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.kodi.tv/"
|
||||
license="GPL-2"
|
||||
distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz"
|
||||
checksum=7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10
|
||||
checksum=303f3903cbb57ccc2961f09cf3746505542bcb129a464f0687d7ca8601cebbee
|
||||
|
||||
lib32disabled=yes
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||
|
|
Loading…
Reference in New Issue