diff --git a/mythtv/external/nv-codec-headers/ffnvcodec.pc.in b/mythtv/external/nv-codec-headers/ffnvcodec.pc.in index edae59c5b0e..03a48b1258b 100644 --- a/mythtv/external/nv-codec-headers/ffnvcodec.pc.in +++ b/mythtv/external/nv-codec-headers/ffnvcodec.pc.in @@ -3,5 +3,5 @@ includedir=${prefix}/include Name: ffnvcodec Description: FFmpeg version of Nvidia Codec SDK headers -Version: 8.2.15.7 +Version: 8.2.15.10 Cflags: -I${includedir} diff --git a/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_cuda.h b/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_cuda.h index 97d526ef08d..955f3786c1d 100644 --- a/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_cuda.h +++ b/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_cuda.h @@ -41,22 +41,23 @@ #define CU_CTX_SCHED_BLOCKING_SYNC 4 typedef int CUdevice; -typedef void* CUarray; -typedef void* CUcontext; -typedef void* CUstream; -typedef void* CUevent; -typedef void* CUfunction; -typedef void* CUmodule; -typedef void* CUtexObject; -typedef void* CUmipmappedArray; -typedef void* CUgraphicsResource; -typedef void* CUexternalMemory; -typedef void* CUexternalSemaphore; #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) typedef unsigned long long CUdeviceptr; #else typedef unsigned int CUdeviceptr; #endif +typedef unsigned long long CUtexObject; + +typedef struct CUarray_st *CUarray; +typedef struct CUctx_st *CUcontext; +typedef struct CUstream_st *CUstream; +typedef struct CUevent_st *CUevent; +typedef struct CUfunc_st *CUfunction; +typedef struct CUmod_st *CUmodule; +typedef struct CUmipmappedArray_st *CUmipmappedArray; +typedef struct CUgraphicsResource_st *CUgraphicsResource; +typedef struct CUextMemory_st *CUexternalMemory; +typedef struct CUextSemaphore_st *CUexternalSemaphore; typedef enum cudaError_enum { CUDA_SUCCESS = 0, @@ -323,11 +324,13 @@ typedef CUresult CUDAAPI tcuCtxPopCurrent_v2(CUcontext *pctx); typedef CUresult CUDAAPI tcuCtxDestroy_v2(CUcontext ctx); typedef CUresult CUDAAPI tcuMemAlloc_v2(CUdeviceptr *dptr, size_t bytesize); typedef CUresult CUDAAPI tcuMemAllocPitch_v2(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes); +typedef CUresult CUDAAPI tcuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream); typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr); typedef CUresult CUDAAPI tcuMemcpy2D_v2(const CUDA_MEMCPY2D *pcopy); typedef CUresult CUDAAPI tcuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pcopy, CUstream hStream); typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char** pstr); typedef CUresult CUDAAPI tcuGetErrorString(CUresult error, const char** pstr); +typedef CUresult CUDAAPI tcuCtxGetDevice(CUdevice *device); typedef CUresult CUDAAPI tcuStreamCreate(CUstream *phStream, unsigned int flags); typedef CUresult CUDAAPI tcuStreamQuery(CUstream hStream); @@ -359,6 +362,7 @@ typedef CUresult CUDAAPI tcuDestroyExternalMemory(CUexternalMemory extMem); typedef CUresult CUDAAPI tcuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc); typedef CUresult CUDAAPI tcuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc); typedef CUresult CUDAAPI tcuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level); +typedef CUresult CUDAAPI tcuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray); typedef CUresult CUDAAPI tcuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc); typedef CUresult CUDAAPI tcuDestroyExternalSemaphore(CUexternalSemaphore extSem); diff --git a/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_loader.h b/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_loader.h index da00ff8e179..a1fa323b447 100644 --- a/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_loader.h +++ b/mythtv/external/nv-codec-headers/include/ffnvcodec/dynlink_loader.h @@ -150,11 +150,13 @@ typedef struct CudaFunctions { tcuCtxDestroy_v2 *cuCtxDestroy; tcuMemAlloc_v2 *cuMemAlloc; tcuMemAllocPitch_v2 *cuMemAllocPitch; + tcuMemsetD8Async *cuMemsetD8Async; tcuMemFree_v2 *cuMemFree; tcuMemcpy2D_v2 *cuMemcpy2D; tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync; tcuGetErrorName *cuGetErrorName; tcuGetErrorString *cuGetErrorString; + tcuCtxGetDevice *cuCtxGetDevice; tcuStreamCreate *cuStreamCreate; tcuStreamQuery *cuStreamQuery; @@ -185,6 +187,7 @@ typedef struct CudaFunctions { tcuDestroyExternalMemory *cuDestroyExternalMemory; tcuExternalMemoryGetMappedBuffer *cuExternalMemoryGetMappedBuffer; tcuExternalMemoryGetMappedMipmappedArray *cuExternalMemoryGetMappedMipmappedArray; + tcuMipmappedArrayDestroy *cuMipmappedArrayDestroy; tcuMipmappedArrayGetLevel *cuMipmappedArrayGetLevel; @@ -272,11 +275,13 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx) LOAD_SYMBOL(cuCtxDestroy, tcuCtxDestroy_v2, "cuCtxDestroy_v2"); LOAD_SYMBOL(cuMemAlloc, tcuMemAlloc_v2, "cuMemAlloc_v2"); LOAD_SYMBOL(cuMemAllocPitch, tcuMemAllocPitch_v2, "cuMemAllocPitch_v2"); + LOAD_SYMBOL(cuMemsetD8Async, tcuMemsetD8Async, "cuMemsetD8Async"); LOAD_SYMBOL(cuMemFree, tcuMemFree_v2, "cuMemFree_v2"); LOAD_SYMBOL(cuMemcpy2D, tcuMemcpy2D_v2, "cuMemcpy2D_v2"); LOAD_SYMBOL(cuMemcpy2DAsync, tcuMemcpy2DAsync_v2, "cuMemcpy2DAsync_v2"); LOAD_SYMBOL(cuGetErrorName, tcuGetErrorName, "cuGetErrorName"); LOAD_SYMBOL(cuGetErrorString, tcuGetErrorString, "cuGetErrorString"); + LOAD_SYMBOL(cuCtxGetDevice, tcuCtxGetDevice, "cuCtxGetDevice"); LOAD_SYMBOL(cuStreamCreate, tcuStreamCreate, "cuStreamCreate"); LOAD_SYMBOL(cuStreamQuery, tcuStreamQuery, "cuStreamQuery"); @@ -309,6 +314,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx) LOAD_SYMBOL_OPT(cuExternalMemoryGetMappedBuffer, tcuExternalMemoryGetMappedBuffer, "cuExternalMemoryGetMappedBuffer"); LOAD_SYMBOL_OPT(cuExternalMemoryGetMappedMipmappedArray, tcuExternalMemoryGetMappedMipmappedArray, "cuExternalMemoryGetMappedMipmappedArray"); LOAD_SYMBOL_OPT(cuMipmappedArrayGetLevel, tcuMipmappedArrayGetLevel, "cuMipmappedArrayGetLevel"); + LOAD_SYMBOL_OPT(cuMipmappedArrayDestroy, tcuMipmappedArrayDestroy, "cuMipmappedArrayDestroy"); LOAD_SYMBOL_OPT(cuImportExternalSemaphore, tcuImportExternalSemaphore, "cuImportExternalSemaphore"); LOAD_SYMBOL_OPT(cuDestroyExternalSemaphore, tcuDestroyExternalSemaphore, "cuDestroyExternalSemaphore"); diff --git a/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp index 0bc4604ab49..a0e07f71331 100644 --- a/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp +++ b/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp @@ -207,14 +207,32 @@ void DVBStreamData::Reset(uint desired_netid, uint desired_tsid, } /** \fn DVBStreamData::HandleTables(uint pid, const PSIPTable&) - * \brief Assembles PSIP packets and processes them. - * \todo This is just a stub. + * \brief Process PSIP packets. */ bool DVBStreamData::HandleTables(uint pid, const PSIPTable &psip) { if (MPEGStreamData::HandleTables(pid, psip)) return true; + // If the user specified a network ID and that network ID is a NITo then change that NITo into + // the NIT and change the NIT into a NITo. See ticket #7486. + if (_dvb_real_network_id > 0) + { + if ((psip.TableID() == TableID::NIT && psip.TableIDExtension() != (uint)_dvb_real_network_id) || + (psip.TableID() == TableID::NITo && psip.TableIDExtension() == (uint)_dvb_real_network_id) ) + { + NetworkInformationTable *nit = new NetworkInformationTable(psip); + if (!nit->Mutate()) + { + delete nit; + return true; + } + bool retval = HandleTables(pid, *nit); + delete nit; + return retval; + } + } + if (IsRedundant(pid, psip)) return true; @@ -222,21 +240,8 @@ bool DVBStreamData::HandleTables(uint pid, const PSIPTable &psip) { case TableID::NIT: { - if (_dvb_real_network_id >= 0 && psip.TableIDExtension() != (uint)_dvb_real_network_id) - { - NetworkInformationTable *nit = new NetworkInformationTable(psip); - if (!nit->Mutate()) - { - delete nit; - return true; - } - bool retval = HandleTables(pid, *nit); - delete nit; - return retval; - } - _nit_status.SetSectionSeen(psip.Version(), psip.Section(), - psip.LastSection()); + psip.LastSection()); if (_cache_tables) { @@ -292,19 +297,6 @@ bool DVBStreamData::HandleTables(uint pid, const PSIPTable &psip) } case TableID::NITo: { - if (_dvb_real_network_id >= 0 && psip.TableIDExtension() == (uint)_dvb_real_network_id) - { - NetworkInformationTable *nit = new NetworkInformationTable(psip); - if (!nit->Mutate()) - { - delete nit; - return true; - } - bool retval = HandleTables(pid, *nit); - delete nit; - return retval; - } - _nito_status.SetSectionSeen(psip.Version(), psip.Section(), psip.LastSection()); NetworkInformationTable nit(psip); diff --git a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp index ef50a1a99d3..d60b4d4c520 100644 --- a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp +++ b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp @@ -681,11 +681,11 @@ bool MPEGStreamData::IsRedundant(uint pid, const PSIPTable &psip) const } /** \fn MPEGStreamData::HandleTables(uint pid, const PSIPTable &psip) - * \brief Assembles PSIP packets and processes them. + * \brief Process PSIP packets. */ bool MPEGStreamData::HandleTables(uint pid, const PSIPTable &psip) { - if (IsRedundant(pid, psip)) + if (MPEGStreamData::IsRedundant(pid, psip)) return true; const int version = psip.Version(); @@ -936,7 +936,7 @@ void MPEGStreamData::HandleTSTables(const TSPacket* tspacket) // Don't decode redundant packets, // but if it is a desired PAT or PMT emit a "heartbeat" signal. - if (IsRedundant(tspacket->PID(), *psip)) + if (MPEGStreamData::IsRedundant(tspacket->PID(), *psip)) { if (TableID::PAT == psip->TableID()) { diff --git a/mythtv/libs/libmythtv/mpeg/tspacket.h b/mythtv/libs/libmythtv/mpeg/tspacket.h index ed771a54b39..a8839665344 100644 --- a/mythtv/libs/libmythtv/mpeg/tspacket.h +++ b/mythtv/libs/libmythtv/mpeg/tspacket.h @@ -167,7 +167,7 @@ class MTV_PUBLIC TSPacket : public TSHeader { friend class PESPacket; public: - /* note: payload is intenionally left uninitialized */ + /* note: payload is intentionally left uninitialized */ // cppcheck-suppress uninitMemberVar TSPacket(void) : TSHeader() { } diff --git a/mythtv/libs/libmythtv/recorders/dvbstreamhandler.cpp b/mythtv/libs/libmythtv/recorders/dvbstreamhandler.cpp index abf8c3a2a32..621ffc4edbd 100644 --- a/mythtv/libs/libmythtv/recorders/dvbstreamhandler.cpp +++ b/mythtv/libs/libmythtv/recorders/dvbstreamhandler.cpp @@ -125,7 +125,7 @@ void DVBStreamHandler::run(void) /** \fn DVBStreamHandler::RunTS(void) * \brief Uses TS filtering devices to read a DVB device for tables & data * - * This supports all types of MPEG based stream data, but is extreemely + * This supports all types of MPEG based stream data, but is extremely * slow with DVB over USB 1.0 devices which for efficiency reasons buffer * a stream until a full block transfer buffer full of the requested * tables is available. This takes a very long time when you are just