Merge pull request #66 from xavery/fixes-and-cleanups
Fixes and cleanups
This commit is contained in:
commit
d9ac5f8bdc
@ -5,16 +5,6 @@ set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
|
||||
if (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32")
|
||||
else()
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory (libmediation)
|
||||
add_subdirectory (tsMuxer)
|
||||
if(TSMUXER_GUI)
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <errno.h>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <stddef.h>
|
||||
@ -13,25 +13,15 @@
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef SOLARIS
|
||||
typedef struct mydirent
|
||||
{
|
||||
ino_t d_ino; /* "inode number" of entry */
|
||||
off_t d_off; /* offset of disk directory entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
char d_name[PATH_MAX]; /* name of file */
|
||||
} mydirent_t;
|
||||
#endif
|
||||
|
||||
char getDirSeparator()
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
return '\\';
|
||||
#else
|
||||
return '/';
|
||||
@ -43,7 +33,7 @@ string extractFileDir( const string& fileName )
|
||||
size_t index = fileName.find_last_of('/');
|
||||
if( index != string::npos )
|
||||
return fileName.substr( 0, index+1 );
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
index = fileName.find_last_of('\\');
|
||||
if( index != string::npos )
|
||||
return fileName.substr( 0, index+1 );
|
||||
@ -55,10 +45,10 @@ string extractFileDir( const string& fileName )
|
||||
bool fileExists( const string& fileName )
|
||||
{
|
||||
bool fileExists = false;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
struct _stat64 buf;
|
||||
fileExists = _stat64( fileName.c_str(), &buf ) == 0;
|
||||
#else // LINUX
|
||||
#else
|
||||
struct stat64 buf;
|
||||
fileExists = stat64( fileName.c_str(), &buf ) == 0;
|
||||
#endif
|
||||
@ -69,10 +59,10 @@ bool fileExists( const string& fileName )
|
||||
uint64_t getFileSize ( const std::string& fileName )
|
||||
{
|
||||
bool res = false;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
struct _stat64 fileStat;
|
||||
res = _stat64( fileName.c_str(), &fileStat ) == 0;
|
||||
#else // LINUX
|
||||
#else
|
||||
struct stat64 fileStat;
|
||||
res = stat64( fileName.c_str(), &fileStat ) == 0;
|
||||
#endif
|
||||
@ -98,13 +88,13 @@ bool createDir(
|
||||
if( dirEnd != string::npos )
|
||||
{
|
||||
string parentDir = dirName.substr( 0, dirEnd );
|
||||
#if defined(LINUX) || defined(SOLARIS) || defined(MAC)
|
||||
#if __linux__ == 1 || (defined(__APPLE__) && defined(__MACH__))
|
||||
if( mkdir( parentDir.c_str(), S_IREAD | S_IWRITE | S_IEXEC ) == -1 )
|
||||
{
|
||||
if( errno != EEXIST )
|
||||
return false;
|
||||
}
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
if (parentDir.size() == 0 || parentDir[parentDir.size()-1] == ':' ||
|
||||
parentDir == string("\\\\.") || parentDir == string("\\\\.\\") || // UNC patch prefix
|
||||
(strStartWith(parentDir, "\\\\.\\") && parentDir[parentDir.size()-1] == '}')) // UNC patch prefix
|
||||
@ -119,16 +109,16 @@ bool createDir(
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(LINUX) || defined(SOLARIS) || defined(MAC)
|
||||
#if __linux__ == 1 || (defined(__APPLE__) && defined(__MACH__))
|
||||
return mkdir( dirName.c_str(), S_IREAD | S_IWRITE | S_IEXEC ) == 0;
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
return CreateDirectory( dirName.c_str(), 0 ) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool deleteFile( const string& fileName )
|
||||
{
|
||||
#if defined(LINUX) || defined(SOLARIS) || defined(MAC)
|
||||
#if __linux__ == 1 || (defined(__APPLE__) && defined(__MACH__))
|
||||
return unlink( fileName.c_str() ) == 0;
|
||||
#else
|
||||
if( DeleteFile(fileName.c_str()) )
|
||||
@ -147,7 +137,7 @@ bool deleteFile( const string& fileName )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined(WIN32)
|
||||
#if defined(_WIN32)
|
||||
/** windows implementation */
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <windows.h>
|
||||
@ -205,7 +195,7 @@ bool findDirs(
|
||||
|
||||
return true;
|
||||
}
|
||||
#elif defined(LINUX) || defined(MAC)
|
||||
#elif __linux__ == 1 || (defined(__APPLE__) && defined(__MACH__))
|
||||
#include <fnmatch.h>
|
||||
|
||||
bool findFiles(
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <fcntl.h>
|
||||
#include "../types/types.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4290 )
|
||||
#endif
|
||||
|
||||
|
@ -13,10 +13,10 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef MAC
|
||||
#define O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
|
||||
void makeUnixOpenFlags(
|
||||
@ -159,20 +159,20 @@ uint64_t File::seek( int64_t offset, SeekMethod whence )
|
||||
break;
|
||||
}
|
||||
m_pos = offset;
|
||||
#ifdef MAC
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
return lseek( (long)m_impl, offset, sWhence );
|
||||
#else
|
||||
#else
|
||||
return lseek64( (long)m_impl, offset, sWhence );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool File::truncate( uint64_t newFileSize )
|
||||
{
|
||||
#ifdef MAC
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
return ftruncate( (long)m_impl, newFileSize ) == 0;
|
||||
#else
|
||||
#else
|
||||
return ftruncate64( (long)m_impl, newFileSize ) == 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void File::sync()
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <memory.h>
|
||||
#include <ostream>
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -41,7 +41,7 @@ uint64_t my_htonll( const uint64_t& original )
|
||||
// Simple types conversion
|
||||
int64_t strToInt64( const char* const str )
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
return _atoi64( str );
|
||||
#else
|
||||
return strtoll( str, 0, 10 );
|
||||
@ -50,7 +50,7 @@ int64_t strToInt64( const char* const str )
|
||||
|
||||
uint64_t strToInt64u( const char* const str )
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
return _atoi64( str );
|
||||
#else
|
||||
return strtoull( str, 0, 10 );
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#define override
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
char* strnstr(const char *s1, const char *s2, size_t len);
|
||||
|
@ -9,7 +9,6 @@ add_executable (tsmuxer
|
||||
ac3Codec.cpp
|
||||
ac3StreamReader.cpp
|
||||
avCodecs.cpp
|
||||
base64.cpp
|
||||
bitStream.cpp
|
||||
blurayHelper.cpp
|
||||
bufferedFileReader.cpp
|
||||
@ -18,7 +17,6 @@ add_executable (tsmuxer
|
||||
bufferedReaderManager.cpp
|
||||
combinedH264Demuxer.cpp
|
||||
convertUTF.cpp
|
||||
crc.cpp
|
||||
dtsStreamReader.cpp
|
||||
dvbSubStreamReader.cpp
|
||||
h264StreamReader.cpp
|
||||
|
@ -1,291 +0,0 @@
|
||||
#ifndef __ABSTRACT_CORE_CONTEXT_H
|
||||
#define __ABSTRACT_CORE_CONTEXT_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <types/types.h>
|
||||
|
||||
#include "abstractreader.h"
|
||||
#include "abstractDemuxer.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define LIB_EXPORT extern "C" __declspec(dllexport)
|
||||
#define LIB_CLASS_EXPORT __declspec(dllexport)
|
||||
#define LIB_STD_CALL __stdcall
|
||||
#else
|
||||
#define LIB_EXPORT extern "C"
|
||||
#define LIB_CLASS_EXPORT
|
||||
#define LIB_STD_CALL
|
||||
#endif
|
||||
|
||||
|
||||
namespace vodcore
|
||||
{
|
||||
|
||||
//class AbstractDemuxer;
|
||||
|
||||
typedef void (LIB_STD_CALL *EVENT_HANDLER_PROC) (const long handle, const int eventID, const char* message);
|
||||
struct MuxTrackInfo {
|
||||
std::string streamName;
|
||||
std::string codecName;
|
||||
std::map<std::string, std::string> addParam;
|
||||
};
|
||||
|
||||
class AbstractCoreContext
|
||||
{
|
||||
public:
|
||||
typedef std::string string;
|
||||
#ifndef __TS_MUXER_COMPILE_MODE
|
||||
typedef std::multimap < string, std::pair < uint8_t, double > > YTVideoInfoMap;
|
||||
typedef std::pair < SocketAddress, string > StreamInfoPair;
|
||||
typedef std::map < string, StreamInfoPair > StreamInfoMap;
|
||||
#endif
|
||||
AbstractCoreContext():
|
||||
m_ytCacheDuration ( 0 ),
|
||||
m_rtCacheDuration ( 0 ),
|
||||
m_nYTVideoQuality ( 1 ),
|
||||
m_nYTScalingType ( 0 ),
|
||||
m_nRTScalingType ( 0 ),
|
||||
m_ytCacheDisabled ( false ),
|
||||
m_rtCacheDisabled ( false ),
|
||||
m_ytMp4TranscodingDisabled ( false ),
|
||||
m_tsMtuSize ( 1400 ),
|
||||
m_maxMIpPacketCount ( 6 ),
|
||||
m_maxUIpPacketCount ( 6 ),
|
||||
m_ytVideoWidth ( 352 ),
|
||||
m_ytVideoHeight ( 288 ),
|
||||
m_ytAutoPal ( false ),
|
||||
|
||||
m_rtVideoWidth ( 352 ),
|
||||
m_rtVideoHeight ( 288 ),
|
||||
m_rtAutoPal ( false ),
|
||||
|
||||
m_cacheDemoMode ( false ),
|
||||
m_maxSpeedMode ( false ),
|
||||
|
||||
m_sendBlockBySinglePackets ( false ),
|
||||
m_trafficBandWidth ( 1000 ),
|
||||
m_ytLogoPos ( 0 ),
|
||||
m_ytLogoPath ( "ytLogo.bmp" )
|
||||
{}
|
||||
|
||||
virtual ~AbstractCoreContext()
|
||||
{
|
||||
}
|
||||
|
||||
virtual unsigned startStreaming(const char* session,
|
||||
int streamingMode,
|
||||
double ntpPos,
|
||||
int scale,
|
||||
const char* fileName,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle) = 0 ;
|
||||
|
||||
virtual unsigned startSmartBridgeStreaming ( const char* sessionID, double ntpPos,
|
||||
const char* url,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo, long tcpSocketHandle ) = 0 ;
|
||||
|
||||
virtual unsigned seekYouTubeStreaming ( const char* streamName, double ntpPos) = 0;
|
||||
virtual uint64_t getYTStreamDuration ( const std::string& streamName ) = 0;
|
||||
|
||||
virtual unsigned seekRuTubeStreaming ( const char* streamName, double ntpPos) = 0;
|
||||
virtual uint64_t getRTStreamDuration ( const std::string& streamName ) = 0;
|
||||
|
||||
virtual void setYTCacheParams ( const std::string& sCacheDirectory, const std::string& sLogDirectory, uint64_t nTotalCacheDuration ) = 0;
|
||||
virtual void setRTCacheParams ( const std::string& sCacheDirectory, uint64_t nTotalCacheDuration ) = 0;
|
||||
|
||||
virtual void setYTVideoInfo ( const std::string& streamName, uint8_t existingType, double fps ) = 0;
|
||||
virtual void getYTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp = false ) = 0;
|
||||
|
||||
virtual void setRTVideoInfo ( const std::string& streamName, uint8_t existingType, double fps ) = 0;
|
||||
virtual void getRTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp = false ) = 0;
|
||||
|
||||
|
||||
virtual void setYTDemuxer ( const std::string& streamName, AbstractDemuxer* demuxer) = 0;
|
||||
virtual void removeYTDemuxer ( const std::string& streamName) = 0;
|
||||
|
||||
virtual void setRTDemuxer ( const std::string& streamName, AbstractDemuxer* demuxer) = 0;
|
||||
virtual void removeRTDemuxer ( const std::string& streamName) = 0;
|
||||
|
||||
virtual void resumeStreamingGroup ( const char* name ) = 0;
|
||||
virtual void setSyncGroupCount ( int count ) = 0;
|
||||
virtual int createStreamingGroup(const char* address,
|
||||
const char* name, double nptPos, int scale,
|
||||
int lowLevelTransport,
|
||||
int loopCount,
|
||||
int eoplDelay,
|
||||
int eofDelay,
|
||||
bool suspended ) = 0 ;
|
||||
virtual int startStreamingDVD(const char* groupName, int llTransport) = 0;
|
||||
virtual int startStreamingDVDExt(const char* groupName, int llTransport,
|
||||
const char* dvdDrive,
|
||||
const char* folder) = 0 ;
|
||||
virtual double getGroupNptPos(const char* groupName) = 0 ;
|
||||
virtual bool isStreamingGroup(const char* fileName) = 0 ;
|
||||
virtual uint32_t addDestination(const char* session,
|
||||
const char* fileName,
|
||||
const char* ip, uint16_t port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle,
|
||||
const char* ixface) = 0 ;
|
||||
virtual int removeDestination(const char* fileName, long handle) = 0 ;
|
||||
virtual int stopStreaming(unsigned streamer) = 0 ;
|
||||
virtual unsigned pauseStreaming(unsigned readerID) = 0 ;
|
||||
virtual unsigned resumeStreaming(unsigned readerID) = 0 ;
|
||||
virtual unsigned changeScale(unsigned readerID, int scale) = 0 ;
|
||||
virtual unsigned setPosition(unsigned readerID, double position) = 0 ;
|
||||
virtual double getNptPos(unsigned streamer) = 0 ;
|
||||
virtual int getRewindSpeed(int requestSpeed) = 0 ;
|
||||
virtual unsigned createIndexFile(const char* fileName, bool createRewind) = 0 ;
|
||||
virtual unsigned createIndexFileAsync(const char* displayName, const char* fileName, bool createRewind) = 0 ;
|
||||
virtual unsigned getAssetStatus(const char* fileName) = 0 ;
|
||||
virtual bool getEncodedAssetList(char*rezBuffer, int bufferSize) = 0 ;
|
||||
virtual bool startAutoIndexing(const string& dir, bool createRewind) = 0 ;
|
||||
virtual bool stopAutoIndexing() = 0 ;
|
||||
virtual long multicastJoin(const char* assetName, const char* address, int port, bool overWrite, int cycleBufferLen, const char* ixface, bool createRewind, int nBlockSize, int splitByDurationSize ) = 0 ;
|
||||
virtual int multicastLeave(const char* encoderName) = 0 ;
|
||||
virtual void setReadThreadCnt(int readThreadCnt) = 0 ;
|
||||
virtual void initLog(int messageLevel,
|
||||
const char* logName,
|
||||
const char* logDir,
|
||||
int logRotationPeriod) = 0 ;
|
||||
virtual void getAssetDescription ( const char* sessionID, const char* cfileName, int descrType,
|
||||
char* dstBuffer, unsigned len) = 0 ;
|
||||
virtual void registerEventHandler(EVENT_HANDLER_PROC eventHandler) = 0 ;
|
||||
virtual int getAssetInfoFromFile(const char* fileName, char* dstBuffer, int bufSize) = 0 ;
|
||||
virtual int getTSDuration ( const char* fileName ) = 0;
|
||||
virtual int deleteAsset(const char* fileName) = 0 ;
|
||||
virtual int deleteStreamingGroup(const char* groupName) = 0 ;
|
||||
virtual bool setRootDir(const char* rootDir) = 0 ;
|
||||
virtual bool setM3uRoot(const char* rootDir) = 0 ;
|
||||
virtual bool setHttpServerURL(const char* url) = 0 ;
|
||||
virtual bool setDefaultRtspTimeout(const int timeout) = 0 ;
|
||||
virtual void setTrafficBandWidth ( int value ) = 0;
|
||||
virtual uint32_t getTrafficBandWidth () = 0;
|
||||
|
||||
virtual int getStatisticForPeriod ( int period,
|
||||
double& avgBroadcastBitrate,
|
||||
double& maxBroadcastBitrate,
|
||||
double& avgRunoffBitrate,
|
||||
double& maxRunoffBitrate,
|
||||
char* interval,
|
||||
int intervalSize
|
||||
) = 0;
|
||||
|
||||
virtual int LIB_STD_CALL muxTSFile( std::map<int, MuxTrackInfo> trackInfo,
|
||||
const string& outName,
|
||||
int indexingType, int nBitrate, int nVBVLen, int nFileBlockSize ) = 0;
|
||||
virtual AbstractReader* getReader(const char* streamName) = 0;
|
||||
|
||||
virtual uint64_t getYTCacheDuration () = 0;
|
||||
virtual string getYTCacheDirectory () = 0;
|
||||
|
||||
virtual uint64_t getRTCacheDuration () = 0;
|
||||
virtual string getRTCacheDirectory () = 0;
|
||||
|
||||
virtual string getLogDirectory () = 0;
|
||||
|
||||
virtual string getYTDomesticHost () = 0;
|
||||
virtual void setYTDomesticHost ( const string& sDomesticHost ) = 0;
|
||||
|
||||
virtual uint8_t getYTVideoQuality () = 0;
|
||||
virtual void setYTVideoQuality ( const string& sQuality ) = 0;
|
||||
|
||||
virtual bool isYTCacheDisabled () = 0;
|
||||
virtual void disableYTCache () = 0;
|
||||
|
||||
virtual bool isRTCacheDisabled () = 0;
|
||||
virtual void disableRTCache () = 0;
|
||||
|
||||
virtual bool isYTMp4TranscodingDisabled() = 0;
|
||||
virtual void disableYTMp4Transcoding () = 0;
|
||||
|
||||
virtual void setYTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal ) = 0;
|
||||
|
||||
virtual uint32_t getYTVideoWidth () = 0;
|
||||
virtual uint32_t getYTVideoHeight () = 0;
|
||||
virtual uint32_t getYTAutoPal () = 0;
|
||||
|
||||
virtual uint32_t getYTLogoPos() = 0;
|
||||
virtual string getYTLogoPath() = 0;
|
||||
|
||||
virtual void setYTLogoPos ( uint32_t pos ) = 0;
|
||||
virtual void setYTLogoPath ( const string& path ) = 0;
|
||||
|
||||
virtual void setRTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal ) = 0;
|
||||
|
||||
virtual uint32_t getRTVideoWidth () = 0;
|
||||
virtual uint32_t getRTVideoHeight () = 0;
|
||||
virtual uint32_t getRTAutoPal () = 0;
|
||||
|
||||
virtual uint8_t getRTScalingType () = 0;
|
||||
virtual void setRTScalingType ( const std::string& sType ) = 0;
|
||||
|
||||
virtual bool cacheDemoMode() = 0;
|
||||
virtual void enableCacheDemoMode() = 0;
|
||||
|
||||
virtual uint8_t getYTScalingType () = 0;
|
||||
virtual void setYTScalingType ( const std::string& sType ) = 0;
|
||||
|
||||
virtual string getMediaInterface() = 0;
|
||||
virtual void setMediaInterface ( const string& sMediaInterface ) = 0;
|
||||
|
||||
virtual bool checkTS( string fileName ) = 0;
|
||||
|
||||
virtual void setTsMtuSize ( const int value ) = 0;
|
||||
virtual void setMaxMIpPacketCount ( const int value ) = 0;
|
||||
virtual void setMaxUIpPacketCount ( const int value ) = 0;
|
||||
|
||||
virtual uint32_t getTsMtuSize() = 0;
|
||||
virtual uint32_t getMaxMIpPacketCount() = 0;
|
||||
virtual uint32_t getMaxUIpPacketCount() = 0;
|
||||
virtual bool sendBlockBySinglePackets() = 0;
|
||||
virtual void enableBlockSendingBySinglePackets() = 0;
|
||||
virtual void enableMaxSpeedMode() = 0;
|
||||
virtual bool maxSpeedMode() = 0;
|
||||
|
||||
virtual bool cyclicMulticastEncoder ( string name ) = 0;
|
||||
virtual int cyclicMulticastEncoderLen ( string name ) = 0;
|
||||
virtual bool isMulticastEncoder ( string name ) = 0;
|
||||
|
||||
|
||||
//virtual double getCyclicNptPos ( string name ) = 0;
|
||||
|
||||
#ifndef __TS_MUXER_COMPILE_MODE
|
||||
virtual string getUserAgentForStream ( const string& streamName ) = 0;
|
||||
virtual SocketAddress getDestinationForStream ( const string& streamName ) = 0;
|
||||
virtual void addStreamInfo ( const string& streamName, const SocketAddress& address, const string& userAgent ) = 0;
|
||||
virtual void delStreamInfo ( const string& streamName ) = 0;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
uint64_t m_ytCacheDuration, m_rtCacheDuration;
|
||||
string m_sLogDirectory, m_sMediaInterface;
|
||||
string m_sYTDomesticHost, m_ytCacheDirectory, m_rtCacheDirectory;
|
||||
uint8_t m_nYTVideoQuality;
|
||||
uint8_t m_nYTScalingType, m_nRTScalingType;
|
||||
|
||||
bool m_ytCacheDisabled, m_ytMp4TranscodingDisabled,
|
||||
m_ytAutoPal, m_sendBlockBySinglePackets,
|
||||
m_rtAutoPal, m_rtCacheDisabled, m_cacheDemoMode, m_maxSpeedMode;
|
||||
|
||||
uint32_t m_ytVideoWidth, m_ytVideoHeight,
|
||||
m_rtVideoWidth, m_rtVideoHeight;
|
||||
|
||||
uint32_t m_tsMtuSize, m_maxMIpPacketCount, m_maxUIpPacketCount, m_trafficBandWidth;
|
||||
|
||||
uint32_t m_ytLogoPos;
|
||||
string m_ytLogoPath;
|
||||
|
||||
#ifndef __TS_MUXER_COMPILE_MODE
|
||||
YTVideoInfoMap m_videoInfoMap;
|
||||
StreamInfoMap m_streamInfoMap;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@ -1,28 +0,0 @@
|
||||
#ifndef __ABSTRACT_VIDEO_CODER_H
|
||||
#define __ABSTRACT_VIDEO_CODER_H
|
||||
|
||||
#include "scrambledInfo.h"
|
||||
|
||||
namespace vodcore
|
||||
{
|
||||
|
||||
class AbstractVideoDecoder {
|
||||
public:
|
||||
AbstractVideoDecoder(int rewindCoeff):m_rewindCoeff(rewindCoeff) {}
|
||||
virtual ~AbstractVideoDecoder() {}
|
||||
virtual bool processNextBlock(ScrambledInfo& inScrambledInfo,
|
||||
ScrambledInfo& outScrambledInfo,
|
||||
ScrambledInfo& outBackScrambledInfo,
|
||||
uint8_t* data, uint32_t dataLen,
|
||||
uint8_t* outBuff,
|
||||
uint32_t& outBufLen,
|
||||
uint8_t* rbBuff, uint32_t &rbBufLen,
|
||||
uint64_t lastPTS) = 0;
|
||||
virtual void setStreamID(uint8_t streamID) = 0;
|
||||
//virtual int getBitRate() = 0;
|
||||
protected:
|
||||
int m_rewindCoeff;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
@ -1,113 +0,0 @@
|
||||
|
||||
#include "base64.h"
|
||||
#include <iostream>
|
||||
|
||||
static const std::string base64_chars =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz"
|
||||
"0123456789+/";
|
||||
|
||||
|
||||
static inline bool is_base64(uint8_t c) {
|
||||
return (isalnum(c) || (c == '+') || (c == '/'));
|
||||
}
|
||||
|
||||
|
||||
std::string Base64::encode(uint8_t const* bytes_to_encode, unsigned int in_len) {
|
||||
std::string ret;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
uint8_t char_array_3[3];
|
||||
uint8_t char_array_4[4];
|
||||
|
||||
while (in_len--) {
|
||||
char_array_3[i++] = *(bytes_to_encode++);
|
||||
if (i == 3) {
|
||||
char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
|
||||
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
|
||||
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
|
||||
char_array_4[3] = char_array_3[2] & 0x3f;
|
||||
|
||||
for(i = 0; (i <4) ; i++)
|
||||
ret += base64_chars[char_array_4[i]];
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i)
|
||||
{
|
||||
for(j = i; j < 3; j++)
|
||||
char_array_3[j] = '\0';
|
||||
|
||||
char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
|
||||
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
|
||||
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
|
||||
char_array_4[3] = char_array_3[2] & 0x3f;
|
||||
|
||||
for (j = 0; (j < i + 1); j++)
|
||||
ret += base64_chars[char_array_4[j]];
|
||||
|
||||
while((i++ < 3))
|
||||
ret += '=';
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
void Base64::decode(std::string const& encoded_string, char* buff, int bufLen, int& decodedLen) {
|
||||
int in_len = encoded_string.size();
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int in_ = 0;
|
||||
uint8_t char_array_4[4], char_array_3[3];
|
||||
decodedLen = 0;
|
||||
//std::string ret;
|
||||
|
||||
while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) {
|
||||
char_array_4[i++] = encoded_string[in_]; in_++;
|
||||
if (i ==4) {
|
||||
for (i = 0; i <4; i++)
|
||||
char_array_4[i] = base64_chars.find(char_array_4[i]);
|
||||
|
||||
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
|
||||
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
|
||||
char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
|
||||
|
||||
for (i = 0; (i < 3); i++) {
|
||||
//ret += char_array_3[i];
|
||||
if (decodedLen >= bufLen) {
|
||||
decodedLen = -1;
|
||||
return;
|
||||
}
|
||||
buff[decodedLen++] = char_array_3[i];
|
||||
}
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i) {
|
||||
for (j = i; j <4; j++)
|
||||
char_array_4[j] = 0;
|
||||
|
||||
for (j = 0; j <4; j++)
|
||||
char_array_4[j] = base64_chars.find(char_array_4[j]);
|
||||
|
||||
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
|
||||
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
|
||||
char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
|
||||
|
||||
for (j = 0; (j < i - 1); j++)
|
||||
{
|
||||
//ret += char_array_3[j];
|
||||
if (decodedLen >= bufLen) {
|
||||
decodedLen = -1;
|
||||
return;
|
||||
}
|
||||
buff[decodedLen++] = char_array_3[j];
|
||||
}
|
||||
}
|
||||
|
||||
//return ret;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#ifndef __BASE_64_H
|
||||
#define __BASE_64_H
|
||||
|
||||
#include <string>
|
||||
#include <types/types.h>
|
||||
|
||||
class Base64 {
|
||||
public:
|
||||
static std::string encode(uint8_t const* buffer, unsigned int len);
|
||||
static void decode(std::string const& encoded_string, char* buff, int bufLen, int& decodedLen);
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
141
tsMuxer/bswap.h
141
tsMuxer/bswap.h
@ -1,141 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file bswap.h
|
||||
* byte swap.
|
||||
*/
|
||||
|
||||
#ifndef __BSWAP_H__
|
||||
#define __BSWAP_H__
|
||||
|
||||
#include <types/types.h>
|
||||
//#include "common.h"
|
||||
|
||||
#ifdef HAVE_BYTESWAP_H
|
||||
#include <byteswap.h>
|
||||
#else
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
# define LEGACY_REGS "=Q"
|
||||
#else
|
||||
# define LEGACY_REGS "=q"
|
||||
#endif
|
||||
|
||||
static inline uint16_t bswap_16(uint16_t x)
|
||||
{
|
||||
#if defined(ARCH_X86)
|
||||
__asm("rorw $8, %0" :
|
||||
LEGACY_REGS (x) :
|
||||
"0" (x));
|
||||
#elif defined(ARCH_SH4)
|
||||
__asm__("swap.b %0,%0":"=r"(x):"0"(x));
|
||||
#else
|
||||
x= (x>>8) | (x<<8);
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline uint32_t bswap_32(uint32_t x)
|
||||
{
|
||||
#if defined(ARCH_X86)
|
||||
#if __CPU__ != 386
|
||||
__asm("bswap %0":
|
||||
"=r" (x) :
|
||||
#else
|
||||
__asm("xchgb %b0,%h0\n"
|
||||
" rorl $16,%0\n"
|
||||
" xchgb %b0,%h0":
|
||||
LEGACY_REGS (x) :
|
||||
#endif
|
||||
"0" (x));
|
||||
#elif defined(ARCH_SH4)
|
||||
__asm__(
|
||||
"swap.b %0,%0\n"
|
||||
"swap.w %0,%0\n"
|
||||
"swap.b %0,%0\n"
|
||||
:"=r"(x):"0"(x));
|
||||
#elif defined(ARCH_ARM)
|
||||
uint32_t t;
|
||||
__asm__ (
|
||||
"eor %1, %0, %0, ror #16 \n\t"
|
||||
"bic %1, %1, #0xFF0000 \n\t"
|
||||
"mov %0, %0, ror #8 \n\t"
|
||||
"eor %0, %0, %1, lsr #8 \n\t"
|
||||
: "+r"(x), "+r"(t));
|
||||
#elif defined(ARCH_BFIN)
|
||||
unsigned tmp;
|
||||
asm("%1 = %0 >> 8 (V);\n\t"
|
||||
"%0 = %0 << 8 (V);\n\t"
|
||||
"%0 = %0 | %1;\n\t"
|
||||
"%0 = PACK(%0.L, %0.H);\n\t"
|
||||
: "+d"(x), "=&d"(tmp));
|
||||
#else
|
||||
x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
||||
x= (x>>16) | (x<<16);
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline uint64_t bswap_64(uint64_t x)
|
||||
{
|
||||
#if 0
|
||||
x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL);
|
||||
x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL);
|
||||
return (x>>32) | (x<<32);
|
||||
#elif defined(ARCH_X86_64)
|
||||
__asm("bswap %0":
|
||||
"=r" (x) :
|
||||
"0" (x));
|
||||
return x;
|
||||
#else
|
||||
union {
|
||||
uint64_t ll;
|
||||
uint32_t l[2];
|
||||
} w, r;
|
||||
w.ll = x;
|
||||
r.l[0] = bswap_32 (w.l[1]);
|
||||
r.l[1] = bswap_32 (w.l[0]);
|
||||
return r.ll;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !HAVE_BYTESWAP_H */
|
||||
|
||||
// be2me ... BigEndian to MachineEndian
|
||||
// le2me ... LittleEndian to MachineEndian
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define be2me_16(x) (x)
|
||||
#define be2me_32(x) (x)
|
||||
#define be2me_64(x) (x)
|
||||
#define le2me_16(x) bswap_16(x)
|
||||
#define le2me_32(x) bswap_32(x)
|
||||
#define le2me_64(x) bswap_64(x)
|
||||
#else
|
||||
#define be2me_16(x) bswap_16(x)
|
||||
#define be2me_32(x) bswap_32(x)
|
||||
#define be2me_64(x) bswap_64(x)
|
||||
#define le2me_16(x) (x)
|
||||
#define le2me_32(x) (x)
|
||||
#define le2me_64(x) (x)
|
||||
#endif
|
||||
|
||||
#endif /* __BSWAP_H__ */
|
@ -4,7 +4,7 @@
|
||||
#include "vod_common.h"
|
||||
#include "vodCoreException.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@ -19,7 +19,7 @@ bool FileReaderData::openStream()
|
||||
|
||||
if ( !rez )
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
char msgBuf [ 32*1024 ];
|
||||
|
||||
memset ( msgBuf, 0, sizeof(msgBuf) );
|
||||
|
@ -1,21 +0,0 @@
|
||||
#ifndef __BUFFERED_RANDOM_ACCESS_READER_H
|
||||
#define __BUFFERED_RANDOM_ACCESS_READER_H
|
||||
|
||||
#include "abstractreader.h"
|
||||
|
||||
namespace vodcore
|
||||
{
|
||||
class BufferedRandomAccessReader
|
||||
{
|
||||
public:
|
||||
BufferedRandomAccessReader() {}
|
||||
virtual ~BufferedRandomAccessReader() {}
|
||||
|
||||
virtual bool skipBlock(uint32_t readerID, uint32_t blockCnt) = 0;
|
||||
virtual bool gotoBlock(uint32_t readerID, uint32_t blockNum) = 0;
|
||||
virtual bool gotoByte(uint32_t readerID, uint64_t seekDist) = 0;
|
||||
virtual std::string getFileName () = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,48 +0,0 @@
|
||||
#include "bswap.h"
|
||||
#include "crc.h"
|
||||
|
||||
int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, unsigned ctx_size)
|
||||
{
|
||||
int i, j;
|
||||
uint32_t c;
|
||||
|
||||
if (bits < 8 || bits > 32 || poly >= (1LL<<bits))
|
||||
return -1;
|
||||
if (ctx_size != sizeof(AVCRC)*257 && ctx_size != sizeof(AVCRC)*1024)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
if (le) {
|
||||
for (c = i, j = 0; j < 8; j++)
|
||||
c = (c>>1)^(poly & (-(c&1)));
|
||||
ctx[i] = c;
|
||||
} else {
|
||||
for (c = i << 24, j = 0; j < 8; j++)
|
||||
c = (c<<1) ^ ((poly<<(32-bits)) & (((int32_t)c)>>31) );
|
||||
ctx[i] = bswap_32(c);
|
||||
}
|
||||
}
|
||||
ctx[256]=1;
|
||||
if(ctx_size >= sizeof(AVCRC)*1024)
|
||||
for (i = 0; i < 256; i++)
|
||||
for(j=0; j<3; j++)
|
||||
ctx[256*(j+1) + i]= (ctx[256*j + i]>>8) ^ ctx[ ctx[256*j + i]&0xFF ];
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
|
||||
{
|
||||
const uint8_t *end= buffer+length;
|
||||
if(!ctx[256])
|
||||
while(buffer<end-3){
|
||||
crc ^= le2me_32(*(uint32_t*)buffer); buffer+=4;
|
||||
crc = ctx[3*256 + ( crc &0xFF)]
|
||||
^ctx[2*256 + ((crc>>8 )&0xFF)]
|
||||
^ctx[1*256 + ((crc>>16)&0xFF)]
|
||||
^ctx[0*256 + ((crc>>24) )];
|
||||
}
|
||||
while(buffer<end)
|
||||
crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8);
|
||||
|
||||
return crc;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
#ifndef __CRC_H
|
||||
#define __CRC_H
|
||||
|
||||
typedef uint32_t AVCRC;
|
||||
|
||||
int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, unsigned ctx_size);
|
||||
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length);
|
||||
|
||||
#endif /* __CRC_H */
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
|
@ -594,7 +594,7 @@ int main(int argc, char** argv)
|
||||
|
||||
LTRACE(LT_INFO, 2, "");
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
char buffer[1024*16];
|
||||
CharToOemA(itemName.c_str(), buffer);
|
||||
LTRACE(LT_INFO, 2, "File #" << strPadLeft(int32ToStr(i),5,'0') << " name=" << buffer);
|
||||
@ -752,7 +752,7 @@ int main(int argc, char** argv)
|
||||
} catch(runtime_error& e) {
|
||||
if (argc == 2)
|
||||
LTRACE2(LT_ERROR, "Error: ");
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
char buffer[1024*16];
|
||||
CharToOemA(e.what(), buffer);
|
||||
LTRACE(LT_ERROR, 2, buffer);
|
||||
@ -763,7 +763,7 @@ int main(int argc, char** argv)
|
||||
} catch(VodCoreException& e) {
|
||||
if (argc == 2)
|
||||
LTRACE2(LT_ERROR, "Error: ");
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
char buffer[1024*16];
|
||||
CharToOemA(e.m_errStr.c_str(), buffer);
|
||||
LTRACE(LT_ERROR, 2, buffer);
|
||||
|
@ -1160,7 +1160,7 @@ void METADemuxer::updateReport(bool checkTime)
|
||||
|
||||
void METADemuxer::lineBack()
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
HANDLE consoleOutput;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include "mpegStreamReader.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#endif
|
||||
#include <memory.h>
|
||||
#include "mpegVideo.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#if !defined(WIN32) || defined(WIN32_DEBUG_FREETYPE)
|
||||
#if !defined(_WIN32) || defined(WIN32_DEBUG_FREETYPE)
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#pragma comment(lib, "../../freetype/lib/freetype.lib")
|
||||
#endif
|
||||
|
||||
@ -15,13 +15,11 @@
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(_WIN32)
|
||||
const static char FONT_ROOT[] = "c:/WINDOWS/Fonts"; // for debug only
|
||||
#endif
|
||||
#ifdef LINUX
|
||||
#elif __linux__ == 1
|
||||
const static char FONT_ROOT[] = "/usr/share/fonts/";
|
||||
#endif
|
||||
#ifdef MAC
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
const static char FONT_ROOT[] = "/Library/Fonts/";
|
||||
#endif
|
||||
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
struct BitmapInfo {
|
||||
int Width;
|
||||
int Height;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
RGBQUAD* buffer; // rgb triple buffer
|
||||
#else
|
||||
text_subtitles::RGBQUAD* buffer;
|
||||
|
@ -1,72 +0,0 @@
|
||||
#ifndef __SCRAMBLED_INFO_H
|
||||
#define __SCRAMBLED_INFO_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <types/types.h>
|
||||
|
||||
#include <fs/systemlog.h>
|
||||
|
||||
struct ScrambledData {
|
||||
uint32_t m_start;
|
||||
uint32_t m_len;
|
||||
int m_code;
|
||||
ScrambledData(uint32_t start, uint32_t len, int code): m_start(start), m_len(len), m_code(code) {}
|
||||
};
|
||||
|
||||
class ScrambledInfo {
|
||||
public:
|
||||
ScrambledInfo() { m_scrambledIndex = m_offset = 0; }
|
||||
void clear() {
|
||||
m_data.clear();
|
||||
m_scrambledIndex = 0;
|
||||
m_offset = 0;
|
||||
}
|
||||
const size_t size() { return m_data.size(); }
|
||||
void addValue(uint32_t start, uint32_t len, int code)
|
||||
{
|
||||
if (m_data.size() > 0 && m_data[m_data.size()-1].m_start == start && m_data[m_data.size()-1].m_code == code)
|
||||
m_data[m_data.size()-1].m_len += len;
|
||||
else
|
||||
m_data.push_back(ScrambledData(start, len, code));
|
||||
};
|
||||
|
||||
int getScrambledIndex(uint32_t offset) {
|
||||
for (; m_scrambledIndex < m_data.size(); ++m_scrambledIndex)
|
||||
if (m_data[m_scrambledIndex].m_start - m_offset >= offset)
|
||||
return (int) m_scrambledIndex;
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool isScrambled(uint32_t offset) {
|
||||
//LTRACE(6, 0, "ggg = " << offset);
|
||||
for (size_t i = m_scrambledIndex; i < m_data.size(); ++i) {
|
||||
size_t start = m_data[i].m_start - m_offset;
|
||||
size_t len = m_data[i].m_len;
|
||||
//LTRACE(6, 0, "start = " << start << "end=" << start+len);
|
||||
if (start > offset)
|
||||
return false;
|
||||
else if (start <= offset && start + len >= offset)
|
||||
return true;
|
||||
}
|
||||
//LTRACE(6, 0, "end of ggg");
|
||||
return false;
|
||||
}
|
||||
|
||||
void setDataOffset(size_t offset) {m_offset = offset;}
|
||||
|
||||
|
||||
//const getData() {return m_data;}
|
||||
//const ScrambledData& operator[](size_t index) { return m_data[index]; }
|
||||
//const ScrambledData& getData(size_t index) {return m_data[index];}
|
||||
const uint32_t getDataStart(size_t index) {return m_data[index].m_start - m_offset;}
|
||||
const uint32_t getDataLen(size_t index) {return m_data[index].m_len;}
|
||||
const uint32_t getDataCode(size_t index) {return m_data[index].m_code;}
|
||||
|
||||
private:
|
||||
size_t m_scrambledIndex;
|
||||
std::vector<ScrambledData> m_data;
|
||||
size_t m_offset;
|
||||
};
|
||||
|
||||
#endif
|
@ -148,7 +148,7 @@ void SingleFileMuxer::openDstFile()
|
||||
//if (!createDir(dstFileName, true))
|
||||
// THROW(ERR_CANT_CREATE_FILE, "Can't create output directory " << dstFileName);
|
||||
int systemFlags = 0;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (m_owner->isAsyncMode())
|
||||
systemFlags += FILE_FLAG_NO_BUFFERING;
|
||||
#endif
|
||||
@ -198,7 +198,7 @@ void SingleFileMuxer::writeOutBuffer(StreamInfo* streamInfo)
|
||||
streamInfo->m_part++;
|
||||
int systemFlags = 0;
|
||||
streamInfo->m_bufLen = 0;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (m_owner->isAsyncMode())
|
||||
systemFlags += FILE_FLAG_NO_BUFFERING;
|
||||
#endif
|
||||
|
@ -97,7 +97,7 @@ bool SRTStreamReader::detectSrcFormat(uint8_t* dataStart, int len, int& prefixLe
|
||||
m_short_R = my_htons(0x0d00);
|
||||
}
|
||||
else {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
m_srcFormat = UtfConverter::sfANSI; // default value for win32
|
||||
#else
|
||||
//m_srcFormat = UtfConverter::sfDefault;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "textSubtitles.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
# include <winerror.h>
|
||||
# include "osdep/textSubtitlesRenderWin32.h"
|
||||
# ifdef WIN32_DEBUG_FREETYPE
|
||||
@ -40,7 +40,7 @@ TextToPGSConverter::TextToPGSConverter(bool sourceIsText): /*TextSubtitlesRender
|
||||
m_minLine = 0;
|
||||
m_maxLine = 0;
|
||||
if (sourceIsText) {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#ifdef WIN32_DEBUG_FREETYPE
|
||||
m_textRender = new TextSubtitlesRenderFT;
|
||||
#else
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __TEXT_SUBTITLES_H
|
||||
#define __TEXT_SUBTITLES_H
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <map>
|
||||
#include <types/types.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
@ -15,7 +15,7 @@ namespace text_subtitles
|
||||
const static int DEFAULT_BROWSER_STYLE_FS = 3;
|
||||
const static double BROWSER_FONT_STYLE_INC_COEFF = 1.4142135623730950488016887242097; // example: font 2 > font1 to 20%
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
struct RGBQUAD {
|
||||
uint8_t rgbBlue;
|
||||
uint8_t rgbGreen;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <fs/textfile.h>
|
||||
#include "iso_writer.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@ -1376,7 +1376,7 @@ void TSMuxer::openDstFile()
|
||||
m_muxFile = m_fileFactory ? m_fileFactory->createFile() : new File();
|
||||
|
||||
int systemFlags = 0;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (m_owner->isAsyncMode())
|
||||
systemFlags += FILE_FLAG_NO_BUFFERING;
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#endif
|
||||
#include "tsPacket.h"
|
||||
#include "bitStream.h"
|
||||
|
@ -1,664 +0,0 @@
|
||||
#include "abstractCoreContext.h"
|
||||
#include "vodTransport.h"
|
||||
|
||||
#include "vod_common.h"
|
||||
#include <fs/systemlog.h>
|
||||
|
||||
#define NO_SCALING 0
|
||||
#define FFMPEG_SCALING 1
|
||||
#define SM_SCALING 2
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace vodcore
|
||||
{
|
||||
|
||||
class VodCoreContext: public AbstractCoreContext
|
||||
{
|
||||
typedef std::pair < uint8_t, double > ParamPair;
|
||||
typedef std::pair < string, ParamPair > InfoPair;
|
||||
|
||||
|
||||
public:
|
||||
unsigned startStreaming( const char* session,
|
||||
int streamingMode,
|
||||
double ntpPos,
|
||||
int scale,
|
||||
const char* fileName,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle)
|
||||
{
|
||||
return vodcore::startStreaming(session, streamingMode, ntpPos, scale, fileName, address, port, rtpInfo, tcpSocketHandle);
|
||||
}
|
||||
|
||||
unsigned startSmartBridgeStreaming ( const char* sessionID, double ntpPos,
|
||||
const char* url,
|
||||
const char* address,
|
||||
unsigned short port, const char* rtpInfo,
|
||||
long tcpSocketHandle
|
||||
)
|
||||
{
|
||||
return vodcore::startSmartBridgeStreaming ( sessionID, ntpPos, url, address, port, rtpInfo, tcpSocketHandle );
|
||||
}
|
||||
|
||||
void setYTCacheParams ( const string& sCacheDirectory, const string& sLogDirectory, uint64_t nTotalCacheDuration )
|
||||
{
|
||||
|
||||
m_ytCacheDirectory = sCacheDirectory;
|
||||
m_sLogDirectory = sLogDirectory;
|
||||
m_ytCacheDuration = nTotalCacheDuration;
|
||||
}
|
||||
|
||||
void setRTCacheParams ( const string& sCacheDirectory, uint64_t nTotalCacheDuration )
|
||||
{
|
||||
|
||||
m_rtCacheDirectory = sCacheDirectory;
|
||||
m_rtCacheDuration = nTotalCacheDuration;
|
||||
}
|
||||
|
||||
void removeYTDemuxer ( const std::string& streamName) {
|
||||
Mutex::ScopedLock lock(&m_demuxerMutex);
|
||||
m_demuxers.erase(streamName);
|
||||
}
|
||||
|
||||
void setYTDemuxer(const std::string& streamName, AbstractDemuxer* demuxer) {
|
||||
Mutex::ScopedLock lock(&m_demuxerMutex);
|
||||
m_demuxers[streamName] = demuxer;
|
||||
}
|
||||
|
||||
void removeRTDemuxer ( const std::string& streamName) {
|
||||
removeYTDemuxer ( streamName );
|
||||
}
|
||||
|
||||
void setRTDemuxer(const std::string& streamName, AbstractDemuxer* demuxer) {
|
||||
setYTDemuxer ( streamName, demuxer );
|
||||
}
|
||||
|
||||
unsigned seekYouTubeStreaming ( const char* streamName, double nptPos)
|
||||
{
|
||||
AbstractDemuxer* demuxer = 0;
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_demuxerMutex);
|
||||
map<string, AbstractDemuxer*>::iterator itr = m_demuxers.find(streamName);
|
||||
if (itr != m_demuxers.end())
|
||||
demuxer = itr->second;
|
||||
}
|
||||
if (demuxer)
|
||||
{
|
||||
demuxer->readSeek(1, nptPos);
|
||||
return ( unsigned )nptPos;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
unsigned seekRuTubeStreaming ( const char* streamName, double nptPos)
|
||||
{
|
||||
return seekYouTubeStreaming ( streamName, nptPos );
|
||||
}
|
||||
|
||||
uint64_t getRTStreamDuration ( const std::string& streamName )
|
||||
{
|
||||
return getYTStreamDuration ( streamName );
|
||||
}
|
||||
|
||||
uint64_t getYTStreamDuration ( const std::string& streamName )
|
||||
{
|
||||
AbstractDemuxer* demuxer = 0;
|
||||
uint64_t duration = 0;
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_demuxerMutex);
|
||||
map<string, AbstractDemuxer*>::iterator itr = m_demuxers.find(streamName);
|
||||
if ( itr != m_demuxers.end() )
|
||||
demuxer = itr->second;
|
||||
}
|
||||
if (demuxer)
|
||||
duration = demuxer->getDuration ();
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
void setYTVideoInfo ( const std::string& streamName, uint8_t existingType, double fps )
|
||||
{
|
||||
m_videoInfoMap.insert ( InfoPair ( streamName, ParamPair ( existingType, fps ) ) );
|
||||
}
|
||||
|
||||
void setRTVideoInfo ( const std::string& streamName, uint8_t existingType, double fps )
|
||||
{
|
||||
setYTVideoInfo ( streamName, existingType, fps );
|
||||
}
|
||||
|
||||
void getYTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp )
|
||||
{
|
||||
if ( m_videoInfoMap.count ( streamName ) > 0 )
|
||||
{
|
||||
YTVideoInfoMap::iterator iter = m_videoInfoMap.find ( streamName );
|
||||
|
||||
if ( iter != m_videoInfoMap.end() )
|
||||
{
|
||||
existingType = iter->second.first;
|
||||
fps = iter->second.second;
|
||||
|
||||
if ( cleanUp )
|
||||
m_videoInfoMap.erase ( streamName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void getRTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp )
|
||||
{
|
||||
getYTVideoInfo ( streamName, existingType, fps, cleanUp );
|
||||
}
|
||||
|
||||
uint64_t getYTCacheDuration ()
|
||||
{
|
||||
return m_ytCacheDuration;
|
||||
}
|
||||
|
||||
uint64_t getRTCacheDuration ()
|
||||
{
|
||||
return m_rtCacheDuration;
|
||||
}
|
||||
|
||||
string getYTCacheDirectory () { return m_ytCacheDirectory; }
|
||||
string getRTCacheDirectory () { return m_rtCacheDirectory; }
|
||||
|
||||
string getLogDirectory () { return m_sLogDirectory; }
|
||||
|
||||
void setYTDomesticHost ( const std::string& sDomesticHost )
|
||||
{
|
||||
if ( !sDomesticHost.empty () )
|
||||
m_sYTDomesticHost = sDomesticHost;
|
||||
}
|
||||
|
||||
void setYTVideoQuality ( const std::string& sQuality )
|
||||
{
|
||||
string sQ = strToLowerCase ( trimStr ( sQuality ) );
|
||||
|
||||
if ( sQ == "high" || sQ == "mp4" )
|
||||
m_nYTVideoQuality = 18;
|
||||
else
|
||||
m_nYTVideoQuality = 5;
|
||||
}
|
||||
|
||||
virtual uint32_t getYTLogoPos() { return m_ytLogoPos; }
|
||||
virtual string getYTLogoPath() { return m_ytLogoPath;}
|
||||
|
||||
virtual void setYTLogoPos ( uint32_t pos ) { m_ytLogoPos = pos; }
|
||||
virtual void setYTLogoPath ( const string& path ) { m_ytLogoPath = path; }
|
||||
|
||||
|
||||
void disableYTCache ()
|
||||
{
|
||||
m_ytCacheDisabled = true;
|
||||
}
|
||||
|
||||
void disableRTCache ()
|
||||
{
|
||||
m_rtCacheDisabled = true;
|
||||
}
|
||||
|
||||
void disableYTMp4Transcoding ()
|
||||
{
|
||||
m_ytMp4TranscodingDisabled = true;
|
||||
}
|
||||
|
||||
void setYTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal )
|
||||
{
|
||||
m_ytVideoWidth = !autoPal && width > 0 && width < uint32_t ( - 1 ) ? width : 352;
|
||||
m_ytVideoHeight = !autoPal && height > 0 && height < uint32_t ( - 1 ) ? height : 288;
|
||||
|
||||
m_ytAutoPal = autoPal;
|
||||
}
|
||||
|
||||
void setRTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal )
|
||||
{
|
||||
m_rtVideoWidth = !autoPal && width > 0 && width < uint32_t ( - 1 ) ? width : 352;//476
|
||||
m_rtVideoHeight = !autoPal && height > 0 && height < uint32_t ( - 1 ) ? height : 288;//320
|
||||
|
||||
m_rtAutoPal = autoPal;
|
||||
}
|
||||
|
||||
virtual uint32_t getYTVideoWidth () { return m_ytVideoWidth; }
|
||||
virtual uint32_t getYTVideoHeight () { return m_ytVideoHeight; }
|
||||
virtual uint32_t getYTAutoPal () { return m_ytAutoPal; }
|
||||
|
||||
virtual uint32_t getRTVideoWidth () { return m_rtVideoWidth; }
|
||||
virtual uint32_t getRTVideoHeight () { return m_rtVideoHeight; }
|
||||
virtual uint32_t getRTAutoPal () { return m_rtAutoPal; }
|
||||
|
||||
|
||||
bool isYTCacheDisabled ()
|
||||
{
|
||||
return m_ytCacheDisabled;
|
||||
}
|
||||
|
||||
bool isRTCacheDisabled ()
|
||||
{
|
||||
return m_rtCacheDisabled;
|
||||
}
|
||||
|
||||
void setRTScalingType ( const std::string& sType )
|
||||
{
|
||||
string sScalingType = strToLowerCase ( trimStr ( sType ) );
|
||||
|
||||
if ( sScalingType == "ffmpeg" )
|
||||
m_nRTScalingType = FFMPEG_SCALING;
|
||||
else if ( sScalingType == "smartlabs")
|
||||
m_nRTScalingType = SM_SCALING;
|
||||
else
|
||||
m_nRTScalingType = NO_SCALING;
|
||||
}
|
||||
|
||||
uint8_t getRTScalingType () {
|
||||
return m_nRTScalingType;
|
||||
}
|
||||
|
||||
void setYTScalingType ( const std::string& sType )
|
||||
{
|
||||
string sScalingType = strToLowerCase ( trimStr ( sType ) );
|
||||
|
||||
if ( sScalingType == "ffmpeg" )
|
||||
m_nYTScalingType = FFMPEG_SCALING;
|
||||
else if ( sScalingType == "smartlabs")
|
||||
m_nYTScalingType = SM_SCALING;
|
||||
else
|
||||
m_nYTScalingType = NO_SCALING;
|
||||
}
|
||||
|
||||
uint8_t getYTScalingType () {
|
||||
return m_nYTScalingType;
|
||||
}
|
||||
|
||||
uint8_t getYTVideoQuality () { return m_nYTVideoQuality; }
|
||||
|
||||
bool isYTMp4TranscodingDisabled () { return m_ytMp4TranscodingDisabled; }
|
||||
|
||||
string getYTDomesticHost ()
|
||||
{
|
||||
if ( m_sYTDomesticHost.empty() )
|
||||
{
|
||||
uint32_t nSize = 255;
|
||||
char* pDstBuff = new char [ nSize ];
|
||||
vodcore::getYTDomesticHost ( pDstBuff, nSize );
|
||||
m_sYTDomesticHost = string ( pDstBuff, nSize );
|
||||
delete [] pDstBuff;
|
||||
}
|
||||
|
||||
return m_sYTDomesticHost;
|
||||
}
|
||||
|
||||
int createStreamingGroup(const char* address,
|
||||
const char* name, double nptPos, int scale,
|
||||
int lowLevelTransport,
|
||||
int loopCount,
|
||||
int eoplDelay,
|
||||
int eofDelay,
|
||||
bool suspended
|
||||
)
|
||||
{
|
||||
return vodcore::createStreamingGroup(address, name, nptPos, scale, lowLevelTransport, loopCount, eoplDelay, eofDelay, suspended);
|
||||
}
|
||||
|
||||
void setSyncGroupCount ( int count )
|
||||
{
|
||||
return vodcore::setSyncGroupCount ( count );
|
||||
}
|
||||
|
||||
void resumeStreamingGroup ( const char* name )
|
||||
{
|
||||
return vodcore::resumeStreamingGroup ( name );
|
||||
}
|
||||
int startStreamingDVD(const char* groupName, int llTransport)
|
||||
{
|
||||
return vodcore::startStreamingDVD(groupName, llTransport);
|
||||
}
|
||||
|
||||
int startStreamingDVDExt(const char* groupName, int llTransport,
|
||||
const char* dvdDrive,
|
||||
const char* folder)
|
||||
{
|
||||
return vodcore::startStreamingDVDExt(groupName, llTransport, dvdDrive, folder);
|
||||
}
|
||||
|
||||
double getGroupNptPos(const char* groupName)
|
||||
{
|
||||
return vodcore::getGroupNptPos(groupName);
|
||||
}
|
||||
|
||||
bool isStreamingGroup(const char* fileName)
|
||||
{
|
||||
return vodcore::isStreamingGroup(fileName);
|
||||
}
|
||||
|
||||
uint32_t addDestination(const char* session,
|
||||
const char* fileName,
|
||||
const char* ip, uint16_t port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle,
|
||||
const char* ixface)
|
||||
{
|
||||
return vodcore::addDestination(session, fileName, ip, port, rtpInfo, tcpSocketHandle, ixface);
|
||||
}
|
||||
|
||||
int removeDestination(const char* fileName, long handle)
|
||||
{
|
||||
return vodcore::removeDestination(fileName, handle);
|
||||
}
|
||||
|
||||
int stopStreaming(unsigned streamer)
|
||||
{
|
||||
return vodcore::stopStreaming(streamer);
|
||||
}
|
||||
|
||||
unsigned pauseStreaming(unsigned readerID)
|
||||
{
|
||||
return vodcore::pauseStreaming(readerID);
|
||||
}
|
||||
|
||||
unsigned resumeStreaming(unsigned readerID)
|
||||
{
|
||||
return vodcore::resumeStreaming(readerID);
|
||||
}
|
||||
|
||||
unsigned changeScale(unsigned readerID, int scale)
|
||||
{
|
||||
return vodcore::changeScale(readerID, scale);
|
||||
}
|
||||
|
||||
unsigned setPosition(unsigned readerID, double position)
|
||||
{
|
||||
return vodcore::setPosition(readerID, position);
|
||||
}
|
||||
|
||||
double getNptPos(unsigned streamer)
|
||||
{
|
||||
return vodcore::getNptPos(streamer);
|
||||
}
|
||||
|
||||
int getRewindSpeed(int requestSpeed)
|
||||
{
|
||||
return vodcore::getRewindSpeed(requestSpeed);
|
||||
}
|
||||
|
||||
unsigned createIndexFile(const char* fileName, bool createRewind)
|
||||
{
|
||||
return vodcore::createIndexFile(fileName, createRewind);
|
||||
}
|
||||
|
||||
unsigned createIndexFileAsync(const char* displayName, const char* fileName, bool createRewind)
|
||||
{
|
||||
return vodcore::createIndexFileAsync(displayName, fileName, createRewind);
|
||||
}
|
||||
|
||||
unsigned getAssetStatus(const char* fileName)
|
||||
{
|
||||
return vodcore::getAssetStatus(fileName);
|
||||
}
|
||||
|
||||
bool getEncodedAssetList(char*rezBuffer, int bufferSize)
|
||||
{
|
||||
return vodcore::getEncodedAssetList(rezBuffer, bufferSize);
|
||||
}
|
||||
|
||||
bool startAutoIndexing(const std::string& dir, bool createRewind)
|
||||
{
|
||||
return vodcore::startAutoIndexing(dir, createRewind);
|
||||
}
|
||||
|
||||
bool stopAutoIndexing()
|
||||
{
|
||||
return vodcore::stopAutoIndexing();
|
||||
}
|
||||
|
||||
|
||||
long multicastJoin(const char* assetName, const char* address, int port, bool overWrite, int cycleBufferLen, const char* ixface, bool createRewind, int nBlockSize, int splitByDurationSize )
|
||||
{
|
||||
return vodcore::multicastJoin(assetName, address, port, overWrite, cycleBufferLen, ixface, createRewind, nBlockSize, splitByDurationSize);
|
||||
}
|
||||
|
||||
int multicastLeave(const char* encoderName)
|
||||
{
|
||||
return vodcore::multicastLeave(encoderName);
|
||||
}
|
||||
|
||||
void setReadThreadCnt(int readThreadCnt)
|
||||
{
|
||||
return vodcore::setReadThreadCnt(readThreadCnt);
|
||||
}
|
||||
|
||||
void initLog(int messageLevel,
|
||||
const char* logName,
|
||||
const char* logDir,
|
||||
int logRotationPeriod)
|
||||
{
|
||||
return vodcore::initLog(messageLevel, logName, logDir, logRotationPeriod);
|
||||
}
|
||||
|
||||
void getAssetDescription ( const char* sessionID, const char* cfileName, int descrType, char* dstBuffer, unsigned len)
|
||||
{
|
||||
return vodcore::getAssetDescription ( sessionID, cfileName, descrType, dstBuffer, len );
|
||||
}
|
||||
|
||||
void registerEventHandler(EVENT_HANDLER_PROC eventHandler)
|
||||
{
|
||||
return vodcore::registerEventHandler(eventHandler);
|
||||
}
|
||||
|
||||
int getAssetInfoFromFile(const char* fileName, char* dstBuffer, int bufSize)
|
||||
{
|
||||
return vodcore::getAssetInfoFromFile(fileName, dstBuffer ,bufSize);
|
||||
}
|
||||
|
||||
int deleteAsset(const char* fileName)
|
||||
{
|
||||
return vodcore::deleteAsset(fileName);
|
||||
}
|
||||
|
||||
int deleteStreamingGroup(const char* groupName)
|
||||
{
|
||||
return vodcore::deleteStreamingGroup(groupName);
|
||||
}
|
||||
|
||||
bool setRootDir(const char* rootDir)
|
||||
{
|
||||
return vodcore::setRootDir(rootDir);
|
||||
}
|
||||
|
||||
bool setM3uRoot(const char* rootDir)
|
||||
{
|
||||
return vodcore::setM3uRoot(rootDir);
|
||||
}
|
||||
|
||||
bool setHttpServerURL(const char* url)
|
||||
{
|
||||
return vodcore::setHttpServerURL(url);
|
||||
}
|
||||
|
||||
bool setDefaultRtspTimeout(const int timeout)
|
||||
{
|
||||
return vodcore::setDefaultRtspTimeout(timeout);
|
||||
}
|
||||
|
||||
int LIB_STD_CALL muxTSFile( std::map<int, MuxTrackInfo> trackInfo,
|
||||
const std::string& outName,
|
||||
int indexingType, int nBitrate, int nVBVLen, int nFileBlockSize )
|
||||
{
|
||||
return vodcore::muxTSFile(trackInfo, outName, indexingType, nBitrate, nVBVLen, nFileBlockSize );
|
||||
}
|
||||
AbstractReader* getReader(const char* streamName) {
|
||||
return vodcore::getReader(streamName);
|
||||
}
|
||||
|
||||
|
||||
bool checkTS( string fileName )
|
||||
{
|
||||
return vodcore::checkTS ( fileName );
|
||||
}
|
||||
|
||||
int getTSDuration ( const char* fileName )
|
||||
{
|
||||
return vodcore::getTSDuration(fileName);
|
||||
}
|
||||
|
||||
string getMediaInterface()
|
||||
{
|
||||
return m_sMediaInterface;
|
||||
}
|
||||
|
||||
void setMediaInterface ( const string& sMediaInterface )
|
||||
{
|
||||
m_sMediaInterface = sMediaInterface;
|
||||
}
|
||||
|
||||
void setTsMtuSize ( const int value )
|
||||
{
|
||||
if ( value > 1500 )
|
||||
LTRACE ( LT_WARN, 0, "Max TS MTU size in Ethernet is 1500B. Value " << value << " is wrong. Used default TS MTU size ( 1400B ). Line: " << __LINE__ )
|
||||
else if ( value > 0 )
|
||||
{
|
||||
m_tsMtuSize = value;
|
||||
LTRACE ( LT_DEBUG, 0, "TS MTU size is " << value << "B. Line: " << __LINE__ )
|
||||
}
|
||||
else
|
||||
LTRACE ( LT_WARN, 0, "TS MTU size must be > 0. Value " << value << " is wrong. Used default TS MTU size ( 1400B ). Line: " << __LINE__ )
|
||||
}
|
||||
|
||||
void setMaxMIpPacketCount ( const int value )
|
||||
{
|
||||
if ( value == 0 )
|
||||
LTRACE ( LT_WARN, 0, "Value 'auto' is wrong for max multicast ip packet count. Used default value ( 6 ). Line: " << __LINE__ )
|
||||
else if ( value < 0 )
|
||||
LTRACE ( LT_WARN, 0, "Value " << value << " is wrong for max multicast ip packet count. Used default value ( 6 ). Line: " << __LINE__ )
|
||||
else if ( value * m_tsMtuSize > 16 * 1024 )
|
||||
LTRACE ( LT_WARN, 0, "Value " << value << " is wrong for max multicast ip packet count ( maxMIpPacketCount * tsMtuSize > 16K ). Used default value ( 6 ). Line: " << __LINE__ )
|
||||
else
|
||||
{
|
||||
m_maxMIpPacketCount = value;
|
||||
LTRACE ( LT_DEBUG, 0, "Max multicast ip packet count is " << value << ". Line: " << __LINE__ )
|
||||
}
|
||||
}
|
||||
|
||||
void setMaxUIpPacketCount ( const int value )
|
||||
{
|
||||
if ( value < 0 )
|
||||
LTRACE ( LT_WARN, 0, "Value " << value << " is wrong for max unicast ip packet count. Used default value ( 6 ). Line: " << __LINE__ )
|
||||
else if ( value * m_tsMtuSize > 16 * 1024 )
|
||||
LTRACE ( LT_WARN, 0, "Value " << value << " is wrong for max unicast ip packet count ( maxUIpPacketCount * tsMtuSize > 16K ). Used default value ( 6 ). Line: " << __LINE__ )
|
||||
else
|
||||
{
|
||||
m_maxUIpPacketCount = value;
|
||||
string str = "'auto'";
|
||||
|
||||
if ( value == 0 )
|
||||
LTRACE ( LT_DEBUG, 0, "Max unicast ip packet count is 'auto'. Line: " << __LINE__ )
|
||||
else
|
||||
LTRACE ( LT_DEBUG, 0, "Max unicast ip packet count is " << value << ". Line: " << __LINE__ )
|
||||
}
|
||||
}
|
||||
|
||||
virtual uint32_t getTsMtuSize() { return m_tsMtuSize; }
|
||||
virtual uint32_t getMaxMIpPacketCount() { return m_maxMIpPacketCount; }
|
||||
virtual uint32_t getMaxUIpPacketCount() { return m_maxUIpPacketCount; }
|
||||
|
||||
virtual SocketAddress getDestinationForStream ( const string& streamName )
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_streamInfoMutex);
|
||||
AbstractCoreContext::StreamInfoMap::iterator itr = m_streamInfoMap.find ( streamName );
|
||||
return itr != m_streamInfoMap.end () ? itr->second.first : SocketAddress();
|
||||
}
|
||||
|
||||
virtual string getUserAgentForStream ( const string& streamName )
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_streamInfoMutex);
|
||||
AbstractCoreContext::StreamInfoMap::iterator itr = m_streamInfoMap.find ( streamName );
|
||||
return itr != m_streamInfoMap.end () ? itr->second.second : "";
|
||||
}
|
||||
|
||||
virtual bool sendBlockBySinglePackets()
|
||||
{
|
||||
return m_sendBlockBySinglePackets;
|
||||
}
|
||||
|
||||
virtual void enableBlockSendingBySinglePackets()
|
||||
{
|
||||
m_sendBlockBySinglePackets = true;
|
||||
}
|
||||
|
||||
virtual void setTrafficBandWidth ( int value )
|
||||
{
|
||||
m_trafficBandWidth = value;
|
||||
}
|
||||
|
||||
virtual uint32_t getTrafficBandWidth ()
|
||||
{
|
||||
return m_trafficBandWidth;
|
||||
}
|
||||
|
||||
virtual int getStatisticForPeriod ( int period,
|
||||
double& avgBroadcastBitrate,
|
||||
double& maxBroadcastBitrate,
|
||||
double& avgRunoffBitrate,
|
||||
double& maxRunoffBitrate,
|
||||
char* interval,
|
||||
int intervalSize
|
||||
)
|
||||
{
|
||||
return vodcore::getStatisticForPeriod ( period, avgBroadcastBitrate, maxBroadcastBitrate, avgRunoffBitrate, maxRunoffBitrate, interval, intervalSize );
|
||||
}
|
||||
|
||||
|
||||
virtual bool cyclicMulticastEncoder ( string name )
|
||||
{
|
||||
return vodcore::cyclicMulticastEncoder ( name );
|
||||
}
|
||||
|
||||
virtual bool isMulticastEncoder ( string name )
|
||||
{
|
||||
return vodcore::isMulticastEncoder ( name );
|
||||
}
|
||||
|
||||
virtual int cyclicMulticastEncoderLen ( string name )
|
||||
{
|
||||
return vodcore::cyclicMulticastEncoderLen ( name );
|
||||
}
|
||||
|
||||
/*
|
||||
virtual double getCyclicNptPos ( string name )
|
||||
{
|
||||
return vodcore::getCyclicNptPos ( name );
|
||||
}
|
||||
*/
|
||||
|
||||
virtual void addStreamInfo ( const string& streamName, const SocketAddress& address, const string& userAgent )
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_streamInfoMutex);
|
||||
m_streamInfoMap [ streamName ] = make_pair ( address, userAgent );
|
||||
}
|
||||
|
||||
virtual void delStreamInfo ( const string& streamName )
|
||||
{
|
||||
Mutex::ScopedLock lock(&m_streamInfoMutex);
|
||||
if ( m_streamInfoMap.count ( streamName ) == 1 )
|
||||
m_streamInfoMap.erase ( streamName );
|
||||
}
|
||||
|
||||
virtual bool cacheDemoMode() { return m_cacheDemoMode; }
|
||||
virtual void enableCacheDemoMode() { m_cacheDemoMode = true; }
|
||||
virtual void enableMaxSpeedMode() { m_maxSpeedMode = true; }
|
||||
virtual bool maxSpeedMode() { return m_maxSpeedMode; }
|
||||
|
||||
private:
|
||||
std::map<std::string, AbstractDemuxer*> m_demuxers;
|
||||
Mutex m_demuxerMutex;
|
||||
Mutex m_streamInfoMutex;
|
||||
};
|
||||
|
||||
AbstractCoreContext* vodCoreContext = new VodCoreContext();
|
||||
|
||||
//VodCoreContext mContext;
|
||||
//AbstractCoreContext* vodCoreContext = &mContext;
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
||||
#include "vod_common.h"
|
||||
#include "memory.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <locale.h>
|
||||
@ -70,7 +70,7 @@ namespace UtfConverter
|
||||
{
|
||||
if (widesize == 0)
|
||||
return L"";
|
||||
#ifdef WIN32
|
||||
#if defined(_WIN32)
|
||||
else if (srcFormat == sfANSI)
|
||||
{
|
||||
wchar_t* widestringnative = new wchar_t[widesize+1];
|
||||
@ -80,8 +80,7 @@ namespace UtfConverter
|
||||
delete [] widestringnative;
|
||||
return resultstring;
|
||||
}
|
||||
#endif
|
||||
#ifdef LINUX
|
||||
#elif __linux__ == 1
|
||||
/*
|
||||
else if (srcFormat == sfDefault)
|
||||
{
|
||||
|
@ -1,232 +0,0 @@
|
||||
#ifndef __VOD_TRANSPORT_H
|
||||
#define __VOD_TRANSPORT_H
|
||||
|
||||
#include "abstractCoreContext.h"
|
||||
#include "crc32.h"
|
||||
|
||||
namespace vodcore
|
||||
{
|
||||
|
||||
#define FEC_R 6
|
||||
#define FEC_K 128
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL reservePorts ( const char* session,
|
||||
int streamingMode,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo,
|
||||
char* outBuff,
|
||||
int& outBuffSize
|
||||
);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL freePorts ( const char* session);
|
||||
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL startStreaming(const char* session,
|
||||
int lowLevelTransport,
|
||||
double ntpPos,
|
||||
int scale,
|
||||
const char* fileName,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle,
|
||||
bool doDownload = false,
|
||||
int64_t downloadLimit = 0);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setTrafficBandWidth ( int value );
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL startEncodingServer(const char* xmlConfigFileName);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL startSmartBridgeStreaming ( const char* sessionID,
|
||||
double ntpPos,
|
||||
const char* url,
|
||||
const char* address,
|
||||
unsigned short port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle
|
||||
);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL retransmitStream ( const char* srcAddress,
|
||||
const char* srcIxface,
|
||||
const char* dstAddress,
|
||||
const char* fwdAddress,
|
||||
bool emulateLack = false );
|
||||
|
||||
LIB_EXPORT long LIB_STD_CALL createRaptorStream(const char* srcAddress, int srcPort, const char* srcIxface,
|
||||
const char* dstAddress, int dstPort, const char* dstIxface,
|
||||
int repairSymbolCount, int symbolCount);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL startRaptorEncoding();
|
||||
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL createStreamingGroup ( const char* address,
|
||||
const char* name,
|
||||
double nptPos,
|
||||
int scale,
|
||||
int lowLevelTransport,
|
||||
int loopCount,
|
||||
int eoplDelay,
|
||||
int eofDelay,
|
||||
bool suspended
|
||||
);
|
||||
LIB_EXPORT void LIB_STD_CALL resumeStreamingGroup(const char* groupName);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setSyncGroupCount ( int count );
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL startStreamingDVD(const char* groupName, int llTransport);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL startStreamingDVDExt(const char* groupName, int llTransport,
|
||||
const char* dvdDrive,
|
||||
const char* folder);
|
||||
LIB_EXPORT double LIB_STD_CALL getGroupNptPos(const char* groupName);
|
||||
|
||||
LIB_EXPORT bool LIB_STD_CALL isStreamingGroup(const char* fileName);
|
||||
|
||||
LIB_EXPORT uint32_t LIB_STD_CALL addDestination ( const char* session,
|
||||
const char* fileName,
|
||||
const char* ip, uint16_t port,
|
||||
const char* rtpInfo,
|
||||
long tcpSocketHandle,
|
||||
const char* ixface
|
||||
);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL removeDestination(const char* fileName, long handle);
|
||||
|
||||
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL stopStreaming(unsigned streamer);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL pauseStreaming(unsigned readerID);
|
||||
LIB_EXPORT unsigned LIB_STD_CALL resumeStreaming(unsigned readerID);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL changeScale(unsigned readerID, int scale);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL setPosition(unsigned readerID, double position);
|
||||
|
||||
LIB_EXPORT double LIB_STD_CALL getNptPos(unsigned streamer);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL getRewindSpeed(int requestSpeed);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL milticastJoin(const char* address, unsigned short port, const char* ixface);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL createIndexFile(const char* fileName, bool createRewind);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL createIndexFileAsync(const char* displayName, const char* fileName, bool createRewind);
|
||||
|
||||
LIB_EXPORT unsigned LIB_STD_CALL getAssetStatus(const char* fileName);
|
||||
|
||||
LIB_EXPORT bool LIB_STD_CALL getEncodedAssetList(char*rezBuffer, int bufferSize);
|
||||
|
||||
LIB_EXPORT bool LIB_STD_CALL startAutoIndexing(const std::string& dir, bool createRewind);
|
||||
LIB_EXPORT bool LIB_STD_CALL stopAutoIndexing();
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL updateIndexes();
|
||||
|
||||
|
||||
LIB_EXPORT long LIB_STD_CALL multicastJoin(const char* assetName, const char* address, int port,
|
||||
bool overWrite, int cycleBufferLen, const char* ixface,
|
||||
bool createRewind, int nBlockSize, int splitByDurationSize);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL multicastLeave(const char* encoderName);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setReadThreadCnt(int readThreadCnt);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setReadOnlyIndexes(bool value);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL initLog(int messageLevel,
|
||||
const char* logName,
|
||||
const char* logDir,
|
||||
int logRotationPeriod);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL getAssetDescription ( const char* sessionID, const char* cfileName, int descrType,
|
||||
char* dstBuffer, unsigned len);
|
||||
|
||||
|
||||
LIB_EXPORT void registerEventHandler(EVENT_HANDLER_PROC eventHandler);
|
||||
LIB_EXPORT int LIB_STD_CALL getAssetInfoFromFile ( const char* fileName, char* dstBuffer, int bufSize );
|
||||
|
||||
LIB_EXPORT int64_t LIB_STD_CALL getFileLength(const char* fileName, double fromOffset); // return whole file length for zerro offset, or partial file length from specified offset
|
||||
LIB_EXPORT int LIB_STD_CALL getTSDuration ( const char* fileName );
|
||||
LIB_EXPORT int LIB_STD_CALL deleteAsset(const char* fileName);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL deleteStreamingGroup(const char* groupName);
|
||||
LIB_EXPORT bool LIB_STD_CALL setRootDir(const char* rootDir);
|
||||
LIB_EXPORT bool LIB_STD_CALL setM3uRoot(const char* rootDir);
|
||||
LIB_EXPORT bool LIB_STD_CALL setHttpServerURL(const char* url);
|
||||
LIB_EXPORT bool LIB_STD_CALL setDefaultRtspTimeout(const int timeout);
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setTsMtuSize ( const int value );
|
||||
LIB_EXPORT void LIB_STD_CALL setMaxMIpPacketCount ( const int value );
|
||||
LIB_EXPORT void LIB_STD_CALL setMaxUIpPacketCount ( const int value );
|
||||
LIB_EXPORT void LIB_STD_CALL enableBlockSendingBySinglePackets ();
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL enableCacheDemoMode();
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setYTLogoPos ( uint32_t pos );
|
||||
LIB_EXPORT void LIB_STD_CALL setYTLogoPath ( const std::string& path );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setYTCacheParams ( const std::string& sCacheDirectory, const std::string& sLogDirectory, uint64_t nTotalCacheDuration );
|
||||
LIB_EXPORT void LIB_STD_CALL setRTCacheParams ( const std::string& sCacheDirectory, uint64_t nTotalCacheDuration );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL getYTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp = false );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL getRTVideoInfo ( const std::string& streamName, uint8_t& existingType, double& fps, bool cleanUp = false );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL getYTDomesticHost ( char* dstBuff, uint32_t& nDstBuffSize );
|
||||
LIB_EXPORT void LIB_STD_CALL setYTDomesticHost ( const std::string& sDomesticHost );
|
||||
|
||||
LIB_EXPORT bool LIB_STD_CALL checkSmartBridgeCache ( const char* streamName );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setYTVideoQuality ( const std::string& sQuality );
|
||||
LIB_EXPORT void LIB_STD_CALL setYTScalingType ( const std::string& sType );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setRTScalingType ( const std::string& sType );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL disableYTCache ();
|
||||
LIB_EXPORT void LIB_STD_CALL disableYTMp4Transcoding ();
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL disableRTCache ();
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setYTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setRTVideoSize ( const uint32_t width, const uint32_t height, const bool autoPal );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL setMediaInterface ( const std::string& sMediaInterface );
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL getStatisticForPeriod ( int period,
|
||||
double& avgBroadcastBitrate,
|
||||
double& maxBroadcastBitrate,
|
||||
double& avgRunoffBitrate,
|
||||
double& maxRunoffBitrate,
|
||||
char* interval,
|
||||
int intervalSize
|
||||
);
|
||||
|
||||
LIB_EXPORT int LIB_STD_CALL getChecksumForAsset ( const char* fileName, char* buffer, int& size );
|
||||
|
||||
std::string getLongFileLocation ( const std::string& fileName );
|
||||
// indexingType == 0 - no indexing
|
||||
// indexingType == 1 - positioning only
|
||||
// indexingType == 2 - full indexing (pos, RB and RF files)
|
||||
const static int NO_INDEX = 0;
|
||||
const static int CREATE_REWIND_INDEX = 1;
|
||||
const static int CREATE_FULL_INDEX = 2;
|
||||
int LIB_STD_CALL muxTSFile( std::map<int, MuxTrackInfo> trackInfo,
|
||||
const std::string& outName,
|
||||
int indexingType, int nBitrate, int nVBVLen, int nFileBlockSize );
|
||||
LIB_EXPORT AbstractReader* LIB_STD_CALL getReader(const char* streamName);
|
||||
LIB_EXPORT bool LIB_STD_CALL checkTS ( std::string fileName );
|
||||
|
||||
LIB_EXPORT void LIB_STD_CALL enableMaxSpeedMode();
|
||||
LIB_EXPORT bool LIB_STD_CALL cyclicMulticastEncoder ( std::string name ); // it is a cyclic multicast encoder
|
||||
LIB_EXPORT int LIB_STD_CALL cyclicMulticastEncoderLen ( std::string name );
|
||||
LIB_EXPORT int cyclicStreamingFirstFileNum(const char* streamName);
|
||||
LIB_EXPORT int cyclicStreamingLastFileNum(const char* streamName);
|
||||
|
||||
LIB_EXPORT bool LIB_STD_CALL isMulticastEncoder ( std::string name ); // it is any type multicast encoder
|
||||
LIB_EXPORT void LIB_STD_CALL loadSmartBridge ( const char* configDir );
|
||||
//LIB_EXPORT double LIB_STD_CALL getCyclicNptPos ( std::string name );
|
||||
}
|
||||
|
||||
#endif
|
@ -7,10 +7,6 @@
|
||||
#include <QSettings>
|
||||
#include <QUrl>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
const char fileDialogFilter[] =
|
||||
"All supported media files (*.aac *.mpv *.mpa *.avc *.mvc *.264 *.h264 *.ac3 *.dts *.ts *.m2ts *.mts *.ssif *.mpg *.mpeg *.vob *.evo *.mkv *.mka *.mks *.mp4 *.m4a *.mov *.sup *.wav *.w64 *.pcm *.m1v *.m2v *.vc1 *.hevc *.hvc *.265 *.h265 *.mpls *.mpl *.srt);;\
|
||||
AC3/E-AC3 (*.ac3 *.ddp);;\
|
||||
|
Loading…
x
Reference in New Issue
Block a user