Update MediaClient
335
MediaClient/HttpFlvTest/HttpFlvTest.cpp
Normal file
@@ -0,0 +1,335 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "http_flv_cln.h"
|
||||
#include "hqueue.h"
|
||||
#include "media_format.h"
|
||||
#include "http_parse.h"
|
||||
|
||||
/**********************************************************/
|
||||
HQUEUE * g_queue;
|
||||
|
||||
int g_flag = 0;
|
||||
pthread_t g_tid = 0;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int event;
|
||||
CHttpFlvClient* httpflv;
|
||||
} EVENT_PARAMS;
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
/**
|
||||
* @desc : http-flv notify callback
|
||||
*
|
||||
* @params :
|
||||
* event : event type
|
||||
* puser : user parameter
|
||||
*/
|
||||
int http_flv_notify_callback(int event, void * puser)
|
||||
{
|
||||
printf("%s, event = %d\r\n", __FUNCTION__, event);
|
||||
|
||||
CHttpFlvClient * p_httpflv = (CHttpFlvClient *) puser;
|
||||
|
||||
if (HTTP_FLV_EVE_VIDEOREADY == event)
|
||||
{
|
||||
int vcodec = p_httpflv->video_codec();
|
||||
if (vcodec != VIDEO_CODEC_NONE)
|
||||
{
|
||||
char codec_str[20] = {'\0'};
|
||||
|
||||
switch (vcodec)
|
||||
{
|
||||
case VIDEO_CODEC_H264:
|
||||
strcpy(codec_str, "H264");
|
||||
break;
|
||||
|
||||
case VIDEO_CODEC_H265:
|
||||
strcpy(codec_str, "H265");
|
||||
break;
|
||||
|
||||
case VIDEO_CODEC_MP4:
|
||||
strcpy(codec_str, "MP4");
|
||||
break;
|
||||
|
||||
case VIDEO_CODEC_JPEG:
|
||||
strcpy(codec_str, "JPEG");
|
||||
break;
|
||||
}
|
||||
|
||||
printf("video codec is %s\r\n", codec_str);
|
||||
}
|
||||
}
|
||||
else if (HTTP_FLV_EVE_AUDIOREADY == event)
|
||||
{
|
||||
int acodec = p_httpflv->audio_codec();
|
||||
if (acodec != AUDIO_CODEC_NONE)
|
||||
{
|
||||
char codec_str[20] = {'\0'};
|
||||
|
||||
switch (acodec)
|
||||
{
|
||||
case AUDIO_CODEC_G711A:
|
||||
strcpy(codec_str, "G711A");
|
||||
break;
|
||||
|
||||
case AUDIO_CODEC_G711U:
|
||||
strcpy(codec_str, "G711U");
|
||||
break;
|
||||
|
||||
case AUDIO_CODEC_G722:
|
||||
strcpy(codec_str, "G722");
|
||||
break;
|
||||
|
||||
case AUDIO_CODEC_G726:
|
||||
strcpy(codec_str, "G726");
|
||||
break;
|
||||
|
||||
case AUDIO_CODEC_OPUS:
|
||||
strcpy(codec_str, "OPUS");
|
||||
break;
|
||||
|
||||
case AUDIO_CODEC_AAC:
|
||||
strcpy(codec_str, "AAC");
|
||||
break;
|
||||
}
|
||||
|
||||
printf("audio codec is %s\r\n", codec_str);
|
||||
printf("audio sample rate is %d\r\n", p_httpflv->get_audio_samplerate());
|
||||
printf("audio channels is %d\r\n", p_httpflv->get_audio_channels());
|
||||
}
|
||||
}
|
||||
|
||||
EVENT_PARAMS params;
|
||||
|
||||
params.event = event;
|
||||
params.httpflv = p_httpflv;
|
||||
|
||||
if (!hqBufPut(g_queue, (char *) ¶ms))
|
||||
{
|
||||
printf("hqBufPut failed\r\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc : http-flv audio data callback
|
||||
*
|
||||
* @params :
|
||||
* pdata : audio data buffer
|
||||
* len : audio data buffer length
|
||||
* ts : timestamp
|
||||
* puser : user parameter
|
||||
*/
|
||||
int http_flv_audio_callback(uint8 * pdata, int len, uint32 ts, void * puser)
|
||||
{
|
||||
CHttpFlvClient * p_httpflv = (CHttpFlvClient *) puser;
|
||||
|
||||
printf("%s, len = %d, ts = %u\r\n", __FUNCTION__, len, ts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc : http-flv video data callback
|
||||
*
|
||||
* @params :
|
||||
* pdata : video data buffer
|
||||
* len : video data buffer length
|
||||
* ts : timestamp
|
||||
* puser : user parameter
|
||||
*/
|
||||
int http_flv_video_callback(uint8 * pdata, int len, uint32 ts, void * puser)
|
||||
{
|
||||
CHttpFlvClient * p_httpflv = (CHttpFlvClient *) puser;
|
||||
|
||||
printf("%s, len = %d, ts = %u\r\n", __FUNCTION__, len, ts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void http_flv_setup(CHttpFlvClient * p_httpflv)
|
||||
{
|
||||
p_httpflv->set_notify_cb(http_flv_notify_callback, p_httpflv);
|
||||
p_httpflv->set_audio_cb(http_flv_audio_callback);
|
||||
p_httpflv->set_video_cb(http_flv_video_callback);
|
||||
}
|
||||
|
||||
void http_flv_reconn(CHttpFlvClient * p_httpflv)
|
||||
{
|
||||
char url[512], user[64], pass[64];
|
||||
|
||||
strcpy(url, p_httpflv->get_url());
|
||||
strcpy(user, p_httpflv->get_user());
|
||||
strcpy(pass, p_httpflv->get_pass());
|
||||
|
||||
printf("http_flv_reconn, url = %s, user = %s, pass = %s\r\n", url, user, pass);
|
||||
|
||||
p_httpflv->http_flv_close();
|
||||
|
||||
http_flv_setup(p_httpflv);
|
||||
|
||||
p_httpflv->http_flv_start(url, user, pass);
|
||||
}
|
||||
|
||||
void * http_flv_notify_handler(void * argv)
|
||||
{
|
||||
EVENT_PARAMS params;
|
||||
|
||||
while (g_flag)
|
||||
{
|
||||
if (hqBufGet(g_queue, (char *) ¶ms))
|
||||
{
|
||||
if (params.event == -1 || params.httpflv == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (HTTP_FLV_EVE_STOPPED == params.event ||
|
||||
HTTP_FLV_EVE_CONNFAIL == params.event ||
|
||||
HTTP_FLV_EVE_NOSIGNAL == params.event ||
|
||||
HTTP_FLV_EVE_NODATA == params.event)
|
||||
{
|
||||
http_flv_reconn(params.httpflv);
|
||||
|
||||
usleep(100*1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_tid = 0;
|
||||
|
||||
printf("%s exit\r\n", __FUNCTION__);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define HTTP_FLV_CLN_NUM 1
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
printf("usage: %s url {user} {pass}\r\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_init("httpflvtest.log");
|
||||
log_set_level(HT_LOG_DBG);
|
||||
|
||||
network_init();
|
||||
|
||||
// allocate system BUFFER and http message BUFFER
|
||||
sys_buf_init(HTTP_FLV_CLN_NUM * 4);
|
||||
http_msg_buf_init(HTTP_FLV_CLN_NUM * 4);
|
||||
|
||||
// create event queue
|
||||
g_queue = hqCreate(HTTP_FLV_CLN_NUM * 4, sizeof(EVENT_PARAMS), HQ_GET_WAIT | HQ_PUT_WAIT);
|
||||
if (NULL == g_queue)
|
||||
{
|
||||
printf("create queue failed\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// create event handler thread
|
||||
g_flag = 1;
|
||||
g_tid = sys_os_create_thread((void *)http_flv_notify_handler, NULL);
|
||||
if (g_tid == 0)
|
||||
{
|
||||
printf("create http flv notify handler thread failed\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
CHttpFlvClient * httpflv = new CHttpFlvClient[HTTP_FLV_CLN_NUM];
|
||||
|
||||
for (int i = 0; i < HTTP_FLV_CLN_NUM; i++)
|
||||
{
|
||||
http_flv_setup(&httpflv[i]);
|
||||
|
||||
char * p_user = NULL;
|
||||
char * p_pass = NULL;
|
||||
|
||||
if (argc >= 3)
|
||||
{
|
||||
p_user = argv[2];
|
||||
}
|
||||
|
||||
if (argc >= 4)
|
||||
{
|
||||
p_pass = argv[3];
|
||||
}
|
||||
|
||||
BOOL ret = httpflv[i].http_flv_start(argv[1], p_user, p_pass);
|
||||
|
||||
printf("http flv %d start ret = %d\r\n", i, ret);
|
||||
|
||||
usleep(100 * 1000);
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (getchar() == 'q')
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(1000*1000); // 1s
|
||||
}
|
||||
|
||||
for (int i = 0; i < HTTP_FLV_CLN_NUM; i++)
|
||||
{
|
||||
httpflv[i].http_flv_close();
|
||||
}
|
||||
|
||||
delete[] httpflv;
|
||||
|
||||
g_flag = 0;
|
||||
|
||||
EVENT_PARAMS params;
|
||||
|
||||
params.event = -1;
|
||||
params.httpflv = NULL;
|
||||
|
||||
hqBufPut(g_queue, (char *) ¶ms);
|
||||
|
||||
// waiting for event handler thread to exit
|
||||
while (g_tid)
|
||||
{
|
||||
usleep(10*1000);
|
||||
}
|
||||
|
||||
hqDelete(g_queue);
|
||||
g_queue = NULL;
|
||||
|
||||
// free memory resources
|
||||
http_msg_buf_deinit();
|
||||
sys_buf_deinit();
|
||||
|
||||
// close log
|
||||
log_close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
175
MediaClient/HttpFlvTest/HttpFlvTest.vcxproj
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{23D7CA2E-F808-4986-BFB4-F349355222E9}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RtmpTest</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x86;../MediaClient/zlib/lib/x86;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpFlvClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x64;../MediaClient/zlib/lib/x64;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpFlvClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x86;../MediaClient/zlib/lib/x86;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpFlvClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x64;../MediaClient/zlib/lib/x64;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpFlvClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="HttpFlvTest.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
25
MediaClient/HttpFlvTest/HttpFlvTest.vcxproj.filters
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="HttpFlvTest.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
59
MediaClient/HttpFlvTest/mac.mk
Normal file
@@ -0,0 +1,59 @@
|
||||
################OPTION###################
|
||||
OUTPUT = httpflvtest
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -g -o $(OUTPUT)
|
||||
INCLUDEDIR += -I../MediaClient
|
||||
INCLUDEDIR += -I../MediaClient/bm
|
||||
INCLUDEDIR += -I../MediaClient/librtmp
|
||||
INCLUDEDIR += -I../MediaClient/http
|
||||
INCLUDEDIR += -I../MediaClient/media
|
||||
INCLUDEDIR += -I../MediaClient/rtmp
|
||||
INCLUDEDIR += -I../MediaClient/rtp
|
||||
LIBDIRS += -L../MediaClient
|
||||
LIBDIRS += -L../MediaClient/ffmpeg/lib/linux
|
||||
LIBDIRS += -L../MediaClient/openssl/lib/linux
|
||||
LIBDIRS += -L../MediaClient/zlib/lib/linux
|
||||
OBJS = HttpFlvTest.o
|
||||
SHAREDLIB += -lhttpflvclient
|
||||
SHAREDLIB += -lcrypto
|
||||
SHAREDLIB += -lssl
|
||||
SHAREDLIB += -lz
|
||||
SHAREDLIB += -lpthread
|
||||
SHAREDLIB += -ldl
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
252
MediaClient/HttpMjpegTest/HttpMjpegTest.cpp
Normal file
@@ -0,0 +1,252 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "http_mjpeg_cln.h"
|
||||
#include "hqueue.h"
|
||||
#include "media_format.h"
|
||||
#include "http_parse.h"
|
||||
|
||||
/**********************************************************/
|
||||
HQUEUE * g_queue;
|
||||
|
||||
int g_flag = 0;
|
||||
pthread_t g_tid = 0;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int event;
|
||||
CHttpMjpeg * httpmjpeg;
|
||||
} EVENT_PARAMS;
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
/**
|
||||
* @desc : http-mjpeg notify callback
|
||||
*
|
||||
* @params :
|
||||
* event : event type
|
||||
* puser : user parameter
|
||||
*/
|
||||
int http_mjpeg_notify_callback(int event, void * puser)
|
||||
{
|
||||
printf("%s, event = %d\r\n", __FUNCTION__, event);
|
||||
|
||||
CHttpMjpeg * p_httpmjpeg = (CHttpMjpeg *) puser;
|
||||
|
||||
if (MJPEG_EVE_CONNSUCC == event)
|
||||
{
|
||||
printf("video codec is MJPEG\r\n");
|
||||
}
|
||||
|
||||
EVENT_PARAMS params;
|
||||
|
||||
params.event = event;
|
||||
params.httpmjpeg = p_httpmjpeg;
|
||||
|
||||
if (!hqBufPut(g_queue, (char *) ¶ms))
|
||||
{
|
||||
printf("hqBufPut failed\r\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc : http-mjpeg video data callback
|
||||
*
|
||||
* @params :
|
||||
* pdata : video data buffer
|
||||
* len : video data buffer length
|
||||
* ts : timestamp
|
||||
* puser : user parameter
|
||||
*/
|
||||
int http_mjpeg_video_callback(uint8 * pdata, int len, void * puser)
|
||||
{
|
||||
CHttpMjpeg * p_httpmjpeg = (CHttpMjpeg *) puser;
|
||||
|
||||
printf("%s, len = %d\r\n", __FUNCTION__, len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void http_mjpeg_setup(CHttpMjpeg * p_httpmjpeg)
|
||||
{
|
||||
p_httpmjpeg->set_notify_cb(http_mjpeg_notify_callback, p_httpmjpeg);
|
||||
p_httpmjpeg->set_video_cb(http_mjpeg_video_callback);
|
||||
}
|
||||
|
||||
void http_mjpeg_reconn(CHttpMjpeg * p_httpmjpeg)
|
||||
{
|
||||
char url[512], user[64], pass[64];
|
||||
|
||||
strcpy(url, p_httpmjpeg->get_url());
|
||||
strcpy(user, p_httpmjpeg->get_user());
|
||||
strcpy(pass, p_httpmjpeg->get_pass());
|
||||
|
||||
printf("http_mjpeg_reconn, url = %s, user = %s, pass = %s\r\n", url, user, pass);
|
||||
|
||||
p_httpmjpeg->mjpeg_close();
|
||||
|
||||
http_mjpeg_setup(p_httpmjpeg);
|
||||
|
||||
p_httpmjpeg->mjpeg_start(url, user, pass);
|
||||
}
|
||||
|
||||
void * http_mjpeg_notify_handler(void * argv)
|
||||
{
|
||||
EVENT_PARAMS params;
|
||||
|
||||
while (g_flag)
|
||||
{
|
||||
if (hqBufGet(g_queue, (char *) ¶ms))
|
||||
{
|
||||
if (params.event == -1 || params.httpmjpeg == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (MJPEG_EVE_STOPPED == params.event ||
|
||||
MJPEG_EVE_CONNFAIL == params.event ||
|
||||
MJPEG_EVE_NOSIGNAL == params.event ||
|
||||
MJPEG_EVE_NODATA == params.event)
|
||||
{
|
||||
http_mjpeg_reconn(params.httpmjpeg);
|
||||
|
||||
usleep(100*1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_tid = 0;
|
||||
|
||||
printf("%s exit\r\n", __FUNCTION__);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define HTTP_MJPEG_CLN_NUM 1
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
printf("usage: %s url {user} {pass}\r\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_init("httpmjpegtest.log");
|
||||
log_set_level(HT_LOG_DBG);
|
||||
|
||||
network_init();
|
||||
|
||||
// allocate system BUFFER and http message BUFFER
|
||||
sys_buf_init(HTTP_MJPEG_CLN_NUM * 4);
|
||||
http_msg_buf_init(HTTP_MJPEG_CLN_NUM * 4);
|
||||
|
||||
// create event queue
|
||||
g_queue = hqCreate(HTTP_MJPEG_CLN_NUM * 4, sizeof(EVENT_PARAMS), HQ_GET_WAIT | HQ_PUT_WAIT);
|
||||
if (NULL == g_queue)
|
||||
{
|
||||
printf("create queue failed\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// create event handler thread
|
||||
g_flag = 1;
|
||||
g_tid = sys_os_create_thread((void *)http_mjpeg_notify_handler, NULL);
|
||||
if (g_tid == 0)
|
||||
{
|
||||
printf("create http mjpeg notify handler thread failed\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
CHttpMjpeg * httpmjpeg = new CHttpMjpeg[HTTP_MJPEG_CLN_NUM];
|
||||
|
||||
for (int i = 0; i < HTTP_MJPEG_CLN_NUM; i++)
|
||||
{
|
||||
http_mjpeg_setup(&httpmjpeg[i]);
|
||||
|
||||
char * p_user = NULL;
|
||||
char * p_pass = NULL;
|
||||
|
||||
if (argc >= 3)
|
||||
{
|
||||
p_user = argv[2];
|
||||
}
|
||||
|
||||
if (argc >= 4)
|
||||
{
|
||||
p_pass = argv[3];
|
||||
}
|
||||
|
||||
BOOL ret = httpmjpeg[i].mjpeg_start(argv[1], p_user, p_pass);
|
||||
|
||||
printf("http mjpeg %d start ret = %d\r\n", i, ret);
|
||||
|
||||
usleep(100 * 1000);
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (getchar() == 'q')
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(1000*1000); // 1s
|
||||
}
|
||||
|
||||
for (int i = 0; i < HTTP_MJPEG_CLN_NUM; i++)
|
||||
{
|
||||
httpmjpeg[i].mjpeg_close();
|
||||
}
|
||||
|
||||
delete[] httpmjpeg;
|
||||
|
||||
g_flag = 0;
|
||||
|
||||
EVENT_PARAMS params;
|
||||
|
||||
params.event = -1;
|
||||
params.httpmjpeg = NULL;
|
||||
|
||||
hqBufPut(g_queue, (char *) ¶ms);
|
||||
|
||||
// waiting for event handler thread to exit
|
||||
while (g_tid)
|
||||
{
|
||||
usleep(10*1000);
|
||||
}
|
||||
|
||||
hqDelete(g_queue);
|
||||
g_queue = NULL;
|
||||
|
||||
// free memory resources
|
||||
http_msg_buf_deinit();
|
||||
sys_buf_deinit();
|
||||
|
||||
// close log
|
||||
log_close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
175
MediaClient/HttpMjpegTest/HttpMjpegTest.vcxproj
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E0552D9D-040B-4D00-AD37-6DC6E6942693}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RtmpTest</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x86;../MediaClient/zlib/lib/x86;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpMjpegClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x64;../MediaClient/zlib/lib/x64;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpMjpegClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x86;../MediaClient/zlib/lib/x86;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpMjpegClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\MediaClient;..\MediaClient\bm;..\MediaClient\http;..\MediaClient\rtp;..\MediaClient\rtmp;..\MediaClient\librtmp;..\MediaClient\media;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../MediaClient/openssl/lib/x64;../MediaClient/zlib/lib/x64;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;HttpMjpegClientLibrary.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="HttpMjpegTest.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
25
MediaClient/HttpMjpegTest/HttpMjpegTest.vcxproj.filters
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="HttpMjpegTest.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
55
MediaClient/HttpMjpegTest/mac.mk
Normal file
@@ -0,0 +1,55 @@
|
||||
################OPTION###################
|
||||
OUTPUT = httpmjpegtest
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -g -o $(OUTPUT)
|
||||
INCLUDEDIR += -I../MediaClient
|
||||
INCLUDEDIR += -I../MediaClient/bm
|
||||
INCLUDEDIR += -I../MediaClient/librtmp
|
||||
INCLUDEDIR += -I../MediaClient/http
|
||||
INCLUDEDIR += -I../MediaClient/media
|
||||
INCLUDEDIR += -I../MediaClient/rtmp
|
||||
INCLUDEDIR += -I../MediaClient/rtp
|
||||
LIBDIRS += -L../MediaClient
|
||||
LIBDIRS += -L../MediaClient/ffmpeg/lib/linux
|
||||
LIBDIRS += -L../MediaClient/openssl/lib/linux
|
||||
LIBDIRS += -L../MediaClient/zlib/lib/linux
|
||||
OBJS = HttpMjpegTest.o
|
||||
SHAREDLIB += -lhttpmjpegclient
|
||||
SHAREDLIB += -lpthread
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
144
MediaClient/MediaClient.sln
Normal file
@@ -0,0 +1,144 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.33801.447
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MediaClient", "MediaClient\MediaClient.vcxproj", "{6814DE1C-B652-4384-B27E-59B9F964B6BF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtspClientLibrary", "MediaClient\RtspClientLibrary.vcxproj", "{B50838F1-DCE1-4728-927E-EC591EB4A84E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtspTest", "RtspTest\RtspTest.vcxproj", "{79A3B043-27AD-491F-96D9-A4E0158ED10B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E} = {B50838F1-DCE1-4728-927E-EC591EB4A84E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtmpClientLibrary", "MediaClient\RtmpClientLibrary.vcxproj", "{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtmpTest", "RtmpTest\RtmpTest.vcxproj", "{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91} = {4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpFlvClientLibrary", "MediaClient\HttpFlvClientLibrary.vcxproj", "{71F6F67D-3FF2-4BA6-A871-E9704753F27D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpFlvTest", "HttpFlvTest\HttpFlvTest.vcxproj", "{23D7CA2E-F808-4986-BFB4-F349355222E9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D} = {71F6F67D-3FF2-4BA6-A871-E9704753F27D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SrtClientLibrary", "MediaClient\SrtClientLibrary.vcxproj", "{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SrtTest", "SrtTest\SrtTest.vcxproj", "{A2E369F0-71DD-4F38-B177-F66305199F56}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D} = {E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpMjpegClientLibrary", "MediaClient\HttpMjpegClientLibrary.vcxproj", "{A084CA49-A838-491A-8351-7AB117455480}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpMjpegTest", "HttpMjpegTest\HttpMjpegTest.vcxproj", "{E0552D9D-040B-4D00-AD37-6DC6E6942693}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A084CA49-A838-491A-8351-7AB117455480} = {A084CA49-A838-491A-8351-7AB117455480}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Debug|x64.Build.0 = Debug|x64
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Release|x64.Build.0 = Release|x64
|
||||
{6814DE1C-B652-4384-B27E-59B9F964B6BF}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Debug|x64.Build.0 = Debug|x64
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Release|x64.ActiveCfg = Release|x64
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Release|x64.Build.0 = Release|x64
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B50838F1-DCE1-4728-927E-EC591EB4A84E}.Release|x86.Build.0 = Release|Win32
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Debug|x64.Build.0 = Debug|x64
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Release|x64.ActiveCfg = Release|x64
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Release|x64.Build.0 = Release|x64
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{79A3B043-27AD-491F-96D9-A4E0158ED10B}.Release|x86.Build.0 = Release|Win32
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Debug|x64.Build.0 = Debug|x64
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Debug|x86.Build.0 = Debug|Win32
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Release|x64.ActiveCfg = Release|x64
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Release|x64.Build.0 = Release|x64
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Release|x86.ActiveCfg = Release|Win32
|
||||
{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}.Release|x86.Build.0 = Release|Win32
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Debug|x64.Build.0 = Debug|x64
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Debug|x86.Build.0 = Debug|Win32
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Release|x64.ActiveCfg = Release|x64
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Release|x64.Build.0 = Release|x64
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Release|x86.ActiveCfg = Release|Win32
|
||||
{DC1F6BE8-2532-4D71-A60C-4BAAEAA50F42}.Release|x86.Build.0 = Release|Win32
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Debug|x64.Build.0 = Debug|x64
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Release|x64.ActiveCfg = Release|x64
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Release|x64.Build.0 = Release|x64
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{71F6F67D-3FF2-4BA6-A871-E9704753F27D}.Release|x86.Build.0 = Release|Win32
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Debug|x64.Build.0 = Debug|x64
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Debug|x86.Build.0 = Debug|Win32
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Release|x64.ActiveCfg = Release|x64
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Release|x64.Build.0 = Release|x64
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Release|x86.ActiveCfg = Release|Win32
|
||||
{23D7CA2E-F808-4986-BFB4-F349355222E9}.Release|x86.Build.0 = Release|Win32
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Debug|x64.Build.0 = Debug|x64
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Release|x64.ActiveCfg = Release|x64
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Release|x64.Build.0 = Release|x64
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}.Release|x86.Build.0 = Release|Win32
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Debug|x64.Build.0 = Debug|x64
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Release|x64.ActiveCfg = Release|x64
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Release|x64.Build.0 = Release|x64
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A2E369F0-71DD-4F38-B177-F66305199F56}.Release|x86.Build.0 = Release|Win32
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Debug|x64.Build.0 = Debug|x64
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Release|x64.ActiveCfg = Release|x64
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Release|x64.Build.0 = Release|x64
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A084CA49-A838-491A-8351-7AB117455480}.Release|x86.Build.0 = Release|Win32
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Debug|x64.Build.0 = Debug|x64
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Release|x64.ActiveCfg = Release|x64
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Release|x64.Build.0 = Release|x64
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E0552D9D-040B-4D00-AD37-6DC6E6942693}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B5AEC723-6691-46AD-B17D-0404AAF7C113}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
84
MediaClient/MediaClient/HttpFlvClientLibrary-android.mk
Normal file
@@ -0,0 +1,84 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpflvclient.so
|
||||
NDK=/home/android-ndk-r25c
|
||||
API=33
|
||||
PLATFORM=armv7a
|
||||
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
ifneq ($(findstring armv7a, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-androideabi
|
||||
RANLIB=$(TOOLCHAIN)/arm-linux-androideabi-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
ifneq ($(findstring aarch64, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-android
|
||||
RANLIB=$(TOOLCHAIN)/$(TARGET)-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
CCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang
|
||||
CPPCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
COMPILEOPTION += -fPIC -DANDROID --sysroot=$(SYSROOT)
|
||||
COMPILEOPTION += -c -O3 -Wall
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_flv_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
77
MediaClient/MediaClient/HttpFlvClientLibrary-ios.mk
Normal file
@@ -0,0 +1,77 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpflvclient.so
|
||||
ARCH=arm64 #armv7, armv7s arm64
|
||||
IOSVER=9.0
|
||||
BASE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
||||
CCOMPILE = $(BASE)/clang
|
||||
CPPCOMPILE = $(BASE)/clang++
|
||||
COMPILEOPTION += -c -pipe -g -arch $(ARCH)
|
||||
COMPILEOPTION += -Xarch_$(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -isysroot$(SYSROOT)
|
||||
COMPILEOPTION += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = $(BASE)/ar
|
||||
LINKOPTION += -stdlib=libc++ -arch $(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -Wl,-syslibroot,$(SYSROOT) -Wl,-rpath,@executable_path/../Frameworks
|
||||
LINKOPTION = -r $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_flv_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
70
MediaClient/MediaClient/HttpFlvClientLibrary-mac.mk
Normal file
@@ -0,0 +1,70 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpflvclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_flv_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
69
MediaClient/MediaClient/HttpFlvClientLibrary-static.mk
Normal file
@@ -0,0 +1,69 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpflvclient.a
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION = -c -O3 -fPIC -Wall
|
||||
LINK = ar
|
||||
LINKOPTION = cr $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_flv_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
70
MediaClient/MediaClient/HttpFlvClientLibrary.mk
Normal file
@@ -0,0 +1,70 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpflvclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION = -c -O3 -fPIC -Wall
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_flv_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
./mklinks.sh
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
178
MediaClient/MediaClient/HttpFlvClientLibrary.vcxproj
Normal file
@@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{71F6F67D-3FF2-4BA6-A871-E9704753F27D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RtmpClientLibrary</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sha256.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="http\http_cln.cpp" />
|
||||
<ClCompile Include="http\http_flv_cln.cpp" />
|
||||
<ClCompile Include="http\http_parse.cpp" />
|
||||
<ClCompile Include="librtmp\amf.c" />
|
||||
<ClCompile Include="librtmp\log.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
73
MediaClient/MediaClient/HttpFlvClientLibrary.vcxproj.filters
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{f3e33128-2d95-4289-aa78-ee61da2270c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_flv_cln.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_parse.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_cln.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\amf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha256.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
80
MediaClient/MediaClient/HttpMjpegClientLibrary-android.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpmjpegclient.so
|
||||
NDK=/home/android-ndk-r25c
|
||||
API=33
|
||||
PLATFORM=armv7a
|
||||
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
ifneq ($(findstring armv7a, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-androideabi
|
||||
RANLIB=$(TOOLCHAIN)/arm-linux-androideabi-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
ifneq ($(findstring aarch64, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-android
|
||||
RANLIB=$(TOOLCHAIN)/$(TARGET)-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
CCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang
|
||||
CPPCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
COMPILEOPTION += -fPIC -DANDROID --sysroot=$(SYSROOT)
|
||||
COMPILEOPTION += -c -O3 -Wall
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_mjpeg_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
73
MediaClient/MediaClient/HttpMjpegClientLibrary-ios.mk
Normal file
@@ -0,0 +1,73 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpmjpegclient.so
|
||||
ARCH=arm64 #armv7, armv7s arm64
|
||||
IOSVER=9.0
|
||||
BASE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
||||
CCOMPILE = $(BASE)/clang
|
||||
CPPCOMPILE = $(BASE)/clang++
|
||||
COMPILEOPTION += -c -pipe -g -arch $(ARCH)
|
||||
COMPILEOPTION += -Xarch_$(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -isysroot$(SYSROOT)
|
||||
COMPILEOPTION += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = $(BASE)/ar
|
||||
LINKOPTION += -stdlib=libc++ -arch $(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -Wl,-syslibroot,$(SYSROOT) -Wl,-rpath,@executable_path/../Frameworks
|
||||
LINKOPTION = -r $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_mjpeg_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
66
MediaClient/MediaClient/HttpMjpegClientLibrary-mac.mk
Normal file
@@ -0,0 +1,66 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpmjpegclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_mjpeg_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
65
MediaClient/MediaClient/HttpMjpegClientLibrary-static.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpmjpegclient.a
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION = -c -O3 -fPIC -Wall
|
||||
LINK = ar
|
||||
LINKOPTION = cr $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_mjpeg_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
66
MediaClient/MediaClient/HttpMjpegClientLibrary.mk
Normal file
@@ -0,0 +1,66 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libhttpmjpegclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION = -c -O3 -fPIC -Wall
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_mjpeg_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
./mklinks.sh
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
176
MediaClient/MediaClient/HttpMjpegClientLibrary.vcxproj
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A084CA49-A838-491A-8351-7AB117455480}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RtmpClientLibrary</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sha256.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="http\http_cln.cpp" />
|
||||
<ClCompile Include="http\http_mjpeg_cln.cpp" />
|
||||
<ClCompile Include="http\http_parse.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{f3e33128-2d95-4289-aa78-ee61da2270c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_parse.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_cln.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha256.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_mjpeg_cln.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
277
MediaClient/MediaClient/MediaClient.css
Normal file
@@ -0,0 +1,277 @@
|
||||
|
||||
QMenuBar
|
||||
{
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 lightgray, stop:1 darkgray);
|
||||
}
|
||||
|
||||
QMenuBar::item
|
||||
{
|
||||
spacing: 8px;
|
||||
padding: 4px 10px;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected
|
||||
{
|
||||
background: rgb(40, 101, 168);
|
||||
}
|
||||
|
||||
QMenu
|
||||
{
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
QMenu::item
|
||||
{
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
padding: 4px 24px 4px 4px;
|
||||
border: 0px solid transparent;
|
||||
border-left-width: 24px;
|
||||
background: rgb(80, 80, 80);
|
||||
border-left-color: rgb(100,100,100);
|
||||
}
|
||||
|
||||
QMenu::icon
|
||||
{
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
QMenu::item:selected:!disabled
|
||||
{
|
||||
background: rgb(40, 101, 168);
|
||||
border-left-color: rgb(40, 101, 168);
|
||||
}
|
||||
|
||||
QMenu::separator
|
||||
{
|
||||
height: 2px;
|
||||
background: lightblue;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
border-left-width: 24px;
|
||||
}
|
||||
|
||||
QMenu::indicator
|
||||
{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
QListView::item
|
||||
{
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
QListView::item:selected
|
||||
{
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ABAFE5, stop: 1 #8588B2);
|
||||
}
|
||||
|
||||
QSlider::groove:horizontal
|
||||
{
|
||||
height: 5px;
|
||||
background: rgb(18,46,84);
|
||||
}
|
||||
|
||||
QSlider#sliderPlay::groove:horizontal, QSlider#sliderVolume::groove:horizontal
|
||||
{
|
||||
height: 5px;
|
||||
background: rgb(18,46,84);
|
||||
}
|
||||
|
||||
QSlider#sliderPlay::sub-page:horizontal, QSlider#sliderVolume::sub-page:horizontal
|
||||
{
|
||||
background: rgb(58,92,168);
|
||||
}
|
||||
|
||||
QSlider::handle:horizontal
|
||||
{
|
||||
background: rgb(165,229,254);
|
||||
border: 4px solid #5c5c5c;
|
||||
width: 8px;
|
||||
height: 16px;
|
||||
margin: -2px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QSlider#sliderPlay::handle:horizontal, QSlider#sliderVolume::handle:horizontal
|
||||
{
|
||||
background: rgb(165,229,254);
|
||||
border: 1px solid #5c5c5c;
|
||||
width: 14px;
|
||||
margin: -2px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QTabWidget::pane
|
||||
{
|
||||
border-top: 2px solid #C2C7CB;
|
||||
border-bottom: 2px solid #C2C7CB;
|
||||
}
|
||||
|
||||
QTabBar::tab
|
||||
{
|
||||
background-color: rgb(192,192,192);
|
||||
border: 2px solid #C4C4C3;
|
||||
border-bottom-color: #C2C7CB;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
min-width: 10ex;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected
|
||||
{
|
||||
background-color: rgb(64,64,64);
|
||||
}
|
||||
|
||||
QTabBar::tab:!selected
|
||||
{
|
||||
background-color: rgb(32,32,32);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
QTabBar::tab:hover
|
||||
{
|
||||
background-color: rgb(100,100,100);
|
||||
}
|
||||
|
||||
QTabBar::tab:disabled
|
||||
{
|
||||
background-color: gray;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
QHeaderView
|
||||
{
|
||||
min-height:25px;
|
||||
}
|
||||
|
||||
QTableView QHeaderView::section
|
||||
{
|
||||
background-color:rgb(64,64,64);
|
||||
border: 2px solid #6c6c6c;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section
|
||||
{
|
||||
background: rgb(64,64,64);
|
||||
border: 2px outset rgb(64,64,64);
|
||||
}
|
||||
|
||||
QPushButton
|
||||
{
|
||||
background-color: black;
|
||||
border-color: rgb(100,100,100);
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #123456, stop: 1 #f6f7fa);
|
||||
border-style: inset;
|
||||
}
|
||||
|
||||
QToolButton
|
||||
{
|
||||
border: 2px solid #8f8f91;
|
||||
border-radius: 6px;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);
|
||||
}
|
||||
|
||||
QToolButton[popupMode="1"]
|
||||
{
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
QToolButton:pressed, QToolButton:hover
|
||||
{
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #123456, stop: 1 #f6f7fa);
|
||||
}
|
||||
|
||||
QToolButton::menu-button
|
||||
{
|
||||
border: 2px solid gray;
|
||||
border-top-right-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
QToolButton::menu-arrow:open
|
||||
{
|
||||
top: 1px; left: 1px;
|
||||
}
|
||||
|
||||
QToolTip
|
||||
{
|
||||
border: 2px solid darkkhaki;
|
||||
padding: 1px;
|
||||
border-radius: 3px;
|
||||
opacity: 200;
|
||||
color: white;
|
||||
background-color: #2E3648;
|
||||
}
|
||||
|
||||
QTreeView
|
||||
{
|
||||
show-decoration-selected: 1;
|
||||
}
|
||||
|
||||
QTreeView::item
|
||||
{
|
||||
height: 20;
|
||||
border: 0px solid #d9d9d9;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
QTreeView::item:hover
|
||||
{
|
||||
background: rgb(40, 101, 168);
|
||||
border: 1px solid #bfcde4;
|
||||
}
|
||||
|
||||
QTreeView::item:selected
|
||||
{
|
||||
border: 1px solid #567dbc;
|
||||
}
|
||||
|
||||
QTreeView::item:selected:active
|
||||
{
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
|
||||
}
|
||||
|
||||
QTreeView::item:selected:!active
|
||||
{
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf);
|
||||
}
|
||||
|
||||
QTreeView QHeaderView::section
|
||||
{
|
||||
background-color:rgb(64,64,64);
|
||||
border: 1px solid #6c6c6c;
|
||||
min-height: 18px;
|
||||
}
|
||||
|
||||
QWidget
|
||||
{
|
||||
/*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);*/
|
||||
background-color: rgb(64,64,64);
|
||||
color: white; /* font color */
|
||||
}
|
||||
|
||||
QLineEdit
|
||||
{
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color:rgb(128,128,128);
|
||||
}
|
||||
|
||||
* { gridline-color: gray }
|
||||
|
||||
|
||||
|
||||
BIN
MediaClient/MediaClient/MediaClient.ico
Normal file
|
After Width: | Height: | Size: 20 KiB |
244
MediaClient/MediaClient/MediaClient.pro
Normal file
@@ -0,0 +1,244 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2021-04-016T09:50:05
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia widgets
|
||||
|
||||
CONFIG += c++11
|
||||
macx:CONFIG += sdk_no_version_check
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = MediaClient
|
||||
|
||||
DEFINES += HTTPS
|
||||
DEFINES += BACKCHANNEL
|
||||
DEFINES += REPLAY
|
||||
DEFINES += OVER_HTTP
|
||||
DEFINES += OVER_WEBSOCKET
|
||||
|
||||
unix {
|
||||
macx {
|
||||
DEFINES += IOS
|
||||
}
|
||||
else {
|
||||
DEFINES += EPOLL
|
||||
}
|
||||
}
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
INCLUDEPATH += bm
|
||||
INCLUDEPATH += formClass
|
||||
INCLUDEPATH += http
|
||||
INCLUDEPATH += librtmp
|
||||
INCLUDEPATH += media
|
||||
INCLUDEPATH += rtmp
|
||||
INCLUDEPATH += rtp
|
||||
INCLUDEPATH += rtsp
|
||||
INCLUDEPATH += srt
|
||||
INCLUDEPATH += ui
|
||||
|
||||
unix {
|
||||
macx {
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
else {
|
||||
INCLUDEPATH += ffmpeg/include
|
||||
INCLUDEPATH += libsrt/include
|
||||
INCLUDEPATH += openssl/include
|
||||
INCLUDEPATH += sdl/include
|
||||
INCLUDEPATH += zlib/include
|
||||
}
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
bm/base64.cpp \
|
||||
bm/hqueue.cpp \
|
||||
bm/linked_list.cpp \
|
||||
bm/ppstack.cpp \
|
||||
bm/rfc_md5.cpp \
|
||||
bm/sha256.cpp \
|
||||
bm/sys_buf.cpp \
|
||||
bm/sys_log.cpp \
|
||||
bm/sys_os.cpp \
|
||||
bm/util.cpp \
|
||||
bm/word_analyse.cpp \
|
||||
formClass/CustomLayoutWidget.cpp \
|
||||
formClass/DialogTitle.cpp \
|
||||
formClass/FloatWidget.cpp \
|
||||
formClass/MediaClient.cpp \
|
||||
formClass/MediaInfo.cpp \
|
||||
formClass/OpenMedia.cpp \
|
||||
formClass/SystemSetting.cpp \
|
||||
formClass/UMSlider.cpp \
|
||||
formClass/VideoSubWidget.cpp \
|
||||
formClass/VideoWidget.cpp \
|
||||
formClass/WidgetManager.cpp \
|
||||
formClass/ZoneConfig.cpp \
|
||||
http/http_cln.cpp \
|
||||
http/http_flv_cln.cpp \
|
||||
http/http_mjpeg_cln.cpp \
|
||||
http/http_parse.cpp \
|
||||
http/http_test.cpp \
|
||||
librtmp/amf.c \
|
||||
librtmp/hashswf.c \
|
||||
librtmp/log.c \
|
||||
librtmp/parseurl.c \
|
||||
librtmp/rtmp.c \
|
||||
media/audio_capture.cpp \
|
||||
media/audio_decoder.cpp \
|
||||
media/audio_encoder.cpp \
|
||||
media/audio_play.cpp \
|
||||
media/avcodec_mutex.cpp \
|
||||
media/avi_write.cpp \
|
||||
media/file_player.cpp \
|
||||
media/http_flv_player.cpp \
|
||||
media/http_mjpeg_player.cpp \
|
||||
media/media_codec.cpp \
|
||||
media/media_parse.cpp \
|
||||
media/media_util.cpp \
|
||||
media/rtmp_player.cpp \
|
||||
media/rtsp_player.cpp \
|
||||
media/srt_player.cpp \
|
||||
media/video_decoder.cpp \
|
||||
media/video_render.cpp \
|
||||
media/video_render_sdl.cpp \
|
||||
rtmp/rtmp_cln.cpp \
|
||||
rtp/aac_rtp_rx.cpp \
|
||||
rtp/h264_rtp_rx.cpp \
|
||||
rtp/h264_util.cpp \
|
||||
rtp/h265_rtp_rx.cpp \
|
||||
rtp/h265_util.cpp \
|
||||
rtp/mjpeg_rtp_rx.cpp \
|
||||
rtp/mjpeg_tables.cpp \
|
||||
rtp/mpeg4.cpp \
|
||||
rtp/mpeg4_rtp_rx.cpp \
|
||||
rtp/pcm_rtp_rx.cpp \
|
||||
rtp/rtp.cpp \
|
||||
rtp/rtp_rx.cpp \
|
||||
rtp/ts_parser.cpp \
|
||||
rtsp/rtsp_backchannel.cpp \
|
||||
rtsp/rtsp_cln.cpp \
|
||||
rtsp/rtsp_parse.cpp \
|
||||
rtsp/rtsp_rcua.cpp \
|
||||
rtsp/rtsp_util.cpp \
|
||||
rtsp/rtsp_ws.cpp \
|
||||
srt/srt_cln.cpp \
|
||||
main.cpp \
|
||||
utils.cpp \
|
||||
|
||||
unix {
|
||||
macx {
|
||||
SOURCES += \
|
||||
media/audio_capture_mac.cpp \
|
||||
media/audio_capture_avf.mm \
|
||||
media/audio_play_mac.cpp \
|
||||
media/audio_play_avf.mm \
|
||||
media/video_player.mm \
|
||||
}
|
||||
else {
|
||||
SOURCES += \
|
||||
media/alsa.cpp \
|
||||
media/audio_capture_linux.cpp \
|
||||
media/audio_play_qt.cpp \
|
||||
media/video_player.cpp \
|
||||
}
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
formClass/CustomLayoutWidget.h \
|
||||
formClass/DialogTitle.h \
|
||||
formClass/FloatWidget.h \
|
||||
formClass/MediaClient.h \
|
||||
formClass/MediaInfo.h \
|
||||
formClass/OpenMedia.h \
|
||||
formClass/SystemSetting.h \
|
||||
formClass/UMSlider.h \
|
||||
formClass/VideoSubWidget.h \
|
||||
formClass/VideoWidget.h \
|
||||
formClass/WidgetManager.h \
|
||||
formClass/ZoneConfig.h \
|
||||
media/file_player.h \
|
||||
media/http_flv_player.h \
|
||||
media/http_mjpeg_player.h \
|
||||
media/rtmp_player.h \
|
||||
media/rtsp_player.h \
|
||||
media/srt_player.h \
|
||||
media/video_player.h \
|
||||
|
||||
unix {
|
||||
macx {
|
||||
}
|
||||
else {
|
||||
HEADERS += \
|
||||
media/audio_play_qt.h \
|
||||
}
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
ui/CustomLayoutWidget.ui \
|
||||
ui/FloatWidget.ui \
|
||||
ui/MediaClient.ui \
|
||||
ui/MediaInfo.ui \
|
||||
ui/OpenMedia.ui \
|
||||
ui/SystemSetting.ui \
|
||||
ui/VideoWidget.ui \
|
||||
|
||||
unix {
|
||||
macx {
|
||||
LIBS += -L/usr/local/lib
|
||||
LIBS += -lavformat
|
||||
LIBS += -lswscale
|
||||
LIBS += -lavcodec
|
||||
LIBS += -lswresample
|
||||
LIBS += -lavutil
|
||||
LIBS += -lopus
|
||||
LIBS += -lx264
|
||||
LIBS += -lx265
|
||||
LIBS += -lsrt
|
||||
LIBS += -lcrypto
|
||||
LIBS += -lssl
|
||||
LIBS += -lz
|
||||
LIBS += -lSDL2
|
||||
LIBS += -framework AudioToolbox
|
||||
LIBS += -framework AVFoundation
|
||||
LIBS += -framework CoreAudio
|
||||
LIBS += -framework CoreFoundation
|
||||
LIBS += -framework CoreMedia
|
||||
LIBS += -framework Foundation
|
||||
}
|
||||
else {
|
||||
LIBS += -L$$PWD/ffmpeg/lib/linux
|
||||
LIBS += -L$$PWD/libsrt/lib/linux
|
||||
LIBS += -L$$PWD/openssl/lib/linux
|
||||
LIBS += -L$$PWD/zlib/lib/linux
|
||||
LIBS += -L$$PWD/sdl/lib/linux
|
||||
LIBS += -lavformat
|
||||
LIBS += -lswscale
|
||||
LIBS += -lavcodec
|
||||
LIBS += -lswresample
|
||||
LIBS += -lavutil
|
||||
LIBS += -lopus
|
||||
LIBS += -lx264
|
||||
LIBS += -lx265
|
||||
LIBS += -lsrt
|
||||
LIBS += -lcrypto
|
||||
LIBS += -lssl
|
||||
LIBS += -lz
|
||||
LIBS += -lSDL2
|
||||
LIBS += -lasound
|
||||
}
|
||||
}
|
||||
|
||||
RESOURCES += MediaClient.qrc
|
||||
|
||||
TRANSLATIONS += mediaclient_zh.ts
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
31
MediaClient/MediaClient/MediaClient.qrc
Normal file
@@ -0,0 +1,31 @@
|
||||
<RCC>
|
||||
<qresource prefix="/res">
|
||||
<file>Resources/help.png</file>
|
||||
<file>Resources/1.png</file>
|
||||
<file>Resources/4.png</file>
|
||||
<file>Resources/6.png</file>
|
||||
<file>Resources/9.png</file>
|
||||
<file>Resources/16.png</file>
|
||||
<file>Resources/custom.png</file>
|
||||
<file>Resources/full.png</file>
|
||||
<file>Resources/stopall.png</file>
|
||||
<file>Resources/btn_close.png</file>
|
||||
<file>Resources/btn_max.png</file>
|
||||
<file>Resources/btn_max_hot.png</file>
|
||||
<file>Resources/btn_min.png</file>
|
||||
<file>Resources/main.png</file>
|
||||
<file>Resources/btn_pause.png</file>
|
||||
<file>Resources/btn_play.png</file>
|
||||
<file>Resources/btn_stop.png</file>
|
||||
<file>Resources/mic.png</file>
|
||||
<file>Resources/mute.png</file>
|
||||
<file>Resources/snapshot.png</file>
|
||||
<file>Resources/stop_record.png</file>
|
||||
<file>Resources/video_record.png</file>
|
||||
<file>Resources/volume.png</file>
|
||||
<file>Resources/stopmic.png</file>
|
||||
<file>Resources/config.png</file>
|
||||
<file>Resources/browse_folder.png</file>
|
||||
<file>Resources/open_folder.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
2
MediaClient/MediaClient/MediaClient.rc
Normal file
@@ -0,0 +1,2 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "MediaClient.ico"
|
||||
|
||||
390
MediaClient/MediaClient/MediaClient.vcxproj
Normal file
@@ -0,0 +1,390 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6814DE1C-B652-4384-B27E-59B9F964B6BF}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
|
||||
<QtInstall>msvc2017</QtInstall>
|
||||
<QtModules>core;gui;widgets;winextras</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>6.5.1_msvc2019_64</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
||||
<QtInstall>msvc2017</QtInstall>
|
||||
<QtModules>core;gui;widgets;winextras</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||
<QtInstall>6.5.1_msvc2019_64</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\rtsp;.\http;.\media;.\rtmp;.\librtmp;.\srt;.\formClass;.\libsrt\include;.\ffmpeg\include;.\directx\include;.\openssl\include;.\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4819;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>HT_STATIC;HTTPS;ZLIB_WINAPI;BACKCHANNEL;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>.\directx\lib\x86;.\ffmpeg\lib\x86;.\openssl\lib\x86;.\zlib\lib\x86;.\libsrt\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;d3d9.lib;d3dx9.lib;libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;srt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<QtTranslation>
|
||||
<BuildAction>lupdate</BuildAction>
|
||||
</QtTranslation>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\rtsp;.\http;.\media;.\rtmp;.\librtmp;.\srt;.\formClass;.\libsrt\include;.\ffmpeg\include;.\directx\include;.\openssl\include;.\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4819;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>HT_STATIC;HTTPS;ZLIB_WINAPI;BACKCHANNEL;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>.\directx\lib\x64;.\ffmpeg\lib\x64;.\openssl\lib\x64;.\zlib\lib\x64;.\libsrt\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;d3d9.lib;d3dx9.lib;libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;srt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<QtTranslation>
|
||||
<BuildAction>lupdate</BuildAction>
|
||||
</QtTranslation>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;d3d9.lib;d3dx9.lib;libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;srt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\directx\lib\x86;.\ffmpeg\lib\x86;.\openssl\lib\x86;.\zlib\lib\x86;.\libsrt\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\rtsp;.\http;.\media;.\rtmp;.\librtmp;.\srt;.\formClass;.\libsrt\include;.\ffmpeg\include;.\directx\include;.\openssl\include;.\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HT_STATIC;HTTPS;ZLIB_WINAPI;BACKCHANNEL;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4819;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<QtTranslation>
|
||||
<BuildAction>false</BuildAction>
|
||||
</QtTranslation>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;d3d9.lib;d3dx9.lib;libcrypto.lib;libssl.lib;zlibwapi.lib;winmm.lib;srt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\directx\lib\x64;.\ffmpeg\lib\x64;.\openssl\lib\x64;.\zlib\lib\x64;.\libsrt\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\rtsp;.\http;.\media;.\rtmp;.\librtmp;.\srt;.\formClass;.\libsrt\include;.\ffmpeg\include;.\directx\include;.\openssl\include;.\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HT_STATIC;HTTPS;ZLIB_WINAPI;BACKCHANNEL;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4819;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<QtTranslation>
|
||||
<BuildAction>lupdate</BuildAction>
|
||||
</QtTranslation>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sha1.cpp" />
|
||||
<ClCompile Include="bm\sha256.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="formClass\CustomLayoutWidget.cpp" />
|
||||
<ClCompile Include="formClass\DialogTitle.cpp" />
|
||||
<ClCompile Include="formClass\FloatWidget.cpp" />
|
||||
<ClCompile Include="formClass\MediaInfo.cpp" />
|
||||
<ClCompile Include="formClass\OpenMedia.cpp" />
|
||||
<ClCompile Include="formClass\SystemSetting.cpp" />
|
||||
<ClCompile Include="formClass\UMSlider.cpp" />
|
||||
<ClCompile Include="formClass\VideoSubWidget.cpp" />
|
||||
<ClCompile Include="formClass\VideoWidget.cpp" />
|
||||
<ClCompile Include="formClass\WidgetManager.cpp" />
|
||||
<ClCompile Include="formClass\ZoneConfig.cpp" />
|
||||
<ClCompile Include="http\http_cln.cpp" />
|
||||
<ClCompile Include="http\http_flv_cln.cpp" />
|
||||
<ClCompile Include="http\http_mjpeg_cln.cpp" />
|
||||
<ClCompile Include="http\http_parse.cpp" />
|
||||
<ClCompile Include="http\http_test.cpp" />
|
||||
<ClCompile Include="librtmp\amf.c" />
|
||||
<ClCompile Include="librtmp\hashswf.c" />
|
||||
<ClCompile Include="librtmp\log.c" />
|
||||
<ClCompile Include="librtmp\parseurl.c" />
|
||||
<ClCompile Include="librtmp\rtmp.c" />
|
||||
<ClCompile Include="media\audio_capture.cpp" />
|
||||
<ClCompile Include="media\audio_capture_win.cpp" />
|
||||
<ClCompile Include="media\audio_decoder.cpp" />
|
||||
<ClCompile Include="media\audio_encoder.cpp" />
|
||||
<ClCompile Include="media\audio_play.cpp" />
|
||||
<ClCompile Include="media\audio_play_win.cpp" />
|
||||
<ClCompile Include="media\avcodec_mutex.cpp" />
|
||||
<ClCompile Include="media\avi_write.cpp" />
|
||||
<ClCompile Include="media\file_player.cpp" />
|
||||
<ClCompile Include="media\http_flv_player.cpp" />
|
||||
<ClCompile Include="media\http_mjpeg_player.cpp" />
|
||||
<ClCompile Include="media\media_codec.cpp" />
|
||||
<ClCompile Include="media\media_parse.cpp" />
|
||||
<ClCompile Include="media\media_util.cpp" />
|
||||
<ClCompile Include="media\rtmp_player.cpp" />
|
||||
<ClCompile Include="media\rtsp_player.cpp" />
|
||||
<ClCompile Include="media\srt_player.cpp" />
|
||||
<ClCompile Include="media\video_decoder.cpp" />
|
||||
<ClCompile Include="media\video_player.cpp" />
|
||||
<ClCompile Include="media\video_render.cpp" />
|
||||
<ClCompile Include="media\video_render_d3d.cpp" />
|
||||
<ClCompile Include="media\video_render_gdi.cpp" />
|
||||
<ClCompile Include="rtmp\rtmp_cln.cpp" />
|
||||
<ClCompile Include="rtp\aac_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\h264_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\h264_util.cpp" />
|
||||
<ClCompile Include="rtp\h265_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\h265_util.cpp" />
|
||||
<ClCompile Include="rtp\mjpeg_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\mjpeg_tables.cpp" />
|
||||
<ClCompile Include="rtp\mpeg4.cpp" />
|
||||
<ClCompile Include="rtp\mpeg4_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\pcm_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\rtp.cpp" />
|
||||
<ClCompile Include="rtp\rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\ts_parser.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_backchannel.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_cln.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_parse.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_rcua.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_util.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_ws.cpp" />
|
||||
<ClCompile Include="srt\srt_cln.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utils.cpp" />
|
||||
<QtRcc Include="MediaClient.qrc" />
|
||||
<ClCompile Include="formClass\MediaClient.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="formClass\MediaClient.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="ui\CustomLayoutWidget.ui" />
|
||||
<QtUic Include="ui\FloatWidget.ui" />
|
||||
<QtUic Include="ui\MediaClient.ui" />
|
||||
<QtUic Include="ui\MediaInfo.ui" />
|
||||
<QtUic Include="ui\OpenMedia.ui" />
|
||||
<QtUic Include="ui\SystemSetting.ui" />
|
||||
<QtUic Include="ui\VideoWidget.ui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h" />
|
||||
<ClInclude Include="bm\hqueue.h" />
|
||||
<ClInclude Include="bm\linked_list.h" />
|
||||
<ClInclude Include="bm\ppstack.h" />
|
||||
<ClInclude Include="bm\rfc_md5.h" />
|
||||
<ClInclude Include="bm\sha1.h" />
|
||||
<ClInclude Include="bm\sys_buf.h" />
|
||||
<ClInclude Include="bm\sys_inc.h" />
|
||||
<ClInclude Include="bm\sys_log.h" />
|
||||
<ClInclude Include="bm\util.h" />
|
||||
<ClInclude Include="bm\word_analyse.h" />
|
||||
<QtMoc Include="formClass\OpenMedia.h" />
|
||||
<QtMoc Include="formClass\MediaInfo.h" />
|
||||
<ClInclude Include="http\http.h" />
|
||||
<ClInclude Include="http\http_cln.h" />
|
||||
<ClInclude Include="http\http_parse.h" />
|
||||
<ClInclude Include="librtmp\amf.h" />
|
||||
<ClInclude Include="librtmp\bytes.h" />
|
||||
<ClInclude Include="librtmp\dh.h" />
|
||||
<ClInclude Include="librtmp\dhgroups.h" />
|
||||
<ClInclude Include="librtmp\handshake.h" />
|
||||
<ClInclude Include="librtmp\http.h" />
|
||||
<ClInclude Include="librtmp\log.h" />
|
||||
<ClInclude Include="librtmp\rtmp.h" />
|
||||
<ClInclude Include="librtmp\rtmp_sys.h" />
|
||||
<ClInclude Include="media\audio_capture.h" />
|
||||
<ClInclude Include="media\audio_decoder.h" />
|
||||
<ClInclude Include="media\audio_encoder.h" />
|
||||
<ClInclude Include="media\audio_play.h" />
|
||||
<ClInclude Include="media\avcodec_mutex.h" />
|
||||
<QtMoc Include="media\file_player.h" />
|
||||
<QtMoc Include="media\http_flv_player.h" />
|
||||
<QtMoc Include="media\http_mjpeg_player.h" />
|
||||
<ClInclude Include="media\media_codec.h" />
|
||||
<QtMoc Include="media\rtmp_player.h" />
|
||||
<QtMoc Include="media\srt_player.h" />
|
||||
<ClInclude Include="media\video_decoder.h" />
|
||||
<ClInclude Include="media\video_render.h" />
|
||||
<ClInclude Include="media\video_render_d3d.h" />
|
||||
<ClInclude Include="media\video_render_gdi.h" />
|
||||
<ClInclude Include="rtmp\rtmp_cln.h" />
|
||||
<ClInclude Include="rtsp\rtsp_backchannel.h" />
|
||||
<ClInclude Include="rtsp\rtsp_cln.h" />
|
||||
<ClInclude Include="rtsp\rtsp_parse.h" />
|
||||
<ClInclude Include="rtsp\rtsp_rcua.h" />
|
||||
<ClInclude Include="rtsp\rtsp_util.h" />
|
||||
<QtMoc Include="media\video_player.h" />
|
||||
<ClInclude Include="rtp\aac_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\h265_util.h" />
|
||||
<QtMoc Include="media\rtsp_player.h" />
|
||||
<QtMoc Include="formClass\ZoneConfig.h" />
|
||||
<QtMoc Include="formClass\WidgetManager.h" />
|
||||
<QtMoc Include="formClass\VideoWidget.h" />
|
||||
<QtMoc Include="formClass\VideoSubWidget.h" />
|
||||
<QtMoc Include="formClass\UMSlider.h" />
|
||||
<QtMoc Include="formClass\SystemSetting.h" />
|
||||
<QtMoc Include="formClass\FloatWidget.h" />
|
||||
<QtMoc Include="formClass\DialogTitle.h" />
|
||||
<QtMoc Include="formClass\CustomLayoutWidget.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="MediaClient.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtTranslation Include="mediaclient_zh.ts" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
516
MediaClient/MediaClient/MediaClient.vcxproj.filters
Normal file
@@ -0,0 +1,516 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="formClass">
|
||||
<UniqueIdentifier>{f9efb1b7-44e1-465c-a185-398493b71a75}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{f4059e3a-5bfc-4ed0-9dcc-c48fbf2fe657}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="media">
|
||||
<UniqueIdentifier>{17cf4518-ba24-472b-a927-a12116d8a1c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtp">
|
||||
<UniqueIdentifier>{99d8fe9c-bb92-40fd-816a-6db62f0bbb29}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtsp">
|
||||
<UniqueIdentifier>{8e528862-850e-458a-ac31-84b0f3ff2a9e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="http">
|
||||
<UniqueIdentifier>{13c7c9b7-c60f-4cbe-89a4-5a4e8ecb67e7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtmp">
|
||||
<UniqueIdentifier>{b8a8f0a1-bd04-4666-960d-d25d257a62a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="librtmp">
|
||||
<UniqueIdentifier>{debd2512-967d-4028-a2d9-d02d3debf1de}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="srt">
|
||||
<UniqueIdentifier>{9edf4b63-c6cf-4a94-8814-85d37816af01}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="MediaClient.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</QtRcc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\MediaClient.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha1.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\CustomLayoutWidget.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\DialogTitle.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\FloatWidget.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\SystemSetting.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\UMSlider.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\VideoSubWidget.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\VideoWidget.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\WidgetManager.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\ZoneConfig.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\rtsp_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\avi_write.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\media_parse.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\media_util.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\aac_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h264_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h264_util.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h265_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h265_util.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mjpeg_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mjpeg_tables.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mpeg4.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mpeg4_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\pcm_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\video_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_backchannel.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_cln.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_parse.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_rcua.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_util.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_decoder.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\video_decoder.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\video_render.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\video_render_d3d.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\video_render_gdi.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\media_codec.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\avcodec_mutex.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_play.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_cln.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_parse.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\OpenMedia.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\amf.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\hashswf.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\log.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\parseurl.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\rtmp.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtmp\rtmp_cln.cpp">
|
||||
<Filter>rtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\rtmp_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_capture.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_encoder.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\file_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\rtp.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_flv_cln.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\http_flv_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_test.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formClass\MediaInfo.cpp">
|
||||
<Filter>formClass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_capture_win.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\audio_play_win.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="srt\srt_cln.cpp">
|
||||
<Filter>srt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\ts_parser.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\srt_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_ws.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha256.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\http_mjpeg_player.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_mjpeg_cln.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="formClass\MediaClient.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\CustomLayoutWidget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\DialogTitle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\FloatWidget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\SystemSetting.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\UMSlider.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\VideoSubWidget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\VideoWidget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\WidgetManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\ZoneConfig.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\rtsp_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\video_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\OpenMedia.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\rtmp_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\file_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\http_flv_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formClass\MediaInfo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\srt_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="media\http_mjpeg_player.h">
|
||||
<Filter>media</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="ui\CustomLayoutWidget.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\FloatWidget.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\SystemSetting.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\VideoWidget.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\MediaClient.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\OpenMedia.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ui\MediaInfo.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\hqueue.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\linked_list.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\ppstack.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\rfc_md5.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sha1.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_buf.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_inc.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_log.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\util.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\word_analyse.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\aac_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\h265_util.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_backchannel.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_cln.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_parse.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_rcua.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_util.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\audio_decoder.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\video_decoder.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\video_render.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\video_render_d3d.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\video_render_gdi.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\media_codec.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\avcodec_mutex.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\audio_play.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http_cln.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http_parse.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\amf.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\bytes.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\dh.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\dhgroups.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\handshake.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\http.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\log.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\rtmp.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="librtmp\rtmp_sys.h">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtmp\rtmp_cln.h">
|
||||
<Filter>rtmp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\audio_capture.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="media\audio_encoder.h">
|
||||
<Filter>media</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="MediaClient.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtTranslation Include="mediaclient_zh.ts">
|
||||
<Filter>Translation Files</Filter>
|
||||
</QtTranslation>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
BIN
MediaClient/MediaClient/Resources/1.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
MediaClient/MediaClient/Resources/16.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
MediaClient/MediaClient/Resources/4.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
MediaClient/MediaClient/Resources/6.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
MediaClient/MediaClient/Resources/9.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
MediaClient/MediaClient/Resources/browse_folder.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
MediaClient/MediaClient/Resources/btn_close.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
MediaClient/MediaClient/Resources/btn_max.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
MediaClient/MediaClient/Resources/btn_max_hot.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
MediaClient/MediaClient/Resources/btn_min.png
Normal file
|
After Width: | Height: | Size: 176 B |
BIN
MediaClient/MediaClient/Resources/btn_pause.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
MediaClient/MediaClient/Resources/btn_play.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
MediaClient/MediaClient/Resources/btn_stop.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
MediaClient/MediaClient/Resources/config.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
MediaClient/MediaClient/Resources/custom.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
MediaClient/MediaClient/Resources/full.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
MediaClient/MediaClient/Resources/help.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
MediaClient/MediaClient/Resources/main.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
MediaClient/MediaClient/Resources/mic.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
MediaClient/MediaClient/Resources/mute.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
MediaClient/MediaClient/Resources/open_folder.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
MediaClient/MediaClient/Resources/snapshot.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
MediaClient/MediaClient/Resources/stop_record.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
MediaClient/MediaClient/Resources/stopall.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
MediaClient/MediaClient/Resources/stopmic.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
MediaClient/MediaClient/Resources/video_record.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
MediaClient/MediaClient/Resources/volume.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
79
MediaClient/MediaClient/RtmpClientLibrary-android.mk
Normal file
@@ -0,0 +1,79 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtmpclient.so
|
||||
NDK=/home/android-ndk-r25c
|
||||
API=33
|
||||
PLATFORM=armv7a
|
||||
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
ifneq ($(findstring armv7a, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-androideabi
|
||||
RANLIB=$(TOOLCHAIN)/arm-linux-androideabi-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
ifneq ($(findstring aarch64, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-android
|
||||
RANLIB=$(TOOLCHAIN)/$(TARGET)-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
CCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang
|
||||
CPPCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
COMPILEOPTION += -fPIC -DANDROID --sysroot=$(SYSROOT)
|
||||
COMPILEOPTION += -c -O3 -Wall
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/hashswf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += librtmp/parseurl.o
|
||||
OBJS += librtmp/rtmp.o
|
||||
OBJS += rtmp/rtmp_cln.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
72
MediaClient/MediaClient/RtmpClientLibrary-ios.mk
Normal file
@@ -0,0 +1,72 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtmpclient.so
|
||||
ARCH=arm64 #armv7, armv7s arm64
|
||||
IOSVER=9.0
|
||||
BASE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
||||
CCOMPILE = $(BASE)/clang
|
||||
CPPCOMPILE = $(BASE)/clang++
|
||||
COMPILEOPTION += -c -pipe -g -arch $(ARCH)
|
||||
COMPILEOPTION += -Xarch_$(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -isysroot$(SYSROOT)
|
||||
COMPILEOPTION += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = $(BASE)/ar
|
||||
LINKOPTION += -stdlib=libc++ -arch $(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -Wl,-syslibroot,$(SYSROOT) -Wl,-rpath,@executable_path/../Frameworks
|
||||
LINKOPTION = -r $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/hashswf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += librtmp/parseurl.o
|
||||
OBJS += librtmp/rtmp.o
|
||||
OBJS += rtmp/rtmp_cln.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
67
MediaClient/MediaClient/RtmpClientLibrary-mac.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtmpclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I/usr/local/include
|
||||
LIBDIRS += -L/usr/local/lib
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/hashswf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += librtmp/parseurl.o
|
||||
OBJS += librtmp/rtmp.o
|
||||
OBJS += rtmp/rtmp_cln.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB += -lcrypto
|
||||
SHAREDLIB += -lssl
|
||||
SHAREDLIB += -lz
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
64
MediaClient/MediaClient/RtmpClientLibrary-static.mk
Normal file
@@ -0,0 +1,64 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtmpclient.a
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
LINK = ar
|
||||
LINKOPTION = cr $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/hashswf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += librtmp/parseurl.o
|
||||
OBJS += librtmp/rtmp.o
|
||||
OBJS += rtmp/rtmp_cln.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
65
MediaClient/MediaClient/RtmpClientLibrary.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtmpclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./librtmp
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtmp
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS +=
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += librtmp/amf.o
|
||||
OBJS += librtmp/hashswf.o
|
||||
OBJS += librtmp/log.o
|
||||
OBJS += librtmp/parseurl.o
|
||||
OBJS += librtmp/rtmp.o
|
||||
OBJS += rtmp/rtmp_cln.o
|
||||
OBJS += rtp/h264_util.o
|
||||
OBJS += rtp/h265_util.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
./mklinks.sh
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
181
MediaClient/MediaClient/RtmpClientLibrary.vcxproj
Normal file
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4C15B47A-6C99-4D48-AF7D-5566E0CCDD91}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RtmpClientLibrary</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;HT_STATIC;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>.;./bm;./media;./rtp;./librtmp;./rtmp;./openssl/include;./zlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="librtmp\amf.c" />
|
||||
<ClCompile Include="librtmp\hashswf.c" />
|
||||
<ClCompile Include="librtmp\log.c" />
|
||||
<ClCompile Include="librtmp\parseurl.c" />
|
||||
<ClCompile Include="librtmp\rtmp.c" />
|
||||
<ClCompile Include="rtmp\rtmp_cln.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="rtmp\rtmp_cln.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
84
MediaClient/MediaClient/RtmpClientLibrary.vcxproj.filters
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="librtmp">
|
||||
<UniqueIdentifier>{303d1179-4c4e-4a8a-a343-9d6ff1c7b5a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtmp">
|
||||
<UniqueIdentifier>{8fb30d92-8832-4917-a41a-adcabf591201}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{f3e33128-2d95-4289-aa78-ee61da2270c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="rtmp\rtmp_cln.cpp">
|
||||
<Filter>rtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\amf.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\hashswf.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\log.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\parseurl.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="librtmp\rtmp.c">
|
||||
<Filter>librtmp</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="rtmp\rtmp_cln.h">
|
||||
<Filter>rtmp</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
114
MediaClient/MediaClient/RtspClientLibrary-android.mk
Normal file
@@ -0,0 +1,114 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtspclient.so
|
||||
NDK=/home/android-ndk-r25c
|
||||
API=33
|
||||
PLATFORM=armv7a
|
||||
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
ifneq ($(findstring armv7a, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-androideabi
|
||||
RANLIB=$(TOOLCHAIN)/arm-linux-androideabi-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
ifneq ($(findstring aarch64, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-android
|
||||
RANLIB=$(TOOLCHAIN)/$(TARGET)-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
CCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang
|
||||
CPPCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
COMPILEOPTION += -fPIC -DANDROID --sysroot=$(SYSROOT)
|
||||
COMPILEOPTION += -c -O3 -Wall
|
||||
COMPILEOPTION += -DEPOLL
|
||||
COMPILEOPTION += -DMETADATA
|
||||
COMPILEOPTION += -DREPLAY
|
||||
COMPILEOPTION += -DOVER_HTTP
|
||||
COMPILEOPTION += -DOVER_WEBSOCKET
|
||||
#COMPILEOPTION += -DHTTPS
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./rtsp
|
||||
INCLUDEDIR += -I./ffmpeg/include
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += rtp/aac_rtp_rx.o
|
||||
OBJS += rtp/h264_rtp_rx.o
|
||||
OBJS += rtp/h265_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_tables.o
|
||||
OBJS += rtp/mpeg4.o
|
||||
OBJS += rtp/mpeg4_rtp_rx.o
|
||||
OBJS += rtp/pcm_rtp_rx.o
|
||||
OBJS += rtp/rtp.o
|
||||
OBJS += rtp/rtp_rx.o
|
||||
OBJS += rtsp/rtsp_cln.o
|
||||
OBJS += rtsp/rtsp_parse.o
|
||||
OBJS += rtsp/rtsp_rcua.o
|
||||
OBJS += rtsp/rtsp_util.o
|
||||
|
||||
ifneq ($(findstring OVER_WEBSOCKET, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_ws.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring BACKCHANNEL, $(COMPILEOPTION)),)
|
||||
OBJS += media/alsa.o
|
||||
OBJS += media/audio_capture.o
|
||||
OBJS += media/audio_capture_linux.o
|
||||
OBJS += media/audio_encoder.o
|
||||
OBJS += media/avcodec_mutex.o
|
||||
OBJS += media/media_codec.o
|
||||
OBJS += rtsp/rtsp_backchannel.o
|
||||
endif
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
100
MediaClient/MediaClient/RtspClientLibrary-ios.mk
Normal file
@@ -0,0 +1,100 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtspclient.a
|
||||
ARCH=arm64 #armv7, armv7s arm64
|
||||
IOSVER=9.0
|
||||
BASE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
||||
CCOMPILE = $(BASE)/clang
|
||||
CPPCOMPILE = $(BASE)/clang++
|
||||
COMPILEOPTION += -c -pipe -g -arch $(ARCH)
|
||||
COMPILEOPTION += -Xarch_$(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -isysroot$(SYSROOT)
|
||||
COMPILEOPTION += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
COMPILEOPTION += -DMETADATA
|
||||
COMPILEOPTION += -DREPLAY
|
||||
COMPILEOPTION += -DOVER_HTTP
|
||||
COMPILEOPTION += -DOVER_WEBSOCKET
|
||||
#COMPILEOPTION += -DHTTPS
|
||||
LINK = $(BASE)/ar
|
||||
LINKOPTION += -stdlib=libc++ -arch $(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -Wl,-syslibroot,$(SYSROOT) -Wl,-rpath,@executable_path/../Frameworks
|
||||
LINKOPTION = -r $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./rtsp
|
||||
INCLUDEDIR += -I./ffmpeg/include
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += rtp/aac_rtp_rx.o
|
||||
OBJS += rtp/h264_rtp_rx.o
|
||||
OBJS += rtp/h265_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_tables.o
|
||||
OBJS += rtp/mpeg4.o
|
||||
OBJS += rtp/mpeg4_rtp_rx.o
|
||||
OBJS += rtp/pcm_rtp_rx.o
|
||||
OBJS += rtp/rtp.o
|
||||
OBJS += rtp/rtp_rx.o
|
||||
OBJS += rtsp/rtsp_cln.o
|
||||
OBJS += rtsp/rtsp_parse.o
|
||||
OBJS += rtsp/rtsp_rcua.o
|
||||
OBJS += rtsp/rtsp_util.o
|
||||
|
||||
ifneq ($(findstring OVER_WEBSOCKET, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_ws.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring BACKCHANNEL, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_backchannel.o
|
||||
endif
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
93
MediaClient/MediaClient/RtspClientLibrary-mac.mk
Normal file
@@ -0,0 +1,93 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtspclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
COMPILEOPTION += -DMETADATA
|
||||
COMPILEOPTION += -DREPLAY
|
||||
COMPILEOPTION += -DOVER_HTTP
|
||||
COMPILEOPTION += -DOVER_WEBSOCKET
|
||||
#COMPILEOPTION += -DHTTPS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./rtsp
|
||||
INCLUDEDIR += -I./ffmpeg/include
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += rtp/aac_rtp_rx.o
|
||||
OBJS += rtp/h264_rtp_rx.o
|
||||
OBJS += rtp/h265_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_tables.o
|
||||
OBJS += rtp/mpeg4.o
|
||||
OBJS += rtp/mpeg4_rtp_rx.o
|
||||
OBJS += rtp/pcm_rtp_rx.o
|
||||
OBJS += rtp/rtp.o
|
||||
OBJS += rtp/rtp_rx.o
|
||||
OBJS += rtsp/rtsp_cln.o
|
||||
OBJS += rtsp/rtsp_parse.o
|
||||
OBJS += rtsp/rtsp_rcua.o
|
||||
OBJS += rtsp/rtsp_util.o
|
||||
|
||||
ifneq ($(findstring OVER_WEBSOCKET, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_ws.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring BACKCHANNEL, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_backchannel.o
|
||||
endif
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
99
MediaClient/MediaClient/RtspClientLibrary-static.mk
Normal file
@@ -0,0 +1,99 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtspclient.a
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DEPOLL
|
||||
COMPILEOPTION += -DMETADATA
|
||||
COMPILEOPTION += -DREPLAY
|
||||
COMPILEOPTION += -DOVER_HTTP
|
||||
COMPILEOPTION += -DOVER_WEBSOCKET
|
||||
#COMPILEOPTION += -DHTTPS
|
||||
LINK = ar
|
||||
LINKOPTION = cr $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./rtsp
|
||||
INCLUDEDIR += -I./ffmpeg/include
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += rtp/aac_rtp_rx.o
|
||||
OBJS += rtp/h264_rtp_rx.o
|
||||
OBJS += rtp/h265_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_tables.o
|
||||
OBJS += rtp/mpeg4.o
|
||||
OBJS += rtp/mpeg4_rtp_rx.o
|
||||
OBJS += rtp/pcm_rtp_rx.o
|
||||
OBJS += rtp/rtp.o
|
||||
OBJS += rtp/rtp_rx.o
|
||||
OBJS += rtsp/rtsp_cln.o
|
||||
OBJS += rtsp/rtsp_parse.o
|
||||
OBJS += rtsp/rtsp_rcua.o
|
||||
OBJS += rtsp/rtsp_util.o
|
||||
|
||||
ifneq ($(findstring OVER_WEBSOCKET, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_ws.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring BACKCHANNEL, $(COMPILEOPTION)),)
|
||||
OBJS += media/alsa.o
|
||||
OBJS += media/audio_capture.o
|
||||
OBJS += media/audio_capture_linux.o
|
||||
OBJS += media/audio_encoder.o
|
||||
OBJS += media/avcodec_mutex.o
|
||||
OBJS += media/media_codec.o
|
||||
OBJS += rtsp/rtsp_backchannel.o
|
||||
endif
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
99
MediaClient/MediaClient/RtspClientLibrary.mk
Normal file
@@ -0,0 +1,99 @@
|
||||
################OPTION###################
|
||||
OUTPUT = librtspclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DEPOLL
|
||||
COMPILEOPTION += -DMETADATA
|
||||
COMPILEOPTION += -DREPLAY
|
||||
COMPILEOPTION += -DOVER_HTTP
|
||||
COMPILEOPTION += -DOVER_WEBSOCKET
|
||||
#COMPILEOPTION += -DHTTPS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./http
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./rtsp
|
||||
INCLUDEDIR += -I./ffmpeg/include
|
||||
INCLUDEDIR += -I./openssl/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sha256.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += http/http_cln.o
|
||||
OBJS += http/http_parse.o
|
||||
OBJS += rtp/aac_rtp_rx.o
|
||||
OBJS += rtp/h264_rtp_rx.o
|
||||
OBJS += rtp/h265_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_rtp_rx.o
|
||||
OBJS += rtp/mjpeg_tables.o
|
||||
OBJS += rtp/mpeg4.o
|
||||
OBJS += rtp/mpeg4_rtp_rx.o
|
||||
OBJS += rtp/pcm_rtp_rx.o
|
||||
OBJS += rtp/rtp.o
|
||||
OBJS += rtp/rtp_rx.o
|
||||
OBJS += rtsp/rtsp_cln.o
|
||||
OBJS += rtsp/rtsp_parse.o
|
||||
OBJS += rtsp/rtsp_rcua.o
|
||||
OBJS += rtsp/rtsp_util.o
|
||||
|
||||
ifneq ($(findstring OVER_WEBSOCKET, $(COMPILEOPTION)),)
|
||||
OBJS += rtsp/rtsp_ws.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring BACKCHANNEL, $(COMPILEOPTION)),)
|
||||
OBJS += media/alsa.o
|
||||
OBJS += media/audio_capture.o
|
||||
OBJS += media/audio_capture_linux.o
|
||||
OBJS += media/audio_encoder.o
|
||||
OBJS += media/avcodec_mutex.o
|
||||
OBJS += media/media_codec.o
|
||||
OBJS += rtsp/rtsp_backchannel.o
|
||||
endif
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
240
MediaClient/MediaClient/RtspClientLibrary.vcxproj
Normal file
@@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B50838F1-DCE1-4728-927E-EC591EB4A84E}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>rtspclient</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;METADATA;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\http;.\rtp;.\rtsp;.\media;.\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;METADATA;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\http;.\rtp;.\rtsp;.\media;.\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;METADATA;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\http;.\rtp;.\rtsp;.\media;.\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;METADATA;REPLAY;OVER_HTTP;OVER_WEBSOCKET;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\http;.\rtp;.\rtsp;.\media;.\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sha1.cpp" />
|
||||
<ClCompile Include="bm\sha256.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="http\http_cln.cpp" />
|
||||
<ClCompile Include="http\http_parse.cpp" />
|
||||
<ClCompile Include="rtp\aac_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\h264_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\h265_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\mjpeg_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\mjpeg_tables.cpp" />
|
||||
<ClCompile Include="rtp\mpeg4.cpp" />
|
||||
<ClCompile Include="rtp\mpeg4_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\pcm_rtp_rx.cpp" />
|
||||
<ClCompile Include="rtp\rtp.cpp" />
|
||||
<ClCompile Include="rtp\rtp_rx.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_backchannel.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_cln.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_parse.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_rcua.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_util.cpp" />
|
||||
<ClCompile Include="rtsp\rtsp_ws.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h" />
|
||||
<ClInclude Include="bm\hqueue.h" />
|
||||
<ClInclude Include="bm\linked_list.h" />
|
||||
<ClInclude Include="bm\ppstack.h" />
|
||||
<ClInclude Include="bm\rfc_md5.h" />
|
||||
<ClInclude Include="bm\sha1.h" />
|
||||
<ClInclude Include="bm\sys_buf.h" />
|
||||
<ClInclude Include="bm\sys_inc.h" />
|
||||
<ClInclude Include="bm\sys_log.h" />
|
||||
<ClInclude Include="bm\util.h" />
|
||||
<ClInclude Include="bm\word_analyse.h" />
|
||||
<ClInclude Include="http\http.h" />
|
||||
<ClInclude Include="http\http_cln.h" />
|
||||
<ClInclude Include="http\http_parse.h" />
|
||||
<ClInclude Include="rtp\aac_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\h264.h" />
|
||||
<ClInclude Include="rtp\h264_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\h265.h" />
|
||||
<ClInclude Include="rtp\h265_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\mjpeg.h" />
|
||||
<ClInclude Include="rtp\mjpeg_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\mjpeg_tables.h" />
|
||||
<ClInclude Include="rtp\mpeg4.h" />
|
||||
<ClInclude Include="rtp\mpeg4_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\pcm_rtp_rx.h" />
|
||||
<ClInclude Include="rtp\rtp.h" />
|
||||
<ClInclude Include="rtp\rtp_rx.h" />
|
||||
<ClInclude Include="rtsp\media_format.h" />
|
||||
<ClInclude Include="rtsp\rtsp_backchannel.h" />
|
||||
<ClInclude Include="rtsp\rtsp_cln.h" />
|
||||
<ClInclude Include="rtsp\rtsp_parse.h" />
|
||||
<ClInclude Include="rtsp\rtsp_rcua.h" />
|
||||
<ClInclude Include="rtsp\rtsp_util.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
210
MediaClient/MediaClient/RtspClientLibrary.vcxproj.filters
Normal file
@@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha1.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_backchannel.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_cln.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_parse.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_rcua.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_util.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\aac_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h264_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\h265_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mjpeg_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mjpeg_tables.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mpeg4.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\mpeg4_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\pcm_rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\rtp_rx.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_cln.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="http\http_parse.cpp">
|
||||
<Filter>http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\rtp.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtsp\rtsp_ws.cpp">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha256.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{8e8dae7f-b02d-4adc-9b0a-e29361fe1fc2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtp">
|
||||
<UniqueIdentifier>{89022a3a-a8b6-4b71-8626-84f6fcb9f97b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtsp">
|
||||
<UniqueIdentifier>{fa2d64eb-f945-4bc6-90b9-ef0083884aaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="http">
|
||||
<UniqueIdentifier>{07f2e07e-9bd9-4aa8-adf9-92e26935530e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\hqueue.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\linked_list.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\ppstack.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\rfc_md5.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sha1.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_buf.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_inc.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_log.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\util.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\word_analyse.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\media_format.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_backchannel.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_cln.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_parse.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_rcua.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtsp\rtsp_util.h">
|
||||
<Filter>rtsp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\aac_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\h264.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\h264_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\h265.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\h265_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\mjpeg.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\mjpeg_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\mjpeg_tables.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\mpeg4.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\mpeg4_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\pcm_rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\rtp.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rtp\rtp_rx.h">
|
||||
<Filter>rtp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http_cln.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="http\http_parse.h">
|
||||
<Filter>http</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
78
MediaClient/MediaClient/SrtClientLibrary-android.mk
Normal file
@@ -0,0 +1,78 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libsrtclient.so
|
||||
NDK=/home/android-ndk-r25c
|
||||
API=33
|
||||
PLATFORM=armv7a
|
||||
TOOLCHAIN=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
SYSROOT=$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
||||
ifneq ($(findstring armv7a, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-androideabi
|
||||
RANLIB=$(TOOLCHAIN)/arm-linux-androideabi-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
ifneq ($(findstring aarch64, $(PLATFORM)),)
|
||||
TARGET=$(PLATFORM)-linux-android
|
||||
RANLIB=$(TOOLCHAIN)/$(TARGET)-ranlib
|
||||
LINK = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
endif
|
||||
CCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang
|
||||
CPPCOMPILE = $(TOOLCHAIN)/$(TARGET)$(API)-clang++
|
||||
COMPILEOPTION += -fPIC -DANDROID --sysroot=$(SYSROOT)
|
||||
COMPILEOPTION += -c -O3 -Wall
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./srt
|
||||
INCLUDEDIR += -I./libsrt/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += media/media_util.o
|
||||
OBJS += rtp/ts_parser.o
|
||||
OBJS += srt/srt_cln.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
71
MediaClient/MediaClient/SrtClientLibrary-ios.mk
Normal file
@@ -0,0 +1,71 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libsrtclient.a
|
||||
ARCH=arm64 #armv7, armv7s arm64
|
||||
IOSVER=9.0
|
||||
BASE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
||||
CCOMPILE = $(BASE)/clang
|
||||
CPPCOMPILE = $(BASE)/clang++
|
||||
COMPILEOPTION += -c -pipe -g -arch $(ARCH)
|
||||
COMPILEOPTION += -Xarch_$(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -isysroot$(SYSROOT)
|
||||
COMPILEOPTION += -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = $(BASE)/ar
|
||||
LINKOPTION += -stdlib=libc++ -arch $(ARCH) -miphoneos-version-min=$(IOSVER) -Xarch_$(ARCH) -Wl,-syslibroot,$(SYSROOT) -Wl,-rpath,@executable_path/../Frameworks
|
||||
LINKOPTION = -r $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./srt
|
||||
INCLUDEDIR += -I./libsrt/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += media/media_util.o
|
||||
OBJS += rtp/ts_parser.o
|
||||
OBJS += srt/srt_cln.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
64
MediaClient/MediaClient/SrtClientLibrary-mac.mk
Normal file
@@ -0,0 +1,64 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libsrtclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
COMPILEOPTION += -DIOS
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./srt
|
||||
INCLUDEDIR += -I./libsrt/include
|
||||
LIBDIRS = -L/usr/local/lib
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += media/media_util.o
|
||||
OBJS += rtp/ts_parser.o
|
||||
OBJS += srt/srt_cln.o
|
||||
|
||||
SHAREDLIB += -lsrt
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
64
MediaClient/MediaClient/SrtClientLibrary-static.mk
Normal file
@@ -0,0 +1,64 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libsrtclient.a
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
LINK = ar
|
||||
LINKOPTION = cr $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./srt
|
||||
INCLUDEDIR += -I./libsrt/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += media/media_util.o
|
||||
OBJS += rtp/ts_parser.o
|
||||
OBJS += srt/srt_cln.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
./mklinks.sh
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
64
MediaClient/MediaClient/SrtClientLibrary.mk
Normal file
@@ -0,0 +1,64 @@
|
||||
################OPTION###################
|
||||
OUTPUT = libsrtclient.so
|
||||
CCOMPILE = gcc
|
||||
CPPCOMPILE = g++
|
||||
COMPILEOPTION += -c -O3 -fPIC -Wall
|
||||
LINK = g++
|
||||
LINKOPTION = -shared -o $(OUTPUT)
|
||||
INCLUDEDIR += -I.
|
||||
INCLUDEDIR += -I./bm
|
||||
INCLUDEDIR += -I./media
|
||||
INCLUDEDIR += -I./rtp
|
||||
INCLUDEDIR += -I./srt
|
||||
INCLUDEDIR += -I./libsrt/include
|
||||
LIBDIRS =
|
||||
OBJS += bm/base64.o
|
||||
OBJS += bm/hqueue.o
|
||||
OBJS += bm/linked_list.o
|
||||
OBJS += bm/ppstack.o
|
||||
OBJS += bm/rfc_md5.o
|
||||
OBJS += bm/sys_buf.o
|
||||
OBJS += bm/sys_log.o
|
||||
OBJS += bm/sys_os.o
|
||||
OBJS += bm/util.o
|
||||
OBJS += bm/word_analyse.o
|
||||
OBJS += media/media_util.o
|
||||
OBJS += rtp/ts_parser.o
|
||||
OBJS += srt/srt_cln.o
|
||||
|
||||
SHAREDLIB +=
|
||||
|
||||
APPENDLIB =
|
||||
|
||||
################OPTION END################
|
||||
|
||||
$(OUTPUT):$(OBJS) $(APPENDLIB)
|
||||
./mklinks.sh
|
||||
$(LINK) $(LINKOPTION) $(LIBDIRS) $(OBJS) $(SHAREDLIB) $(APPENDLIB)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f $(OUTPUT)
|
||||
all: clean $(OUTPUT)
|
||||
.PRECIOUS:%.cpp %.cc %.cxx %.c %.m %.mm
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .cc .cxx .c .m .mm .o
|
||||
|
||||
.cpp.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cpp
|
||||
|
||||
.cc.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cc
|
||||
|
||||
.cxx.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.cxx
|
||||
|
||||
.c.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.c
|
||||
|
||||
.m.o:
|
||||
$(CCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.m
|
||||
|
||||
.mm.o:
|
||||
$(CPPCOMPILE) -c -o $*.o $(COMPILEOPTION) $(INCLUDEDIR) $*.mm
|
||||
|
||||
202
MediaClient/MediaClient/SrtClientLibrary.vcxproj
Normal file
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E2643523-9ABC-4B3A-8710-BD9EB8E44A5D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>srtclient</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\srt;.\media;.\libsrt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\srt;.\media;.\libsrt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4267;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\srt;.\media;.\libsrt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;HT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\;.\bm;.\rtp;.\srt;.\media;.\libsrt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp" />
|
||||
<ClCompile Include="bm\hqueue.cpp" />
|
||||
<ClCompile Include="bm\linked_list.cpp" />
|
||||
<ClCompile Include="bm\ppstack.cpp" />
|
||||
<ClCompile Include="bm\rfc_md5.cpp" />
|
||||
<ClCompile Include="bm\sha1.cpp" />
|
||||
<ClCompile Include="bm\sys_buf.cpp" />
|
||||
<ClCompile Include="bm\sys_log.cpp" />
|
||||
<ClCompile Include="bm\sys_os.cpp" />
|
||||
<ClCompile Include="bm\util.cpp" />
|
||||
<ClCompile Include="bm\word_analyse.cpp" />
|
||||
<ClCompile Include="media\media_util.cpp" />
|
||||
<ClCompile Include="rtp\ts_parser.cpp" />
|
||||
<ClCompile Include="srt\srt_cln.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h" />
|
||||
<ClInclude Include="bm\hqueue.h" />
|
||||
<ClInclude Include="bm\linked_list.h" />
|
||||
<ClInclude Include="bm\ppstack.h" />
|
||||
<ClInclude Include="bm\rfc_md5.h" />
|
||||
<ClInclude Include="bm\sha1.h" />
|
||||
<ClInclude Include="bm\sys_buf.h" />
|
||||
<ClInclude Include="bm\sys_inc.h" />
|
||||
<ClInclude Include="bm\sys_log.h" />
|
||||
<ClInclude Include="bm\util.h" />
|
||||
<ClInclude Include="bm\word_analyse.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
96
MediaClient/MediaClient/SrtClientLibrary.vcxproj.filters
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bm\base64.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\hqueue.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\linked_list.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\ppstack.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\rfc_md5.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sha1.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_buf.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_log.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\sys_os.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\util.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bm\word_analyse.cpp">
|
||||
<Filter>bm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rtp\ts_parser.cpp">
|
||||
<Filter>rtp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="srt\srt_cln.cpp">
|
||||
<Filter>srt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="media\media_util.cpp">
|
||||
<Filter>media</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="bm">
|
||||
<UniqueIdentifier>{8e8dae7f-b02d-4adc-9b0a-e29361fe1fc2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="rtp">
|
||||
<UniqueIdentifier>{89022a3a-a8b6-4b71-8626-84f6fcb9f97b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="srt">
|
||||
<UniqueIdentifier>{bbeab1c5-1c77-4d15-bf46-a29278851420}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="media">
|
||||
<UniqueIdentifier>{59d290fe-3c75-4b4b-b2ed-0d76c97dd8b0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bm\base64.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\hqueue.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\linked_list.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\ppstack.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\rfc_md5.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sha1.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_buf.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_inc.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\sys_log.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\util.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bm\word_analyse.h">
|
||||
<Filter>bm</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
181
MediaClient/MediaClient/bm/base64.cpp
Normal file
@@ -0,0 +1,181 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "base64.h"
|
||||
|
||||
|
||||
const char *BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
void base64_encode_triple(uint8 triple[3], char result[4])
|
||||
{
|
||||
int tripleValue, i;
|
||||
|
||||
tripleValue = triple[0];
|
||||
tripleValue *= 256;
|
||||
tripleValue += triple[1];
|
||||
tripleValue *= 256;
|
||||
tripleValue += triple[2];
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
result[3-i] = BASE64_CHARS[tripleValue % 64];
|
||||
tripleValue /= 64;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* encode an array of bytes using Base64 (RFC 3548)
|
||||
*
|
||||
* @param source the source buffer
|
||||
* @param sourcelen the length of the source buffer
|
||||
* @param target the target buffer
|
||||
* @param targetlen the length of the target buffer
|
||||
* @return 1 on success, 0 otherwise
|
||||
*/
|
||||
HT_API int base64_encode(uint8 *source, uint32 sourcelen, char *target, uint32 targetlen)
|
||||
{
|
||||
/* check if the result will fit in the target buffer */
|
||||
if ((sourcelen+2)/3*4 > targetlen-1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* encode all full triples */
|
||||
while (sourcelen >= 3)
|
||||
{
|
||||
base64_encode_triple(source, target);
|
||||
sourcelen -= 3;
|
||||
source += 3;
|
||||
target += 4;
|
||||
}
|
||||
|
||||
/* encode the last one or two characters */
|
||||
if (sourcelen > 0)
|
||||
{
|
||||
uint8 temp[3];
|
||||
memset(temp, 0, sizeof(temp));
|
||||
memcpy(temp, source, sourcelen);
|
||||
base64_encode_triple(temp, target);
|
||||
target[3] = '=';
|
||||
|
||||
if (sourcelen == 1)
|
||||
{
|
||||
target[2] = '=';
|
||||
}
|
||||
|
||||
target += 4;
|
||||
}
|
||||
|
||||
/* terminate the string */
|
||||
target[0] = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* decode base64 encoded data
|
||||
*
|
||||
* @param source the encoded data (zero terminated)
|
||||
* @param target pointer to the target buffer
|
||||
* @param targetlen length of the target buffer
|
||||
* @return length of converted data on success, -1 otherwise
|
||||
*/
|
||||
HT_API int base64_decode(const char *source, uint32 sourcelen, uint8 *target, uint32 targetlen)
|
||||
{
|
||||
const char *cur;
|
||||
const char *max_src;
|
||||
uint8 *dest, *max_dest;
|
||||
int d, dlast, phase;
|
||||
uint8 c;
|
||||
static int table[256] = {
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 00-0F */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 10-1F */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, /* 20-2F */
|
||||
52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, /* 30-3F */
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, /* 40-4F */
|
||||
15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, /* 50-5F */
|
||||
-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, /* 60-6F */
|
||||
41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1, /* 70-7F */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 80-8F */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 90-9F */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* A0-AF */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* B0-BF */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* C0-CF */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* D0-DF */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* E0-EF */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 /* F0-FF */
|
||||
};
|
||||
|
||||
d = dlast = phase = 0;
|
||||
dest = target;
|
||||
max_dest = dest+targetlen;
|
||||
max_src = source + sourcelen;
|
||||
|
||||
for (cur = source; *cur != '\0' && cur<max_src && dest<max_dest; ++cur)
|
||||
{
|
||||
if (*cur == '=')
|
||||
{
|
||||
dlast = phase = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
d = table[(int)*cur];
|
||||
if (d != -1)
|
||||
{
|
||||
switch(phase)
|
||||
{
|
||||
case 0:
|
||||
++phase;
|
||||
break;
|
||||
case 1:
|
||||
c = (uint8)(((dlast << 2) | ((d & 0x30) >> 4)));
|
||||
*dest++ = c;
|
||||
++phase;
|
||||
break;
|
||||
case 2:
|
||||
c = (((dlast & 0xf) << 4) | ((d & 0x3c) >> 2));
|
||||
*dest++ = c;
|
||||
++phase;
|
||||
break;
|
||||
case 3:
|
||||
c = (uint8)((((dlast & 0x03 ) << 6) | d));
|
||||
*dest++ = c;
|
||||
phase = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
dlast = d;
|
||||
}
|
||||
}
|
||||
|
||||
/* we decoded the whole buffer */
|
||||
if (*cur == '\0' || cur == max_src)
|
||||
{
|
||||
return (int)(dest-target);
|
||||
}
|
||||
|
||||
/* we did not convert the whole data, buffer was to small */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
37
MediaClient/MediaClient/bm/base64.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef BASE64_H
|
||||
#define BASE64_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API int base64_encode(uint8 *source, uint32 sourcelen, char *target, uint32 targetlen);
|
||||
HT_API int base64_decode(const char *source, uint32 sourcelen, uint8 *target, uint32 targetlen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* BASE64_H */
|
||||
|
||||
|
||||
386
MediaClient/MediaClient/bm/hqueue.cpp
Normal file
@@ -0,0 +1,386 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "hqueue.h"
|
||||
|
||||
/***************************************************************************************/
|
||||
HT_API HQUEUE * hqCreate(uint32 unit_num, uint32 unit_size, uint32 queue_mode)
|
||||
{
|
||||
uint32 q_len = unit_num * unit_size + sizeof(HQUEUE);
|
||||
|
||||
HQUEUE *phq = (HQUEUE *)malloc(q_len);
|
||||
if (phq == NULL)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, malloc HQUEUE fail\r\n", __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
phq->queue_mode = queue_mode;
|
||||
phq->unit_size = unit_size;
|
||||
phq->unit_num = unit_num;
|
||||
phq->front = 0;
|
||||
phq->rear = 0;
|
||||
phq->count_put_full = 0;
|
||||
phq->queue_buffer = sizeof(HQUEUE);
|
||||
|
||||
if (queue_mode & HQ_NO_EVENT)
|
||||
{
|
||||
phq->queue_nnulEvent = NULL;
|
||||
phq->queue_nfulEvent = NULL;
|
||||
phq->queue_putMutex = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
phq->queue_nnulEvent = sys_os_create_sig();
|
||||
phq->queue_nfulEvent = sys_os_create_sig();
|
||||
phq->queue_putMutex = sys_os_create_mutex();
|
||||
}
|
||||
|
||||
return phq;
|
||||
}
|
||||
|
||||
HT_API void hqDelete(HQUEUE * phq)
|
||||
{
|
||||
if (phq == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (phq->queue_mode & HQ_NO_EVENT)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_os_destroy_sig_mutex(phq->queue_nnulEvent);
|
||||
sys_os_destroy_sig_mutex(phq->queue_nfulEvent);
|
||||
sys_os_destroy_sig_mutex(phq->queue_putMutex);
|
||||
}
|
||||
|
||||
free(phq);
|
||||
}
|
||||
|
||||
/***************************************************************************************/
|
||||
void hqPutMutexEnter(HQUEUE * phq)
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_mutex_enter(phq->queue_putMutex);
|
||||
}
|
||||
}
|
||||
|
||||
void hqPutMutexLeave(HQUEUE * phq)
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_mutex_leave(phq->queue_putMutex);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API BOOL hqBufPut(HQUEUE * phq, char * buf)
|
||||
{
|
||||
uint32 real_rear, queue_count;
|
||||
char * ptr;
|
||||
|
||||
if (phq == NULL || buf == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hqPutMutexEnter(phq);
|
||||
|
||||
hqBufPut_start:
|
||||
|
||||
queue_count = phq->rear - phq->front;
|
||||
|
||||
if (queue_count == (phq->unit_num - 1))
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
if (phq->queue_mode & HQ_PUT_WAIT)
|
||||
{
|
||||
sys_os_sig_wait(phq->queue_nfulEvent);
|
||||
goto hqBufPut_start;
|
||||
}
|
||||
else
|
||||
{
|
||||
phq->count_put_full++;
|
||||
hqPutMutexLeave(phq);
|
||||
|
||||
// log_print(HT_LOG_ERR, "%s, queue_count=%d,full!!!\r\n", __FUNCTION__, queue_count);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hqPutMutexLeave(phq);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
real_rear = phq->rear % phq->unit_num;
|
||||
ptr = ((char *)phq) + phq->queue_buffer + real_rear*phq->unit_size;
|
||||
memcpy((char *)ptr, buf, phq->unit_size);
|
||||
phq->rear++;
|
||||
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_sig_sign(phq->queue_nnulEvent);
|
||||
}
|
||||
|
||||
hqPutMutexLeave(phq);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HT_API BOOL hqBufGet(HQUEUE * phq, char * buf)
|
||||
{
|
||||
uint32 real_front;
|
||||
|
||||
if (phq == NULL || buf == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hqBufGet_start:
|
||||
|
||||
if (phq->front == phq->rear)
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
if (phq->queue_mode & HQ_GET_WAIT)
|
||||
{
|
||||
sys_os_sig_wait(phq->queue_nnulEvent);
|
||||
goto hqBufGet_start;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
real_front = phq->front % phq->unit_num;
|
||||
memcpy(buf, ((char *)phq) + phq->queue_buffer + real_front*phq->unit_size, phq->unit_size);
|
||||
phq->front++;
|
||||
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_sig_sign(phq->queue_nfulEvent);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HT_API BOOL hqBufIsEmpty(HQUEUE * phq)
|
||||
{
|
||||
if (phq == NULL)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (phq->front == phq->rear)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HT_API BOOL hqBufIsFull(HQUEUE * phq)
|
||||
{
|
||||
uint32 queue_count;
|
||||
|
||||
if (phq == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
queue_count = phq->rear - phq->front;
|
||||
|
||||
if (queue_count == (phq->unit_num - 1))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HT_API char * hqBufGetWait(HQUEUE * phq)
|
||||
{
|
||||
uint32 real_front;
|
||||
char * ptr = NULL;
|
||||
|
||||
if (phq == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hqBufGet_start:
|
||||
|
||||
if (phq->front == phq->rear)
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
if (phq->queue_mode & HQ_GET_WAIT)
|
||||
{
|
||||
sys_os_sig_wait(phq->queue_nnulEvent);
|
||||
goto hqBufGet_start;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
real_front = phq->front % phq->unit_num;
|
||||
|
||||
ptr = ((char *)phq) + phq->queue_buffer + real_front*phq->unit_size;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
HT_API void hqBufGetWaitPost(HQUEUE * phq)
|
||||
{
|
||||
if (phq == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
phq->front++;
|
||||
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_sig_sign(phq->queue_nfulEvent);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API char * hqBufPutPtrWait(HQUEUE * phq)
|
||||
{
|
||||
uint32 real_rear,queue_count;
|
||||
char * ptr;
|
||||
|
||||
if (phq == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hqPutMutexEnter(phq);
|
||||
|
||||
hqBufPutPtr_start:
|
||||
|
||||
queue_count = phq->rear - phq->front;
|
||||
|
||||
if (queue_count == (phq->unit_num - 1))
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
if (phq->queue_mode & HQ_PUT_WAIT)
|
||||
{
|
||||
sys_os_sig_wait(phq->queue_nfulEvent);
|
||||
goto hqBufPutPtr_start;
|
||||
}
|
||||
else
|
||||
{
|
||||
phq->count_put_full++;
|
||||
hqPutMutexLeave(phq);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hqPutMutexLeave(phq);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
real_rear = phq->rear % phq->unit_num;
|
||||
ptr = ((char *)phq) + phq->queue_buffer + real_rear*phq->unit_size;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
HT_API void hqBufPutPtrWaitPost(HQUEUE * phq, BOOL bPutFinish)
|
||||
{
|
||||
if (phq == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (bPutFinish)
|
||||
{
|
||||
phq->rear++;
|
||||
}
|
||||
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
sys_os_sig_sign(phq->queue_nnulEvent);
|
||||
}
|
||||
|
||||
hqPutMutexLeave(phq);
|
||||
}
|
||||
|
||||
HT_API BOOL hqBufPeek(HQUEUE * phq, char * buf)
|
||||
{
|
||||
uint32 real_front;
|
||||
|
||||
if (phq == NULL || buf == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hqBufPeek_start:
|
||||
|
||||
if (phq->front == phq->rear)
|
||||
{
|
||||
if ((phq->queue_mode & HQ_NO_EVENT) == 0)
|
||||
{
|
||||
if (phq->queue_mode & HQ_GET_WAIT)
|
||||
{
|
||||
sys_os_sig_wait(phq->queue_nnulEvent);
|
||||
goto hqBufPeek_start;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
real_front = phq->front % phq->unit_num;
|
||||
memcpy(buf, ((char *)phq) + phq->queue_buffer + real_front*phq->unit_size, phq->unit_size);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
74
MediaClient/MediaClient/bm/hqueue.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef HQUEUE_H
|
||||
#define HQUEUE_H
|
||||
|
||||
|
||||
/***********************************************************/
|
||||
#define HQ_PUT_WAIT 0x00000001
|
||||
#define HQ_GET_WAIT 0x00000002
|
||||
#define HQ_NO_EVENT 0x00000004
|
||||
|
||||
/***********************************************************/
|
||||
typedef struct h_queue
|
||||
{
|
||||
uint32 queue_mode;
|
||||
uint32 unit_num;
|
||||
uint32 unit_size;
|
||||
uint32 front;
|
||||
uint32 rear;
|
||||
uint32 queue_buffer;
|
||||
uint32 count_put_full;
|
||||
|
||||
void * queue_putMutex;
|
||||
void * queue_nnulEvent;
|
||||
void * queue_nfulEvent;
|
||||
} HQUEUE;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************/
|
||||
HT_API HQUEUE * hqCreate(uint32 unit_num, uint32 unit_size, uint32 queue_mode);
|
||||
HT_API void hqDelete(HQUEUE * phq);
|
||||
|
||||
HT_API BOOL hqBufPut(HQUEUE * phq,char * buf);
|
||||
HT_API BOOL hqBufGet(HQUEUE * phq,char * buf);
|
||||
|
||||
HT_API BOOL hqBufIsEmpty(HQUEUE * phq);
|
||||
HT_API BOOL hqBufIsFull(HQUEUE * phq);
|
||||
|
||||
HT_API char * hqBufGetWait(HQUEUE * phq);
|
||||
HT_API void hqBufGetWaitPost(HQUEUE * phq);
|
||||
|
||||
HT_API char * hqBufPutPtrWait(HQUEUE * phq);
|
||||
HT_API void hqBufPutPtrWaitPost(HQUEUE * phq, BOOL bPutFinish);
|
||||
HT_API BOOL hqBufPeek(HQUEUE * phq,char * buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // HQUEUE_H
|
||||
|
||||
|
||||
|
||||
632
MediaClient/MediaClient/bm/linked_list.cpp
Normal file
@@ -0,0 +1,632 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API LINKED_LIST * h_list_create(BOOL bNeedMutex)
|
||||
{
|
||||
LINKED_LIST * p_linked_list;
|
||||
|
||||
p_linked_list = (LINKED_LIST*) malloc(sizeof(LINKED_LIST));
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_linked_list->p_first_node = NULL;
|
||||
p_linked_list->p_last_node = NULL;
|
||||
|
||||
if (bNeedMutex)
|
||||
{
|
||||
p_linked_list->list_semMutex = sys_os_create_mutex();
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->list_semMutex = NULL;
|
||||
}
|
||||
|
||||
return p_linked_list;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API void h_list_get_ownership(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list->list_semMutex)
|
||||
{
|
||||
sys_os_mutex_enter(p_linked_list->list_semMutex);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API void h_list_giveup_ownership(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list->list_semMutex)
|
||||
{
|
||||
sys_os_mutex_leave(p_linked_list->list_semMutex);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API void h_list_free_container(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
LINKED_NODE * p_node;
|
||||
LINKED_NODE * p_next_node;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node = p_linked_list->p_first_node;
|
||||
|
||||
while (p_node != NULL)
|
||||
{
|
||||
void * p_free;
|
||||
|
||||
p_next_node = p_node->p_next;
|
||||
|
||||
p_free = p_node->p_data;
|
||||
|
||||
if (p_free != NULL)
|
||||
{
|
||||
free(p_free);
|
||||
}
|
||||
|
||||
free (p_node);
|
||||
|
||||
p_node = p_next_node;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->list_semMutex)
|
||||
{
|
||||
sys_os_destroy_sig_mutex(p_linked_list->list_semMutex);
|
||||
}
|
||||
|
||||
free (p_linked_list);
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API void h_list_free_all_node(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
LINKED_NODE * p_node;
|
||||
LINKED_NODE * p_next_node;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node = p_linked_list->p_first_node;
|
||||
|
||||
while (p_node != NULL)
|
||||
{
|
||||
p_next_node = p_node->p_next;
|
||||
|
||||
if (p_node->p_data != NULL)
|
||||
{
|
||||
free(p_node->p_data);
|
||||
}
|
||||
|
||||
free (p_node);
|
||||
|
||||
p_node = p_next_node;
|
||||
}
|
||||
|
||||
p_linked_list->p_first_node = NULL;
|
||||
p_linked_list->p_last_node = NULL;
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API BOOL h_list_add_at_front(LINKED_LIST * p_linked_list, void * p_item)
|
||||
{
|
||||
LINKED_NODE * p_node;
|
||||
LINKED_NODE * p_next_node;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (p_item == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_node = (LINKED_NODE*) malloc(sizeof(LINKED_NODE));
|
||||
if (p_node == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_node->p_next = NULL;
|
||||
p_node->p_previous = NULL;
|
||||
p_node->p_data = p_item;
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->p_first_node == NULL)
|
||||
{
|
||||
p_linked_list->p_first_node = p_node;
|
||||
p_linked_list->p_last_node = p_node;
|
||||
|
||||
p_node->p_previous = NULL;
|
||||
p_node->p_next = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_next_node = p_linked_list->p_first_node;
|
||||
|
||||
p_node->p_next = p_next_node;
|
||||
p_node->p_previous = NULL;
|
||||
|
||||
p_next_node->p_previous = p_node;
|
||||
p_linked_list->p_first_node = p_node;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API void h_list_remove_from_front(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
LINKED_NODE * p_node_to_remove;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node_to_remove = p_linked_list->p_first_node;
|
||||
|
||||
if (p_node_to_remove == NULL)
|
||||
{
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_linked_list->p_first_node == p_linked_list->p_last_node)
|
||||
{
|
||||
p_linked_list->p_first_node = NULL;
|
||||
p_linked_list->p_last_node = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_first_node = p_node_to_remove->p_next;
|
||||
p_linked_list->p_first_node->p_previous = NULL;
|
||||
}
|
||||
|
||||
free(p_node_to_remove);
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
|
||||
HT_API void h_list_remove_from_front_no_lock(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
LINKED_NODE * p_node_to_remove;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
p_node_to_remove = p_linked_list->p_first_node;
|
||||
|
||||
if (p_node_to_remove == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_linked_list->p_first_node == p_linked_list->p_last_node)
|
||||
{
|
||||
p_linked_list->p_first_node = NULL;
|
||||
p_linked_list->p_last_node = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_first_node = p_node_to_remove->p_next;
|
||||
p_linked_list->p_first_node->p_previous = NULL;
|
||||
}
|
||||
|
||||
free (p_node_to_remove);
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API BOOL h_list_add_at_back(LINKED_LIST * p_linked_list, void * p_item)
|
||||
{
|
||||
LINKED_NODE * p_node;
|
||||
LINKED_NODE * p_previous_node;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (p_item == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_node = (LINKED_NODE*) malloc(sizeof(LINKED_NODE));
|
||||
if (p_node == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_node->p_next = NULL;
|
||||
p_node->p_previous = NULL;
|
||||
p_node->p_data = (void*) p_item;
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->p_last_node == NULL)
|
||||
{
|
||||
p_linked_list->p_last_node = p_node;
|
||||
p_linked_list->p_first_node = p_node;
|
||||
|
||||
p_node->p_next = NULL;
|
||||
p_node->p_previous = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_previous_node = p_linked_list->p_last_node;
|
||||
|
||||
p_node->p_next = NULL;
|
||||
p_node->p_previous = p_previous_node;
|
||||
|
||||
p_previous_node->p_next = p_node;
|
||||
|
||||
p_linked_list->p_last_node = p_node;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API void h_list_remove_from_back(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
LINKED_NODE * p_node_to_remove;
|
||||
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->p_last_node == NULL)
|
||||
{
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_linked_list->p_first_node == p_linked_list->p_last_node)
|
||||
{
|
||||
p_node_to_remove = p_linked_list->p_first_node;
|
||||
|
||||
p_linked_list->p_first_node = NULL;
|
||||
p_linked_list->p_last_node = NULL;
|
||||
|
||||
free(p_node_to_remove);
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
return;
|
||||
}
|
||||
|
||||
p_node_to_remove = p_linked_list->p_last_node;
|
||||
|
||||
p_linked_list->p_last_node = p_node_to_remove->p_previous;
|
||||
|
||||
p_linked_list->p_last_node->p_next = NULL;
|
||||
|
||||
free(p_node_to_remove);
|
||||
|
||||
p_node_to_remove = NULL;
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
|
||||
HT_API BOOL h_list_remove(LINKED_LIST * p_linked_list, LINKED_NODE * p_node)
|
||||
{
|
||||
LINKED_NODE * p_previous_node;
|
||||
LINKED_NODE * p_next_node;
|
||||
|
||||
if ((p_linked_list == NULL) || (p_node == NULL))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_previous_node = p_node->p_previous;
|
||||
|
||||
p_next_node = p_node->p_next;
|
||||
|
||||
if (p_previous_node != NULL)
|
||||
{
|
||||
p_previous_node->p_next = p_next_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_first_node = p_next_node;
|
||||
}
|
||||
|
||||
if (p_next_node != NULL)
|
||||
{
|
||||
p_next_node->p_previous = p_previous_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_last_node = p_previous_node;
|
||||
}
|
||||
|
||||
free (p_node);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HT_API BOOL h_list_remove_data(LINKED_LIST * p_linked_list, void * p_data)
|
||||
{
|
||||
LINKED_NODE * p_previous_node;
|
||||
LINKED_NODE * p_next_node;
|
||||
LINKED_NODE * p_node;
|
||||
|
||||
if ((p_linked_list == NULL) || (p_data == NULL))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node = p_linked_list->p_first_node;
|
||||
|
||||
while (p_node != NULL)
|
||||
{
|
||||
if (p_data == p_node->p_data)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
p_node = p_node->p_next;
|
||||
}
|
||||
|
||||
if (p_node == NULL)
|
||||
{
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_previous_node = p_node->p_previous;
|
||||
|
||||
p_next_node = p_node->p_next;
|
||||
|
||||
if (p_previous_node != NULL)
|
||||
{
|
||||
p_previous_node->p_next = p_next_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_first_node = p_next_node;
|
||||
}
|
||||
|
||||
if (p_next_node != NULL)
|
||||
{
|
||||
p_next_node->p_previous = p_previous_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_linked_list->p_last_node = p_previous_node;
|
||||
}
|
||||
|
||||
free(p_node);
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API uint32 h_list_get_number_of_nodes(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
uint32 number_of_nodes;
|
||||
LINKED_NODE * p_node;
|
||||
|
||||
if (NULL == p_linked_list)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node = p_linked_list->p_first_node;
|
||||
|
||||
number_of_nodes = 0;
|
||||
|
||||
while (p_node != NULL)
|
||||
{
|
||||
++ number_of_nodes;
|
||||
p_node = p_node->p_next;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
|
||||
return number_of_nodes;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
HT_API BOOL h_list_insert(LINKED_LIST * p_linked_list, LINKED_NODE * p_pre_node, void *p_item)
|
||||
{
|
||||
if ((p_linked_list == NULL) || (p_item == NULL))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (p_pre_node == NULL)
|
||||
{
|
||||
h_list_add_at_front(p_linked_list, p_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_pre_node->p_next == NULL)
|
||||
{
|
||||
h_list_add_at_back(p_linked_list, p_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
LINKED_NODE * p_node = (LINKED_NODE *)malloc(sizeof(LINKED_NODE));
|
||||
if (NULL == p_node)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
p_node->p_data = p_item;
|
||||
p_node->p_next = p_pre_node->p_next;
|
||||
p_node->p_previous = p_pre_node;
|
||||
p_pre_node->p_next->p_previous = p_node;
|
||||
p_pre_node->p_next = p_node;
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
HT_API LINKED_NODE * h_list_lookup_start(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->p_first_node)
|
||||
{
|
||||
return p_linked_list->p_first_node;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HT_API LINKED_NODE * h_list_lookup_next(LINKED_LIST * p_linked_list, LINKED_NODE * p_node)
|
||||
{
|
||||
if (p_node == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p_node->p_next;
|
||||
}
|
||||
|
||||
HT_API void h_list_lookup_end(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
|
||||
HT_API LINKED_NODE * h_list_lookback_start(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
h_list_get_ownership(p_linked_list);
|
||||
|
||||
if (p_linked_list->p_last_node)
|
||||
{
|
||||
return p_linked_list->p_last_node;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HT_API LINKED_NODE * h_list_lookback_next(LINKED_LIST * p_linked_list, LINKED_NODE * p_node)
|
||||
{
|
||||
if (p_node == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p_node->p_previous;
|
||||
}
|
||||
|
||||
HT_API void h_list_lookback_end(LINKED_LIST * p_linked_list)
|
||||
{
|
||||
if (p_linked_list == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
h_list_giveup_ownership(p_linked_list);
|
||||
}
|
||||
|
||||
HT_API LINKED_NODE * h_list_get_from_front(LINKED_LIST * p_list)
|
||||
{
|
||||
if (p_list == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p_list->p_first_node;
|
||||
}
|
||||
|
||||
HT_API LINKED_NODE * h_list_get_from_back(LINKED_LIST * p_list)
|
||||
{
|
||||
if (p_list == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p_list->p_last_node;
|
||||
}
|
||||
|
||||
HT_API BOOL h_list_is_empty(LINKED_LIST * p_list)
|
||||
{
|
||||
if (p_list == NULL)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return (p_list->p_first_node == NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
83
MediaClient/MediaClient/bm/linked_list.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef LINKED_LIST_H
|
||||
#define LINKED_LIST_H
|
||||
|
||||
/************************************************************************************/
|
||||
typedef struct LINKED_NODE
|
||||
{
|
||||
struct LINKED_NODE * p_next;
|
||||
struct LINKED_NODE * p_previous;
|
||||
void * p_data;
|
||||
} LINKED_NODE;
|
||||
|
||||
/************************************************************************************/
|
||||
typedef struct LINKED_LIST
|
||||
{
|
||||
LINKED_NODE * p_first_node;
|
||||
LINKED_NODE * p_last_node;
|
||||
void * list_semMutex;
|
||||
} LINKED_LIST;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API LINKED_LIST* h_list_create(BOOL bNeedMutex);
|
||||
HT_API void h_list_free_container(LINKED_LIST * p_linked_list);
|
||||
HT_API void h_list_free_all_node(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API void h_list_get_ownership(LINKED_LIST * p_linked_list);
|
||||
HT_API void h_list_giveup_ownership(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API BOOL h_list_remove(LINKED_LIST * p_linked_list, LINKED_NODE * p_node);
|
||||
HT_API BOOL h_list_remove_data(LINKED_LIST * p_linked_list, void * p_data);
|
||||
|
||||
HT_API void h_list_remove_from_front(LINKED_LIST * p_linked_list);
|
||||
HT_API void h_list_remove_from_front_no_lock(LINKED_LIST * p_linked_list);
|
||||
HT_API void h_list_remove_from_back(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API BOOL h_list_add_at_front(LINKED_LIST * p_linked_list, void * p_item);
|
||||
HT_API BOOL h_list_add_at_back(LINKED_LIST * p_linked_list, void * p_item);
|
||||
|
||||
HT_API uint32 h_list_get_number_of_nodes(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API BOOL h_list_insert(LINKED_LIST * p_linked_list, LINKED_NODE * p_pre_node, void * p_item);
|
||||
|
||||
HT_API LINKED_NODE* h_list_lookup_start(LINKED_LIST * p_linked_list);
|
||||
HT_API LINKED_NODE* h_list_lookup_next(LINKED_LIST * p_linked_list, LINKED_NODE * p_node);
|
||||
HT_API void h_list_lookup_end(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API LINKED_NODE* h_list_lookback_start(LINKED_LIST * p_linked_list);
|
||||
HT_API LINKED_NODE* h_list_lookback_next(LINKED_LIST * p_linked_list, LINKED_NODE * p_node);
|
||||
HT_API void h_list_lookback_end(LINKED_LIST * p_linked_list);
|
||||
|
||||
HT_API BOOL h_list_is_empty(LINKED_LIST * p_list);
|
||||
HT_API LINKED_NODE* h_list_get_from_front(LINKED_LIST * p_list);
|
||||
HT_API LINKED_NODE* h_list_get_from_back(LINKED_LIST * p_list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LINKED_LIST_H
|
||||
|
||||
|
||||
1109
MediaClient/MediaClient/bm/ppstack.cpp
Normal file
110
MediaClient/MediaClient/bm/ppstack.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef PPSTACK_H
|
||||
#define PPSTACK_H
|
||||
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
typedef struct PPSN // ppstack_node
|
||||
{
|
||||
unsigned long prev_node;
|
||||
unsigned long next_node;
|
||||
unsigned long node_flag; // 0:idle 1:in FreeList 2:in UsedList
|
||||
} PPSN;
|
||||
|
||||
typedef struct PPSN_CTX
|
||||
{
|
||||
char * fl_base;
|
||||
uint32 head_node;
|
||||
uint32 tail_node;
|
||||
uint32 node_num;
|
||||
uint32 low_offset;
|
||||
uint32 high_offset;
|
||||
uint32 unit_size;
|
||||
void * ctx_mutex;
|
||||
uint32 pop_cnt;
|
||||
uint32 push_cnt;
|
||||
} PPSN_CTX;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
HT_API PPSN_CTX * pps_ctx_fl_init(unsigned long node_num, unsigned long content_size, BOOL bNeedMutex);
|
||||
HT_API PPSN_CTX * pps_ctx_fl_init_assign(char * mem_addr, unsigned long mem_len, unsigned long node_num, unsigned long content_size, BOOL bNeedMutex);
|
||||
|
||||
HT_API void pps_fl_free(PPSN_CTX * fl_ctx);
|
||||
HT_API void pps_fl_reinit(PPSN_CTX * fl_ctx);
|
||||
|
||||
HT_API BOOL pps_fl_push(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API BOOL pps_fl_push_tail(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API void * pps_fl_pop(PPSN_CTX * pps_ctx);
|
||||
|
||||
HT_API PPSN_CTX * pps_ctx_ul_init(PPSN_CTX * fl_ctx, BOOL bNeedMutex);
|
||||
HT_API BOOL pps_ctx_ul_init_assign(PPSN_CTX * ul_ctx, PPSN_CTX * fl_ctx, BOOL bNeedMutex);
|
||||
HT_API BOOL pps_ctx_ul_init_nm(PPSN_CTX * fl_ctx, PPSN_CTX * ul_ctx);
|
||||
|
||||
HT_API void pps_ul_reinit(PPSN_CTX * ul_ctx);
|
||||
HT_API void pps_ul_free(PPSN_CTX * ul_ctx);
|
||||
|
||||
HT_API BOOL pps_ctx_ul_del(PPSN_CTX * ul_ctx, void * content_ptr);
|
||||
HT_API PPSN * pps_ctx_ul_del_node_unlock(PPSN_CTX * ul_ctx, PPSN * p_node);
|
||||
HT_API void * pps_ctx_ul_del_unlock(PPSN_CTX * ul_ctx, void * content_ptr);
|
||||
|
||||
HT_API BOOL pps_ctx_ul_add(PPSN_CTX * ul_ctx, void * content_ptr);
|
||||
HT_API BOOL pps_ctx_ul_add_head(PPSN_CTX * ul_ctx, void * content_ptr);
|
||||
|
||||
HT_API uint32 pps_get_index(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API void * pps_get_node_by_index(PPSN_CTX * pps_ctx, unsigned long index);
|
||||
|
||||
/***************************************************************************************/
|
||||
HT_API void * pps_lookup_start(PPSN_CTX * pps_ctx);
|
||||
HT_API void * pps_lookup_next(PPSN_CTX * pps_ctx, void * ct_ptr);
|
||||
HT_API void pps_lookup_end(PPSN_CTX * pps_ctx);
|
||||
|
||||
HT_API void * pps_lookback_start(PPSN_CTX * pps_ctx);
|
||||
HT_API void * pps_lookback_next(PPSN_CTX * pps_ctx, void * ct_ptr);
|
||||
HT_API void pps_lookback_end(PPSN_CTX * pps_ctx);
|
||||
|
||||
HT_API void pps_wait_mutex(PPSN_CTX * pps_ctx);
|
||||
HT_API void pps_post_mutex(PPSN_CTX * pps_ctx);
|
||||
|
||||
HT_API BOOL pps_safe_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API BOOL pps_idle_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API BOOL pps_exist_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API BOOL pps_used_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
|
||||
/***************************************************************************************/
|
||||
HT_API int pps_node_count(PPSN_CTX * pps_ctx);
|
||||
HT_API void * pps_get_head_node(PPSN_CTX * pps_ctx);
|
||||
HT_API void * pps_get_tail_node(PPSN_CTX * pps_ctx);
|
||||
HT_API void * pps_get_next_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
HT_API void * pps_get_prev_node(PPSN_CTX * pps_ctx, void * content_ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // PPSTACK_H
|
||||
|
||||
|
||||
245
MediaClient/MediaClient/bm/rfc_md5.cpp
Normal file
@@ -0,0 +1,245 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "rfc_md5.h"
|
||||
|
||||
|
||||
#define GET_UINT32(n,b,i) \
|
||||
{ \
|
||||
(n) = ( (uint32) (b)[(i) ] ) \
|
||||
| ( (uint32) (b)[(i) + 1] << 8 ) \
|
||||
| ( (uint32) (b)[(i) + 2] << 16 ) \
|
||||
| ( (uint32) (b)[(i) + 3] << 24 ); \
|
||||
}
|
||||
|
||||
#define PUT_UINT32(n,b,i) \
|
||||
{ \
|
||||
(b)[(i) ] = (uint8) ( (n) ); \
|
||||
(b)[(i) + 1] = (uint8) ( (n) >> 8 ); \
|
||||
(b)[(i) + 2] = (uint8) ( (n) >> 16 ); \
|
||||
(b)[(i) + 3] = (uint8) ( (n) >> 24 ); \
|
||||
}
|
||||
|
||||
HT_API void md5_starts(md5_context *ctx)
|
||||
{
|
||||
ctx->total[0] = 0;
|
||||
ctx->total[1] = 0;
|
||||
|
||||
ctx->state[0] = 0x67452301;
|
||||
ctx->state[1] = 0xEFCDAB89;
|
||||
ctx->state[2] = 0x98BADCFE;
|
||||
ctx->state[3] = 0x10325476;
|
||||
}
|
||||
|
||||
void md5_process(md5_context *ctx, uint8 data[64])
|
||||
{
|
||||
uint32 X[16], A, B, C, D;
|
||||
|
||||
GET_UINT32( X[0], data, 0 );
|
||||
GET_UINT32( X[1], data, 4 );
|
||||
GET_UINT32( X[2], data, 8 );
|
||||
GET_UINT32( X[3], data, 12 );
|
||||
GET_UINT32( X[4], data, 16 );
|
||||
GET_UINT32( X[5], data, 20 );
|
||||
GET_UINT32( X[6], data, 24 );
|
||||
GET_UINT32( X[7], data, 28 );
|
||||
GET_UINT32( X[8], data, 32 );
|
||||
GET_UINT32( X[9], data, 36 );
|
||||
GET_UINT32( X[10], data, 40 );
|
||||
GET_UINT32( X[11], data, 44 );
|
||||
GET_UINT32( X[12], data, 48 );
|
||||
GET_UINT32( X[13], data, 52 );
|
||||
GET_UINT32( X[14], data, 56 );
|
||||
GET_UINT32( X[15], data, 60 );
|
||||
|
||||
#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
|
||||
|
||||
#define P(a,b,c,d,k,s,t) \
|
||||
{ \
|
||||
a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \
|
||||
}
|
||||
|
||||
A = ctx->state[0];
|
||||
B = ctx->state[1];
|
||||
C = ctx->state[2];
|
||||
D = ctx->state[3];
|
||||
|
||||
#define F(x,y,z) (z ^ (x & (y ^ z)))
|
||||
|
||||
P( A, B, C, D, 0, 7, 0xD76AA478 );
|
||||
P( D, A, B, C, 1, 12, 0xE8C7B756 );
|
||||
P( C, D, A, B, 2, 17, 0x242070DB );
|
||||
P( B, C, D, A, 3, 22, 0xC1BDCEEE );
|
||||
P( A, B, C, D, 4, 7, 0xF57C0FAF );
|
||||
P( D, A, B, C, 5, 12, 0x4787C62A );
|
||||
P( C, D, A, B, 6, 17, 0xA8304613 );
|
||||
P( B, C, D, A, 7, 22, 0xFD469501 );
|
||||
P( A, B, C, D, 8, 7, 0x698098D8 );
|
||||
P( D, A, B, C, 9, 12, 0x8B44F7AF );
|
||||
P( C, D, A, B, 10, 17, 0xFFFF5BB1 );
|
||||
P( B, C, D, A, 11, 22, 0x895CD7BE );
|
||||
P( A, B, C, D, 12, 7, 0x6B901122 );
|
||||
P( D, A, B, C, 13, 12, 0xFD987193 );
|
||||
P( C, D, A, B, 14, 17, 0xA679438E );
|
||||
P( B, C, D, A, 15, 22, 0x49B40821 );
|
||||
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) (y ^ (z & (x ^ y)))
|
||||
|
||||
P( A, B, C, D, 1, 5, 0xF61E2562 );
|
||||
P( D, A, B, C, 6, 9, 0xC040B340 );
|
||||
P( C, D, A, B, 11, 14, 0x265E5A51 );
|
||||
P( B, C, D, A, 0, 20, 0xE9B6C7AA );
|
||||
P( A, B, C, D, 5, 5, 0xD62F105D );
|
||||
P( D, A, B, C, 10, 9, 0x02441453 );
|
||||
P( C, D, A, B, 15, 14, 0xD8A1E681 );
|
||||
P( B, C, D, A, 4, 20, 0xE7D3FBC8 );
|
||||
P( A, B, C, D, 9, 5, 0x21E1CDE6 );
|
||||
P( D, A, B, C, 14, 9, 0xC33707D6 );
|
||||
P( C, D, A, B, 3, 14, 0xF4D50D87 );
|
||||
P( B, C, D, A, 8, 20, 0x455A14ED );
|
||||
P( A, B, C, D, 13, 5, 0xA9E3E905 );
|
||||
P( D, A, B, C, 2, 9, 0xFCEFA3F8 );
|
||||
P( C, D, A, B, 7, 14, 0x676F02D9 );
|
||||
P( B, C, D, A, 12, 20, 0x8D2A4C8A );
|
||||
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) (x ^ y ^ z)
|
||||
|
||||
P( A, B, C, D, 5, 4, 0xFFFA3942 );
|
||||
P( D, A, B, C, 8, 11, 0x8771F681 );
|
||||
P( C, D, A, B, 11, 16, 0x6D9D6122 );
|
||||
P( B, C, D, A, 14, 23, 0xFDE5380C );
|
||||
P( A, B, C, D, 1, 4, 0xA4BEEA44 );
|
||||
P( D, A, B, C, 4, 11, 0x4BDECFA9 );
|
||||
P( C, D, A, B, 7, 16, 0xF6BB4B60 );
|
||||
P( B, C, D, A, 10, 23, 0xBEBFBC70 );
|
||||
P( A, B, C, D, 13, 4, 0x289B7EC6 );
|
||||
P( D, A, B, C, 0, 11, 0xEAA127FA );
|
||||
P( C, D, A, B, 3, 16, 0xD4EF3085 );
|
||||
P( B, C, D, A, 6, 23, 0x04881D05 );
|
||||
P( A, B, C, D, 9, 4, 0xD9D4D039 );
|
||||
P( D, A, B, C, 12, 11, 0xE6DB99E5 );
|
||||
P( C, D, A, B, 15, 16, 0x1FA27CF8 );
|
||||
P( B, C, D, A, 2, 23, 0xC4AC5665 );
|
||||
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) (y ^ (x | ~z))
|
||||
|
||||
P( A, B, C, D, 0, 6, 0xF4292244 );
|
||||
P( D, A, B, C, 7, 10, 0x432AFF97 );
|
||||
P( C, D, A, B, 14, 15, 0xAB9423A7 );
|
||||
P( B, C, D, A, 5, 21, 0xFC93A039 );
|
||||
P( A, B, C, D, 12, 6, 0x655B59C3 );
|
||||
P( D, A, B, C, 3, 10, 0x8F0CCC92 );
|
||||
P( C, D, A, B, 10, 15, 0xFFEFF47D );
|
||||
P( B, C, D, A, 1, 21, 0x85845DD1 );
|
||||
P( A, B, C, D, 8, 6, 0x6FA87E4F );
|
||||
P( D, A, B, C, 15, 10, 0xFE2CE6E0 );
|
||||
P( C, D, A, B, 6, 15, 0xA3014314 );
|
||||
P( B, C, D, A, 13, 21, 0x4E0811A1 );
|
||||
P( A, B, C, D, 4, 6, 0xF7537E82 );
|
||||
P( D, A, B, C, 11, 10, 0xBD3AF235 );
|
||||
P( C, D, A, B, 2, 15, 0x2AD7D2BB );
|
||||
P( B, C, D, A, 9, 21, 0xEB86D391 );
|
||||
|
||||
#undef F
|
||||
|
||||
ctx->state[0] += A;
|
||||
ctx->state[1] += B;
|
||||
ctx->state[2] += C;
|
||||
ctx->state[3] += D;
|
||||
}
|
||||
|
||||
HT_API void md5_update(md5_context *ctx, uint8 *input, uint32 length)
|
||||
{
|
||||
uint32 left, fill;
|
||||
|
||||
if (!length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
fill = 64 - left;
|
||||
|
||||
ctx->total[0] += length;
|
||||
ctx->total[0] &= 0xFFFFFFFF;
|
||||
|
||||
if (ctx->total[0] < length)
|
||||
{
|
||||
ctx->total[1]++;
|
||||
}
|
||||
|
||||
if (left && length >= fill)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, fill);
|
||||
md5_process(ctx, ctx->buffer);
|
||||
length -= fill;
|
||||
input += fill;
|
||||
left = 0;
|
||||
}
|
||||
|
||||
while (length >= 64)
|
||||
{
|
||||
md5_process(ctx, input);
|
||||
length -= 64;
|
||||
input += 64;
|
||||
}
|
||||
|
||||
if (length)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, length);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API void md5_finish(md5_context *ctx, uint8 digest[16])
|
||||
{
|
||||
uint32 last, padn;
|
||||
uint32 high, low;
|
||||
uint8 msglen[8];
|
||||
uint8 padding[64];
|
||||
|
||||
high = (ctx->total[0] >> 29) | (ctx->total[1] << 3);
|
||||
low = (ctx->total[0] << 3);
|
||||
|
||||
PUT_UINT32(low, msglen, 0);
|
||||
PUT_UINT32(high, msglen, 4);
|
||||
|
||||
last = ctx->total[0] & 0x3F;
|
||||
padn = (last < 56) ? (56 - last) : (120 - last);
|
||||
|
||||
memset(padding, 0, sizeof(padding));
|
||||
padding[0] = 0x80;
|
||||
|
||||
md5_update(ctx, padding, padn);
|
||||
md5_update(ctx, msglen, 8);
|
||||
|
||||
PUT_UINT32(ctx->state[0], digest, 0);
|
||||
PUT_UINT32(ctx->state[1], digest, 4);
|
||||
PUT_UINT32(ctx->state[2], digest, 8);
|
||||
PUT_UINT32(ctx->state[3], digest, 12);
|
||||
}
|
||||
|
||||
|
||||
|
||||
46
MediaClient/MediaClient/bm/rfc_md5.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef RFC_MD5_H
|
||||
#define RFC_MD5_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 total[2];
|
||||
uint32 state[4];
|
||||
uint8 buffer[64];
|
||||
} md5_context;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
HT_API void md5_starts(md5_context *ctx);
|
||||
HT_API void md5_update(md5_context *ctx, uint8 *input, uint32 length);
|
||||
HT_API void md5_finish(md5_context *ctx, uint8 digest[16]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
280
MediaClient/MediaClient/bm/sha1.cpp
Normal file
@@ -0,0 +1,280 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
#include "sys_inc.h"
|
||||
#include "sha1.h"
|
||||
|
||||
|
||||
#define GET_UINT32(n,b,i) \
|
||||
{ \
|
||||
(n) = ( (uint32) (b)[(i) ] << 24 ) \
|
||||
| ( (uint32) (b)[(i) + 1] << 16 ) \
|
||||
| ( (uint32) (b)[(i) + 2] << 8 ) \
|
||||
| ( (uint32) (b)[(i) + 3] ); \
|
||||
}
|
||||
|
||||
#define PUT_UINT32(n,b,i) \
|
||||
{ \
|
||||
(b)[(i) ] = (uint8) ( (n) >> 24 ); \
|
||||
(b)[(i) + 1] = (uint8) ( (n) >> 16 ); \
|
||||
(b)[(i) + 2] = (uint8) ( (n) >> 8 ); \
|
||||
(b)[(i) + 3] = (uint8) ( (n) ); \
|
||||
}
|
||||
|
||||
HT_API void sha1_starts(sha1_context * ctx)
|
||||
{
|
||||
ctx->total[0] = 0;
|
||||
ctx->total[1] = 0;
|
||||
|
||||
ctx->state[0] = 0x67452301;
|
||||
ctx->state[1] = 0xEFCDAB89;
|
||||
ctx->state[2] = 0x98BADCFE;
|
||||
ctx->state[3] = 0x10325476;
|
||||
ctx->state[4] = 0xC3D2E1F0;
|
||||
}
|
||||
|
||||
void sha1_process(sha1_context * ctx, uint8 data[64])
|
||||
{
|
||||
uint32 temp, W[16], A, B, C, D, E;
|
||||
|
||||
GET_UINT32( W[0], data, 0 );
|
||||
GET_UINT32( W[1], data, 4 );
|
||||
GET_UINT32( W[2], data, 8 );
|
||||
GET_UINT32( W[3], data, 12 );
|
||||
GET_UINT32( W[4], data, 16 );
|
||||
GET_UINT32( W[5], data, 20 );
|
||||
GET_UINT32( W[6], data, 24 );
|
||||
GET_UINT32( W[7], data, 28 );
|
||||
GET_UINT32( W[8], data, 32 );
|
||||
GET_UINT32( W[9], data, 36 );
|
||||
GET_UINT32( W[10], data, 40 );
|
||||
GET_UINT32( W[11], data, 44 );
|
||||
GET_UINT32( W[12], data, 48 );
|
||||
GET_UINT32( W[13], data, 52 );
|
||||
GET_UINT32( W[14], data, 56 );
|
||||
GET_UINT32( W[15], data, 60 );
|
||||
|
||||
#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
|
||||
|
||||
#define R(t) \
|
||||
( \
|
||||
temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ \
|
||||
W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \
|
||||
( W[t & 0x0F] = S(temp,1) ) \
|
||||
)
|
||||
|
||||
#define P(a,b,c,d,e,x) \
|
||||
{ \
|
||||
e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \
|
||||
}
|
||||
|
||||
A = ctx->state[0];
|
||||
B = ctx->state[1];
|
||||
C = ctx->state[2];
|
||||
D = ctx->state[3];
|
||||
E = ctx->state[4];
|
||||
|
||||
#define F(x,y,z) (z ^ (x & (y ^ z)))
|
||||
#define K 0x5A827999
|
||||
|
||||
P( A, B, C, D, E, W[0] );
|
||||
P( E, A, B, C, D, W[1] );
|
||||
P( D, E, A, B, C, W[2] );
|
||||
P( C, D, E, A, B, W[3] );
|
||||
P( B, C, D, E, A, W[4] );
|
||||
P( A, B, C, D, E, W[5] );
|
||||
P( E, A, B, C, D, W[6] );
|
||||
P( D, E, A, B, C, W[7] );
|
||||
P( C, D, E, A, B, W[8] );
|
||||
P( B, C, D, E, A, W[9] );
|
||||
P( A, B, C, D, E, W[10] );
|
||||
P( E, A, B, C, D, W[11] );
|
||||
P( D, E, A, B, C, W[12] );
|
||||
P( C, D, E, A, B, W[13] );
|
||||
P( B, C, D, E, A, W[14] );
|
||||
P( A, B, C, D, E, W[15] );
|
||||
P( E, A, B, C, D, R(16) );
|
||||
P( D, E, A, B, C, R(17) );
|
||||
P( C, D, E, A, B, R(18) );
|
||||
P( B, C, D, E, A, R(19) );
|
||||
|
||||
#undef K
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) (x ^ y ^ z)
|
||||
#define K 0x6ED9EBA1
|
||||
|
||||
P( A, B, C, D, E, R(20) );
|
||||
P( E, A, B, C, D, R(21) );
|
||||
P( D, E, A, B, C, R(22) );
|
||||
P( C, D, E, A, B, R(23) );
|
||||
P( B, C, D, E, A, R(24) );
|
||||
P( A, B, C, D, E, R(25) );
|
||||
P( E, A, B, C, D, R(26) );
|
||||
P( D, E, A, B, C, R(27) );
|
||||
P( C, D, E, A, B, R(28) );
|
||||
P( B, C, D, E, A, R(29) );
|
||||
P( A, B, C, D, E, R(30) );
|
||||
P( E, A, B, C, D, R(31) );
|
||||
P( D, E, A, B, C, R(32) );
|
||||
P( C, D, E, A, B, R(33) );
|
||||
P( B, C, D, E, A, R(34) );
|
||||
P( A, B, C, D, E, R(35) );
|
||||
P( E, A, B, C, D, R(36) );
|
||||
P( D, E, A, B, C, R(37) );
|
||||
P( C, D, E, A, B, R(38) );
|
||||
P( B, C, D, E, A, R(39) );
|
||||
|
||||
#undef K
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) ((x & y) | (z & (x | y)))
|
||||
#define K 0x8F1BBCDC
|
||||
|
||||
P( A, B, C, D, E, R(40) );
|
||||
P( E, A, B, C, D, R(41) );
|
||||
P( D, E, A, B, C, R(42) );
|
||||
P( C, D, E, A, B, R(43) );
|
||||
P( B, C, D, E, A, R(44) );
|
||||
P( A, B, C, D, E, R(45) );
|
||||
P( E, A, B, C, D, R(46) );
|
||||
P( D, E, A, B, C, R(47) );
|
||||
P( C, D, E, A, B, R(48) );
|
||||
P( B, C, D, E, A, R(49) );
|
||||
P( A, B, C, D, E, R(50) );
|
||||
P( E, A, B, C, D, R(51) );
|
||||
P( D, E, A, B, C, R(52) );
|
||||
P( C, D, E, A, B, R(53) );
|
||||
P( B, C, D, E, A, R(54) );
|
||||
P( A, B, C, D, E, R(55) );
|
||||
P( E, A, B, C, D, R(56) );
|
||||
P( D, E, A, B, C, R(57) );
|
||||
P( C, D, E, A, B, R(58) );
|
||||
P( B, C, D, E, A, R(59) );
|
||||
|
||||
#undef K
|
||||
#undef F
|
||||
|
||||
#define F(x,y,z) (x ^ y ^ z)
|
||||
#define K 0xCA62C1D6
|
||||
|
||||
P( A, B, C, D, E, R(60) );
|
||||
P( E, A, B, C, D, R(61) );
|
||||
P( D, E, A, B, C, R(62) );
|
||||
P( C, D, E, A, B, R(63) );
|
||||
P( B, C, D, E, A, R(64) );
|
||||
P( A, B, C, D, E, R(65) );
|
||||
P( E, A, B, C, D, R(66) );
|
||||
P( D, E, A, B, C, R(67) );
|
||||
P( C, D, E, A, B, R(68) );
|
||||
P( B, C, D, E, A, R(69) );
|
||||
P( A, B, C, D, E, R(70) );
|
||||
P( E, A, B, C, D, R(71) );
|
||||
P( D, E, A, B, C, R(72) );
|
||||
P( C, D, E, A, B, R(73) );
|
||||
P( B, C, D, E, A, R(74) );
|
||||
P( A, B, C, D, E, R(75) );
|
||||
P( E, A, B, C, D, R(76) );
|
||||
P( D, E, A, B, C, R(77) );
|
||||
P( C, D, E, A, B, R(78) );
|
||||
P( B, C, D, E, A, R(79) );
|
||||
|
||||
#undef K
|
||||
#undef F
|
||||
|
||||
ctx->state[0] += A;
|
||||
ctx->state[1] += B;
|
||||
ctx->state[2] += C;
|
||||
ctx->state[3] += D;
|
||||
ctx->state[4] += E;
|
||||
}
|
||||
|
||||
HT_API void sha1_update(sha1_context * ctx, uint8 * input, uint32 length)
|
||||
{
|
||||
uint32 left, fill;
|
||||
|
||||
if (!length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
fill = 64 - left;
|
||||
|
||||
ctx->total[0] += length;
|
||||
ctx->total[0] &= 0xFFFFFFFF;
|
||||
|
||||
if (ctx->total[0] < length)
|
||||
{
|
||||
ctx->total[1]++;
|
||||
}
|
||||
|
||||
if (left && length >= fill)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, fill);
|
||||
sha1_process(ctx, ctx->buffer);
|
||||
length -= fill;
|
||||
input += fill;
|
||||
left = 0;
|
||||
}
|
||||
|
||||
while (length >= 64)
|
||||
{
|
||||
sha1_process(ctx, input);
|
||||
length -= 64;
|
||||
input += 64;
|
||||
}
|
||||
|
||||
if (length)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, length);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API void sha1_finish(sha1_context * ctx, uint8 digest[20])
|
||||
{
|
||||
uint32 last, padn;
|
||||
uint32 high, low;
|
||||
uint8 msglen[8];
|
||||
uint8 padding[64];
|
||||
|
||||
high = (ctx->total[0] >> 29) | (ctx->total[1] << 3);
|
||||
low = (ctx->total[0] << 3);
|
||||
|
||||
PUT_UINT32(high, msglen, 0);
|
||||
PUT_UINT32(low, msglen, 4);
|
||||
|
||||
last = ctx->total[0] & 0x3F;
|
||||
padn = (last < 56) ? (56 - last) : (120 - last);
|
||||
|
||||
memset(padding, 0, sizeof(padding));
|
||||
padding[0] = 0x80;
|
||||
|
||||
sha1_update(ctx, padding, padn);
|
||||
sha1_update(ctx, msglen, 8);
|
||||
|
||||
PUT_UINT32(ctx->state[0], digest, 0);
|
||||
PUT_UINT32(ctx->state[1], digest, 4);
|
||||
PUT_UINT32(ctx->state[2], digest, 8);
|
||||
PUT_UINT32(ctx->state[3], digest, 12);
|
||||
PUT_UINT32(ctx->state[4], digest, 16);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
44
MediaClient/MediaClient/bm/sha1.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef _SHA1_H_
|
||||
#define _SHA1_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 total[2];
|
||||
uint32 state[5];
|
||||
uint8 buffer[64];
|
||||
} sha1_context;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API void sha1_starts(sha1_context * ctx);
|
||||
HT_API void sha1_update(sha1_context * ctx, uint8 * input, uint32 length);
|
||||
HT_API void sha1_finish(sha1_context * ctx, uint8 digest[20]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _SHA1_H_
|
||||
|
||||
|
||||
262
MediaClient/MediaClient/bm/sha256.cpp
Normal file
@@ -0,0 +1,262 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "sha256.h"
|
||||
|
||||
|
||||
#define GET_UINT32(n,b,i) \
|
||||
{ \
|
||||
(n) = ( (uint32) (b)[(i) ] << 24 ) \
|
||||
| ( (uint32) (b)[(i) + 1] << 16 ) \
|
||||
| ( (uint32) (b)[(i) + 2] << 8 ) \
|
||||
| ( (uint32) (b)[(i) + 3] ); \
|
||||
}
|
||||
|
||||
#define PUT_UINT32(n,b,i) \
|
||||
{ \
|
||||
(b)[(i) ] = (uint8) ( (n) >> 24 ); \
|
||||
(b)[(i) + 1] = (uint8) ( (n) >> 16 ); \
|
||||
(b)[(i) + 2] = (uint8) ( (n) >> 8 ); \
|
||||
(b)[(i) + 3] = (uint8) ( (n) ); \
|
||||
}
|
||||
|
||||
HT_API void sha256_starts(sha256_context *ctx)
|
||||
{
|
||||
ctx->total[0] = 0;
|
||||
ctx->total[1] = 0;
|
||||
|
||||
ctx->state[0] = 0x6A09E667;
|
||||
ctx->state[1] = 0xBB67AE85;
|
||||
ctx->state[2] = 0x3C6EF372;
|
||||
ctx->state[3] = 0xA54FF53A;
|
||||
ctx->state[4] = 0x510E527F;
|
||||
ctx->state[5] = 0x9B05688C;
|
||||
ctx->state[6] = 0x1F83D9AB;
|
||||
ctx->state[7] = 0x5BE0CD19;
|
||||
}
|
||||
|
||||
void sha256_process(sha256_context *ctx, uint8 data[64])
|
||||
{
|
||||
uint32 temp1, temp2, W[64];
|
||||
uint32 A, B, C, D, E, F, G, H;
|
||||
|
||||
GET_UINT32( W[0], data, 0 );
|
||||
GET_UINT32( W[1], data, 4 );
|
||||
GET_UINT32( W[2], data, 8 );
|
||||
GET_UINT32( W[3], data, 12 );
|
||||
GET_UINT32( W[4], data, 16 );
|
||||
GET_UINT32( W[5], data, 20 );
|
||||
GET_UINT32( W[6], data, 24 );
|
||||
GET_UINT32( W[7], data, 28 );
|
||||
GET_UINT32( W[8], data, 32 );
|
||||
GET_UINT32( W[9], data, 36 );
|
||||
GET_UINT32( W[10], data, 40 );
|
||||
GET_UINT32( W[11], data, 44 );
|
||||
GET_UINT32( W[12], data, 48 );
|
||||
GET_UINT32( W[13], data, 52 );
|
||||
GET_UINT32( W[14], data, 56 );
|
||||
GET_UINT32( W[15], data, 60 );
|
||||
|
||||
#define SHR(x,n) ((x & 0xFFFFFFFF) >> n)
|
||||
#define ROTR(x,n) (SHR(x,n) | (x << (32 - n)))
|
||||
|
||||
#define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3))
|
||||
#define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10))
|
||||
|
||||
#define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))
|
||||
#define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25))
|
||||
|
||||
#define F0(x,y,z) ((x & y) | (z & (x | y)))
|
||||
#define F1(x,y,z) (z ^ (x & (y ^ z)))
|
||||
|
||||
#define R(t) \
|
||||
( \
|
||||
W[t] = S1(W[t - 2]) + W[t - 7] + \
|
||||
S0(W[t - 15]) + W[t - 16] \
|
||||
)
|
||||
|
||||
#define P(a,b,c,d,e,f,g,h,x,K) \
|
||||
{ \
|
||||
temp1 = h + S3(e) + F1(e,f,g) + K + x; \
|
||||
temp2 = S2(a) + F0(a,b,c); \
|
||||
d += temp1; h = temp1 + temp2; \
|
||||
}
|
||||
|
||||
A = ctx->state[0];
|
||||
B = ctx->state[1];
|
||||
C = ctx->state[2];
|
||||
D = ctx->state[3];
|
||||
E = ctx->state[4];
|
||||
F = ctx->state[5];
|
||||
G = ctx->state[6];
|
||||
H = ctx->state[7];
|
||||
|
||||
P( A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98 );
|
||||
P( H, A, B, C, D, E, F, G, W[ 1], 0x71374491 );
|
||||
P( G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF );
|
||||
P( F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5 );
|
||||
P( E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B );
|
||||
P( D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1 );
|
||||
P( C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4 );
|
||||
P( B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5 );
|
||||
P( A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98 );
|
||||
P( H, A, B, C, D, E, F, G, W[ 9], 0x12835B01 );
|
||||
P( G, H, A, B, C, D, E, F, W[10], 0x243185BE );
|
||||
P( F, G, H, A, B, C, D, E, W[11], 0x550C7DC3 );
|
||||
P( E, F, G, H, A, B, C, D, W[12], 0x72BE5D74 );
|
||||
P( D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE );
|
||||
P( C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7 );
|
||||
P( B, C, D, E, F, G, H, A, W[15], 0xC19BF174 );
|
||||
P( A, B, C, D, E, F, G, H, R(16), 0xE49B69C1 );
|
||||
P( H, A, B, C, D, E, F, G, R(17), 0xEFBE4786 );
|
||||
P( G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6 );
|
||||
P( F, G, H, A, B, C, D, E, R(19), 0x240CA1CC );
|
||||
P( E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F );
|
||||
P( D, E, F, G, H, A, B, C, R(21), 0x4A7484AA );
|
||||
P( C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC );
|
||||
P( B, C, D, E, F, G, H, A, R(23), 0x76F988DA );
|
||||
P( A, B, C, D, E, F, G, H, R(24), 0x983E5152 );
|
||||
P( H, A, B, C, D, E, F, G, R(25), 0xA831C66D );
|
||||
P( G, H, A, B, C, D, E, F, R(26), 0xB00327C8 );
|
||||
P( F, G, H, A, B, C, D, E, R(27), 0xBF597FC7 );
|
||||
P( E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3 );
|
||||
P( D, E, F, G, H, A, B, C, R(29), 0xD5A79147 );
|
||||
P( C, D, E, F, G, H, A, B, R(30), 0x06CA6351 );
|
||||
P( B, C, D, E, F, G, H, A, R(31), 0x14292967 );
|
||||
P( A, B, C, D, E, F, G, H, R(32), 0x27B70A85 );
|
||||
P( H, A, B, C, D, E, F, G, R(33), 0x2E1B2138 );
|
||||
P( G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC );
|
||||
P( F, G, H, A, B, C, D, E, R(35), 0x53380D13 );
|
||||
P( E, F, G, H, A, B, C, D, R(36), 0x650A7354 );
|
||||
P( D, E, F, G, H, A, B, C, R(37), 0x766A0ABB );
|
||||
P( C, D, E, F, G, H, A, B, R(38), 0x81C2C92E );
|
||||
P( B, C, D, E, F, G, H, A, R(39), 0x92722C85 );
|
||||
P( A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1 );
|
||||
P( H, A, B, C, D, E, F, G, R(41), 0xA81A664B );
|
||||
P( G, H, A, B, C, D, E, F, R(42), 0xC24B8B70 );
|
||||
P( F, G, H, A, B, C, D, E, R(43), 0xC76C51A3 );
|
||||
P( E, F, G, H, A, B, C, D, R(44), 0xD192E819 );
|
||||
P( D, E, F, G, H, A, B, C, R(45), 0xD6990624 );
|
||||
P( C, D, E, F, G, H, A, B, R(46), 0xF40E3585 );
|
||||
P( B, C, D, E, F, G, H, A, R(47), 0x106AA070 );
|
||||
P( A, B, C, D, E, F, G, H, R(48), 0x19A4C116 );
|
||||
P( H, A, B, C, D, E, F, G, R(49), 0x1E376C08 );
|
||||
P( G, H, A, B, C, D, E, F, R(50), 0x2748774C );
|
||||
P( F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5 );
|
||||
P( E, F, G, H, A, B, C, D, R(52), 0x391C0CB3 );
|
||||
P( D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A );
|
||||
P( C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F );
|
||||
P( B, C, D, E, F, G, H, A, R(55), 0x682E6FF3 );
|
||||
P( A, B, C, D, E, F, G, H, R(56), 0x748F82EE );
|
||||
P( H, A, B, C, D, E, F, G, R(57), 0x78A5636F );
|
||||
P( G, H, A, B, C, D, E, F, R(58), 0x84C87814 );
|
||||
P( F, G, H, A, B, C, D, E, R(59), 0x8CC70208 );
|
||||
P( E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA );
|
||||
P( D, E, F, G, H, A, B, C, R(61), 0xA4506CEB );
|
||||
P( C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7 );
|
||||
P( B, C, D, E, F, G, H, A, R(63), 0xC67178F2 );
|
||||
|
||||
ctx->state[0] += A;
|
||||
ctx->state[1] += B;
|
||||
ctx->state[2] += C;
|
||||
ctx->state[3] += D;
|
||||
ctx->state[4] += E;
|
||||
ctx->state[5] += F;
|
||||
ctx->state[6] += G;
|
||||
ctx->state[7] += H;
|
||||
}
|
||||
|
||||
HT_API void sha256_update(sha256_context *ctx, uint8 *input, uint32 length)
|
||||
{
|
||||
uint32 left, fill;
|
||||
|
||||
if (!length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
fill = 64 - left;
|
||||
|
||||
ctx->total[0] += length;
|
||||
ctx->total[0] &= 0xFFFFFFFF;
|
||||
|
||||
if (ctx->total[0] < length)
|
||||
{
|
||||
ctx->total[1]++;
|
||||
}
|
||||
|
||||
if (left && length >= fill)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, fill);
|
||||
sha256_process(ctx, ctx->buffer);
|
||||
length -= fill;
|
||||
input += fill;
|
||||
left = 0;
|
||||
}
|
||||
|
||||
while (length >= 64)
|
||||
{
|
||||
sha256_process(ctx, input);
|
||||
length -= 64;
|
||||
input += 64;
|
||||
}
|
||||
|
||||
if (length)
|
||||
{
|
||||
memcpy((void *) (ctx->buffer + left), (void *) input, length);
|
||||
}
|
||||
}
|
||||
|
||||
HT_API void sha256_finish(sha256_context *ctx, uint8 digest[32])
|
||||
{
|
||||
uint32 last, padn;
|
||||
uint32 high, low;
|
||||
uint8 msglen[8];
|
||||
uint8 padding[64];
|
||||
|
||||
high = (ctx->total[0] >> 29) | (ctx->total[1] << 3);
|
||||
low = (ctx->total[0] << 3);
|
||||
|
||||
PUT_UINT32(high, msglen, 0);
|
||||
PUT_UINT32(low, msglen, 4);
|
||||
|
||||
last = ctx->total[0] & 0x3F;
|
||||
padn = (last < 56) ? (56 - last) : (120 - last);
|
||||
|
||||
memset(padding, 0, sizeof(padding));
|
||||
padding[0] = 0x80;
|
||||
|
||||
sha256_update(ctx, padding, padn);
|
||||
sha256_update(ctx, msglen, 8);
|
||||
|
||||
PUT_UINT32(ctx->state[0], digest, 0);
|
||||
PUT_UINT32(ctx->state[1], digest, 4);
|
||||
PUT_UINT32(ctx->state[2], digest, 8);
|
||||
PUT_UINT32(ctx->state[3], digest, 12);
|
||||
PUT_UINT32(ctx->state[4], digest, 16);
|
||||
PUT_UINT32(ctx->state[5], digest, 20);
|
||||
PUT_UINT32(ctx->state[6], digest, 24);
|
||||
PUT_UINT32(ctx->state[7], digest, 28);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
44
MediaClient/MediaClient/bm/sha256.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef _SHA256_H_
|
||||
#define _SHA256_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 total[2];
|
||||
uint32 state[8];
|
||||
uint8 buffer[64];
|
||||
} sha256_context;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API void sha256_starts(sha256_context *ctx);
|
||||
HT_API void sha256_update(sha256_context *ctx, uint8 *input, uint32 length);
|
||||
HT_API void sha256_finish(sha256_context *ctx, uint8 digest[32]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
201
MediaClient/MediaClient/bm/sys_buf.cpp
Normal file
@@ -0,0 +1,201 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "sys_buf.h"
|
||||
/***************************************************************************************/
|
||||
PPSN_CTX * net_buf_fl = NULL;
|
||||
PPSN_CTX * hdrv_buf_fl = NULL;
|
||||
static int net_buffer_init_count = 0;
|
||||
static int hdrv_buf_init_count = 0;
|
||||
/***************************************************************************************/
|
||||
HT_API BOOL net_buf_init(int num, int size)
|
||||
{
|
||||
net_buffer_init_count++;
|
||||
if (net_buf_fl)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
net_buf_fl = pps_ctx_fl_init(num, size, TRUE);
|
||||
if (net_buf_fl == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
log_print(HT_LOG_INFO, "%s, num = %lu\r\n", __FUNCTION__, net_buf_fl->node_num);
|
||||
return TRUE;
|
||||
}
|
||||
HT_API char * net_buf_get_idle()
|
||||
{
|
||||
return (char *)pps_fl_pop(net_buf_fl);
|
||||
}
|
||||
HT_API void net_buf_free(char * rbuf)
|
||||
{
|
||||
if (rbuf == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pps_safe_node(net_buf_fl, rbuf))
|
||||
{
|
||||
pps_fl_push_tail(net_buf_fl, rbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
free(rbuf);
|
||||
}
|
||||
}
|
||||
HT_API uint32 net_buf_get_size()
|
||||
{
|
||||
if (net_buf_fl == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (net_buf_fl->unit_size - sizeof(PPSN));
|
||||
}
|
||||
HT_API uint32 net_buf_idle_num()
|
||||
{
|
||||
if (net_buf_fl == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return net_buf_fl->node_num;
|
||||
}
|
||||
HT_API void net_buf_deinit()
|
||||
{
|
||||
net_buffer_init_count--;
|
||||
if (net_buffer_init_count == 0) {
|
||||
if (net_buf_fl)
|
||||
{
|
||||
pps_fl_free(net_buf_fl);
|
||||
net_buf_fl = NULL;
|
||||
}
|
||||
}
|
||||
if (net_buffer_init_count < 0)net_buffer_init_count=0;//Reset
|
||||
}
|
||||
|
||||
HT_API BOOL hdrv_buf_init(int num)
|
||||
{
|
||||
hdrv_buf_init_count++;
|
||||
if (hdrv_buf_fl)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
hdrv_buf_fl = pps_ctx_fl_init(num, sizeof(HDRV), TRUE);
|
||||
if (hdrv_buf_fl == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
log_print(HT_LOG_INFO, "%s, num = %lu\r\n", __FUNCTION__, hdrv_buf_fl->node_num);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
HT_API void hdrv_buf_deinit()
|
||||
{
|
||||
hdrv_buf_init_count--;
|
||||
if (hdrv_buf_init_count == 0) {
|
||||
if (hdrv_buf_fl)
|
||||
{
|
||||
pps_fl_free(hdrv_buf_fl);
|
||||
hdrv_buf_fl = NULL;
|
||||
}
|
||||
}
|
||||
if (hdrv_buf_init_count < 0)hdrv_buf_init_count = 0;
|
||||
|
||||
|
||||
}
|
||||
HT_API HDRV * hdrv_buf_get_idle()
|
||||
{
|
||||
HDRV * p_ret = (HDRV *)pps_fl_pop(hdrv_buf_fl);
|
||||
|
||||
return p_ret;
|
||||
}
|
||||
HT_API void hdrv_buf_free(HDRV * pHdrv)
|
||||
{
|
||||
if (pHdrv == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pHdrv->header[0] = '\0';
|
||||
pHdrv->value_string = NULL;
|
||||
|
||||
pps_fl_push(hdrv_buf_fl, pHdrv);
|
||||
}
|
||||
HT_API uint32 hdrv_buf_idle_num()
|
||||
{
|
||||
if (NULL == hdrv_buf_fl)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return hdrv_buf_fl->node_num;
|
||||
}
|
||||
HT_API void hdrv_ctx_ul_init(PPSN_CTX * ul_ctx)
|
||||
{
|
||||
pps_ctx_ul_init_nm(hdrv_buf_fl, ul_ctx);
|
||||
}
|
||||
HT_API void hdrv_ctx_free(PPSN_CTX * p_ctx)
|
||||
{
|
||||
HDRV * p_free;
|
||||
|
||||
if (p_ctx == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
p_free = (HDRV *)pps_lookup_start(p_ctx);
|
||||
while (p_free != NULL)
|
||||
{
|
||||
HDRV * p_next = (HDRV *)pps_lookup_next(p_ctx, p_free);
|
||||
|
||||
pps_ctx_ul_del(p_ctx, p_free);
|
||||
hdrv_buf_free(p_free);
|
||||
|
||||
p_free = p_next;
|
||||
}
|
||||
pps_lookup_end(p_ctx);
|
||||
}
|
||||
HT_API BOOL sys_buf_init(int nums)
|
||||
{
|
||||
if (net_buf_init(nums, 2048) == FALSE)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, net_buf_init failed!!!\r\n", __FUNCTION__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (hdrv_buf_init(8*nums) == FALSE)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, hdrv_buf_init failed!!!\r\n", __FUNCTION__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
HT_API void sys_buf_deinit()
|
||||
{
|
||||
net_buf_deinit();
|
||||
hdrv_buf_deinit();
|
||||
}
|
||||
|
||||
|
||||
116
MediaClient/MediaClient/bm/sys_buf.h
Normal file
@@ -0,0 +1,116 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef SYS_BUF_H
|
||||
#define SYS_BUF_H
|
||||
|
||||
/***************************************************************************************/
|
||||
#define MAX_AVN 8
|
||||
#define MAX_AVDESCLEN 500
|
||||
#define MAX_USRL 64
|
||||
#define MAX_PWDL 32
|
||||
#define MAX_NUML 64
|
||||
#define MAX_UA_ALT_NUM 8
|
||||
|
||||
|
||||
/***************************************************************************************/
|
||||
typedef struct header_value
|
||||
{
|
||||
char header[32];
|
||||
char * value_string;
|
||||
} HDRV;
|
||||
|
||||
typedef struct ua_rtp_info
|
||||
{
|
||||
int rtp_cnt;
|
||||
uint32 rtp_ssrc;
|
||||
uint32 rtp_ts;
|
||||
uint8 rtp_pt;
|
||||
} UA_RTP_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* rtcp sender statistics */
|
||||
|
||||
int64 last_rtcp_ntp_time;
|
||||
int64 first_rtcp_ntp_time;
|
||||
uint32 packet_count;
|
||||
uint32 octet_count;
|
||||
uint32 last_octet_count;
|
||||
int first_packet;
|
||||
char cname[64];
|
||||
} UA_RTCP_INFO;
|
||||
|
||||
typedef struct http_digest_auth_info
|
||||
{
|
||||
char auth_name[MAX_USRL];
|
||||
char auth_pwd[64];
|
||||
char auth_uri[256];
|
||||
char auth_qop[32];
|
||||
char auth_nonce[128];
|
||||
char auth_cnonce[128];
|
||||
char auth_realm[128];
|
||||
char auth_algorithm[32];
|
||||
int auth_opaque_flag;
|
||||
char auth_opaque[128];
|
||||
int auth_nc;
|
||||
char auth_ncstr[12];
|
||||
char auth_response[100];
|
||||
} HD_AUTH_INFO;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern HT_API PPSN_CTX * hdrv_buf_fl;
|
||||
|
||||
/***********************************************************************/
|
||||
HT_API BOOL net_buf_init(int num, int size);
|
||||
HT_API void net_buf_deinit();
|
||||
|
||||
HT_API char * net_buf_get_idle();
|
||||
HT_API void net_buf_free(char * rbuf);
|
||||
HT_API uint32 net_buf_get_size();
|
||||
HT_API uint32 net_buf_idle_num();
|
||||
|
||||
/***********************************************************************/
|
||||
HT_API BOOL hdrv_buf_init(int num);
|
||||
HT_API void hdrv_buf_deinit();
|
||||
|
||||
HT_API HDRV * hdrv_buf_get_idle();
|
||||
HT_API void hdrv_buf_free(HDRV * pHdrv);
|
||||
HT_API uint32 hdrv_buf_idle_num();
|
||||
|
||||
HT_API void hdrv_ctx_ul_init(PPSN_CTX * ul_ctx);
|
||||
HT_API void hdrv_ctx_free(PPSN_CTX * p_ctx);
|
||||
|
||||
/***********************************************************************/
|
||||
HT_API BOOL sys_buf_init(int nums);
|
||||
HT_API void sys_buf_deinit();
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SYS_BUF_H
|
||||
|
||||
|
||||
|
||||
185
MediaClient/MediaClient/bm/sys_inc.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef __SYS_INC_H__
|
||||
#define __SYS_INC_H__
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define __WINDOWS_OS__ 1
|
||||
#define __LINUX_OS__ 0
|
||||
#else
|
||||
#define __WINDOWS_OS__ 0
|
||||
#define __LINUX_OS__ 1
|
||||
#endif
|
||||
|
||||
#if __WINDOWS_OS__
|
||||
#ifdef HT_EXPORTS
|
||||
#define HT_API __declspec(dllexport)
|
||||
#else
|
||||
#define HT_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifdef HT_STATIC
|
||||
#undef HT_API
|
||||
#define HT_API
|
||||
#endif
|
||||
#else
|
||||
#define HT_API
|
||||
#endif
|
||||
|
||||
/***************************************************************************************/
|
||||
//typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned char uint8;
|
||||
|
||||
/***************************************************************************************/
|
||||
#if __WINDOWS_OS__
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <process.h> /* _beginthread, _endthread */
|
||||
#include <iphlpapi.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define sleep(x) Sleep((x) * 1000)
|
||||
#define usleep(x) Sleep((x) / 1000)
|
||||
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define snprintf _snprintf
|
||||
|
||||
#define pthread_t DWORD
|
||||
|
||||
typedef __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
|
||||
#pragma comment(lib, "iphlpapi.lib")
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
|
||||
#ifndef ANDROID
|
||||
#include <sys/sem.h>
|
||||
#endif
|
||||
|
||||
#include <semaphore.h>
|
||||
#include <signal.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifndef IOS
|
||||
#include <linux/netlink.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/epoll.h>
|
||||
#endif
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
#include <dlfcn.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef IOS
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
typedef signed char BOOL;
|
||||
typedef int SOCKET;
|
||||
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define closesocket close
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
#include "sys_log.h"
|
||||
#include "ppstack.h"
|
||||
#include "word_analyse.h"
|
||||
#include "sys_buf.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API void * sys_os_create_mutex();
|
||||
HT_API void * sys_os_create_sig();
|
||||
|
||||
HT_API void sys_os_destroy_sig_mutex(void * ptr);
|
||||
|
||||
HT_API int sys_os_mutex_enter(void * p_sem);
|
||||
HT_API void sys_os_mutex_leave(void * p_sem);
|
||||
|
||||
HT_API int sys_os_sig_wait(void * p_sig);
|
||||
HT_API int sys_os_sig_wait_timeout(void * p_sig, uint32 ms);
|
||||
HT_API void sys_os_sig_sign(void * p_sig);
|
||||
|
||||
HT_API pthread_t sys_os_create_thread(void * thread_func, void * argv);
|
||||
|
||||
HT_API uint32 sys_os_get_ms();
|
||||
HT_API uint32 sys_os_get_uptime();
|
||||
HT_API char * sys_os_get_socket_error();
|
||||
HT_API int sys_os_get_socket_error_num();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SYS_INC_H__
|
||||
|
||||
|
||||
|
||||
447
MediaClient/MediaClient/bm/sys_log.cpp
Normal file
@@ -0,0 +1,447 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#include "sys_inc.h"
|
||||
#include "sys_log.h"
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
HT_LOG_CTX g_log_ctx = {
|
||||
NULL,
|
||||
NULL,
|
||||
HT_LOG_ERR, // default log level
|
||||
0,
|
||||
1024, // Maximum file size in KB
|
||||
0,
|
||||
3, // Maximum file indexes
|
||||
1, // Loop write log flag
|
||||
0
|
||||
};
|
||||
|
||||
static const char * g_log_level_str[] =
|
||||
{
|
||||
"TRACE",
|
||||
"DEBUG",
|
||||
"INFO",
|
||||
"WARN",
|
||||
"ERROR",
|
||||
"FATAL"
|
||||
};
|
||||
|
||||
/***************************************************************************************/
|
||||
|
||||
void log_get_name(const char * log_fname, char * name, int size)
|
||||
{
|
||||
const char * p;
|
||||
|
||||
p = strrchr(log_fname, '.');
|
||||
if (p)
|
||||
{
|
||||
char fname[256] = {'\0'};
|
||||
int len = p - log_fname;
|
||||
|
||||
len = (len <= size ? len : size);
|
||||
|
||||
strncpy(fname, log_fname, len);
|
||||
|
||||
p++;
|
||||
|
||||
if (*p == '\0')
|
||||
{
|
||||
p = "log";
|
||||
}
|
||||
|
||||
snprintf(name, size, "%s-%d.%s", fname, g_log_ctx.cur_idx+1, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(name, size, "%s-%d.log", log_fname, g_log_ctx.cur_idx+1);
|
||||
}
|
||||
|
||||
if (++g_log_ctx.cur_idx >= g_log_ctx.max_idx)
|
||||
{
|
||||
g_log_ctx.cur_idx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
HT_API int log_init(const char * log_fname)
|
||||
{
|
||||
char name[256] = {'\0'};
|
||||
|
||||
log_close();
|
||||
|
||||
if (g_log_ctx.rewind)
|
||||
{
|
||||
log_get_name(log_fname, name, sizeof(name)-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(name, log_fname, sizeof(name)-1);
|
||||
}
|
||||
|
||||
g_log_ctx.fp = fopen(name, "w+");
|
||||
if (g_log_ctx.fp == NULL)
|
||||
{
|
||||
printf("log init fopen[%s] failed[%s]\r\n", name, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
g_log_ctx.cur_size = 0;
|
||||
|
||||
g_log_ctx.mutex = sys_os_create_mutex();
|
||||
if (g_log_ctx.mutex == NULL)
|
||||
{
|
||||
printf("log init mutex failed[%s]\r\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!g_log_ctx.time_init)
|
||||
{
|
||||
strncpy(g_log_ctx.name, log_fname, sizeof(g_log_ctx.name)-1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HT_API int log_time_init(const char * fname_prev)
|
||||
{
|
||||
char fpath[256];
|
||||
time_t time_now = time(NULL);
|
||||
struct tm * st = localtime(&(time_now));
|
||||
|
||||
snprintf(fpath, sizeof(fpath),
|
||||
"%s-%04d%02d%02d_%02d%02d%02d.log",
|
||||
fname_prev,
|
||||
st->tm_year+1900, st->tm_mon+1, st->tm_mday,
|
||||
st->tm_hour, st->tm_min, st->tm_sec);
|
||||
|
||||
g_log_ctx.rewind = 0;
|
||||
g_log_ctx.time_init = 1;
|
||||
|
||||
strncpy(g_log_ctx.name, fname_prev, sizeof(g_log_ctx.name)-1);
|
||||
|
||||
return log_init(fpath);
|
||||
}
|
||||
|
||||
HT_API int log_reinit(const char * log_fname)
|
||||
{
|
||||
int ret = 0;
|
||||
char name[256] = {'\0'};
|
||||
|
||||
sys_os_mutex_enter(g_log_ctx.mutex);
|
||||
|
||||
if (g_log_ctx.fp)
|
||||
{
|
||||
fclose(g_log_ctx.fp);
|
||||
g_log_ctx.fp = NULL;
|
||||
}
|
||||
|
||||
if (g_log_ctx.rewind)
|
||||
{
|
||||
log_get_name(log_fname, name, sizeof(name)-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(name, log_fname, sizeof(name)-1);
|
||||
}
|
||||
|
||||
g_log_ctx.fp = fopen(name, "w+");
|
||||
if (g_log_ctx.fp == NULL)
|
||||
{
|
||||
printf("log init fopen[%s] failed[%s]\r\n", name, strerror(errno));
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
g_log_ctx.cur_size = 0;
|
||||
|
||||
if (!g_log_ctx.time_init)
|
||||
{
|
||||
strncpy(g_log_ctx.name, log_fname, sizeof(g_log_ctx.name)-1);
|
||||
}
|
||||
|
||||
sys_os_mutex_leave(g_log_ctx.mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
HT_API int log_time_reinit(const char * fname_prev)
|
||||
{
|
||||
char fpath[256];
|
||||
time_t time_now = time(NULL);
|
||||
struct tm * st = localtime(&(time_now));
|
||||
|
||||
snprintf(fpath, sizeof(fpath),
|
||||
"%s-%04d%02d%02d_%02d%02d%02d.log",
|
||||
fname_prev,
|
||||
st->tm_year+1900, st->tm_mon+1, st->tm_mday,
|
||||
st->tm_hour, st->tm_min, st->tm_sec);
|
||||
|
||||
g_log_ctx.rewind = 0;
|
||||
g_log_ctx.time_init = 1;
|
||||
|
||||
strncpy(g_log_ctx.name, fname_prev, sizeof(g_log_ctx.name)-1);
|
||||
|
||||
return log_reinit(fpath);
|
||||
}
|
||||
|
||||
HT_API void log_close()
|
||||
{
|
||||
sys_os_mutex_enter(g_log_ctx.mutex);
|
||||
|
||||
if (g_log_ctx.fp)
|
||||
{
|
||||
fclose(g_log_ctx.fp);
|
||||
g_log_ctx.fp = NULL;
|
||||
}
|
||||
|
||||
sys_os_mutex_leave(g_log_ctx.mutex);
|
||||
|
||||
if (g_log_ctx.mutex)
|
||||
{
|
||||
sys_os_destroy_sig_mutex(g_log_ctx.mutex);
|
||||
g_log_ctx.mutex = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void log_switch()
|
||||
{
|
||||
if (g_log_ctx.cur_size >= g_log_ctx.max_size * 1024)
|
||||
{
|
||||
if (g_log_ctx.time_init)
|
||||
{
|
||||
log_time_reinit(g_log_ctx.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_reinit(g_log_ctx.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int log_print_ex(int level, const char *fmt, va_list argptr)
|
||||
{
|
||||
int slen = 0;
|
||||
time_t time_now;
|
||||
struct tm * st;
|
||||
|
||||
if (g_log_ctx.fp == NULL || g_log_ctx.mutex == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
time_now = time(NULL);
|
||||
st = localtime(&(time_now));
|
||||
|
||||
sys_os_mutex_enter(g_log_ctx.mutex);
|
||||
|
||||
if (g_log_ctx.fp)
|
||||
{
|
||||
slen = fprintf(g_log_ctx.fp,
|
||||
"[%04d-%02d-%02d %02d:%02d:%02d] : [%s] ",
|
||||
st->tm_year+1900, st->tm_mon+1, st->tm_mday,
|
||||
st->tm_hour, st->tm_min, st->tm_sec,
|
||||
g_log_level_str[level]);
|
||||
|
||||
if (slen > 0)
|
||||
{
|
||||
g_log_ctx.cur_size += slen;
|
||||
}
|
||||
|
||||
slen = vfprintf(g_log_ctx.fp, fmt, argptr);
|
||||
fflush(g_log_ctx.fp);
|
||||
|
||||
if (slen > 0)
|
||||
{
|
||||
g_log_ctx.cur_size += slen;
|
||||
}
|
||||
}
|
||||
|
||||
sys_os_mutex_leave(g_log_ctx.mutex);
|
||||
|
||||
log_switch();
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
#ifndef IOS
|
||||
|
||||
HT_API int log_print(int level, const char * fmt,...)
|
||||
{
|
||||
if (level < g_log_ctx.level || level > HT_LOG_FATAL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int slen;
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, fmt);
|
||||
|
||||
slen = log_print_ex(level, fmt, argptr);
|
||||
|
||||
va_end(argptr);
|
||||
|
||||
return slen;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
HT_API int log_ios_print(int level, const char * fmt,...)
|
||||
{
|
||||
if (level < g_log_ctx.level || level > HT_LOG_FATAL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int slen;
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, fmt);
|
||||
|
||||
slen = log_print_ex(level, fmt, argptr);
|
||||
|
||||
va_end(argptr);
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int log_lock_print_ex(const char *fmt, va_list argptr)
|
||||
{
|
||||
int slen;
|
||||
|
||||
if (g_log_ctx.fp == NULL || g_log_ctx.mutex == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
slen = vfprintf(g_log_ctx.fp, fmt, argptr);
|
||||
|
||||
fflush(g_log_ctx.fp);
|
||||
|
||||
if (slen > 0)
|
||||
{
|
||||
g_log_ctx.cur_size += slen;
|
||||
}
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
HT_API int log_lock_start(const char * fmt,...)
|
||||
{
|
||||
int slen = 0;
|
||||
va_list argptr;
|
||||
|
||||
if (g_log_ctx.fp == NULL || g_log_ctx.mutex == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
va_start(argptr,fmt);
|
||||
|
||||
sys_os_mutex_enter(g_log_ctx.mutex);
|
||||
|
||||
slen = log_lock_print_ex(fmt,argptr);
|
||||
|
||||
va_end(argptr);
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
HT_API int log_lock_print(const char * fmt,...)
|
||||
{
|
||||
int slen;
|
||||
|
||||
va_list argptr;
|
||||
va_start(argptr,fmt);
|
||||
|
||||
slen = log_lock_print_ex(fmt, argptr);
|
||||
|
||||
va_end(argptr);
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
HT_API int log_lock_end(const char * fmt,...)
|
||||
{
|
||||
int slen;
|
||||
|
||||
va_list argptr;
|
||||
va_start(argptr,fmt);
|
||||
|
||||
slen = log_lock_print_ex(fmt, argptr);
|
||||
|
||||
va_end(argptr);
|
||||
|
||||
sys_os_mutex_leave(g_log_ctx.mutex);
|
||||
|
||||
log_switch();
|
||||
|
||||
return slen;
|
||||
}
|
||||
|
||||
HT_API void log_set_level(int level)
|
||||
{
|
||||
g_log_ctx.level = level;
|
||||
}
|
||||
|
||||
HT_API int log_get_level()
|
||||
{
|
||||
return g_log_ctx.level;
|
||||
}
|
||||
|
||||
HT_API void log_set_rewind(int rewind)
|
||||
{
|
||||
g_log_ctx.rewind = rewind;
|
||||
}
|
||||
|
||||
HT_API int log_get_rewind()
|
||||
{
|
||||
return g_log_ctx.rewind;
|
||||
}
|
||||
|
||||
HT_API void log_set_max_size(int max_size)
|
||||
{
|
||||
g_log_ctx.max_size = max_size;
|
||||
}
|
||||
|
||||
HT_API int log_get_max_size()
|
||||
{
|
||||
return g_log_ctx.max_size;
|
||||
}
|
||||
|
||||
HT_API void log_set_max_idx(int max_idx)
|
||||
{
|
||||
g_log_ctx.max_idx = max_idx;
|
||||
}
|
||||
|
||||
HT_API int log_get_max_idx()
|
||||
{
|
||||
return g_log_ctx.max_idx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
81
MediaClient/MediaClient/bm/sys_log.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef __H_SYS_LOG_H__
|
||||
#define __H_SYS_LOG_H__
|
||||
|
||||
// log level
|
||||
|
||||
#define HT_LOG_TRC 0
|
||||
#define HT_LOG_DBG 1
|
||||
#define HT_LOG_INFO 2
|
||||
#define HT_LOG_WARN 3
|
||||
#define HT_LOG_ERR 4
|
||||
#define HT_LOG_FATAL 5
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FILE * fp; // Log file pointer
|
||||
void * mutex; // read-write lock
|
||||
int level; // Log level
|
||||
uint32 cur_size; // The current write length of the log
|
||||
uint32 max_size; // Maximum file size in KB
|
||||
int cur_idx; // Current log file index
|
||||
int max_idx; // Maximum file indexes
|
||||
int rewind; // Loop write log flag
|
||||
int time_init; // Initialize log file names using system time
|
||||
char name[256]; // Log file name
|
||||
} HT_LOG_CTX;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HT_API int log_init(const char * log_fname);
|
||||
HT_API int log_time_init(const char * fname_prev);
|
||||
HT_API int log_reinit(const char * log_fname);
|
||||
HT_API int log_time_reinit(const char * fname_prev);
|
||||
HT_API void log_close();
|
||||
HT_API void log_set_level(int level);
|
||||
HT_API int log_get_level();
|
||||
HT_API void log_set_rewind(int rewind);
|
||||
HT_API int log_get_rewind();
|
||||
HT_API void log_set_max_size(int max_size);
|
||||
HT_API int log_get_max_size();
|
||||
HT_API void log_set_max_idx(int max_idx);
|
||||
HT_API int log_get_max_idx();
|
||||
HT_API int log_lock_start(const char * fmt,...);
|
||||
HT_API int log_lock_print(const char * fmt,...);
|
||||
HT_API int log_lock_end(const char * fmt,...);
|
||||
|
||||
#ifdef IOS
|
||||
HT_API int log_ios_print(int level, const char * fmt,...);
|
||||
#define log_print log_ios_print
|
||||
#else
|
||||
HT_API int log_print(int level, const char * fmt,...);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
448
MediaClient/MediaClient/bm/sys_os.cpp
Normal file
@@ -0,0 +1,448 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
/***************************************************************************************/
|
||||
#include "sys_inc.h"
|
||||
|
||||
|
||||
/***************************************************************************************/
|
||||
HT_API void * sys_os_create_mutex()
|
||||
{
|
||||
void * p_mutex = NULL;
|
||||
|
||||
#ifdef IOS
|
||||
|
||||
static int index = 0;
|
||||
char name[32] = {'\0'};
|
||||
snprintf(name, sizeof(name), "testmutex%u", (uint32)time(NULL)+index++);
|
||||
|
||||
p_mutex = sem_open(name, O_CREAT, 0644, 1);
|
||||
if (p_mutex == SEM_FAILED)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, sem_open failed. name=%s\r\n", __FUNCTION__, name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
p_mutex = CreateMutex(NULL, FALSE, NULL);
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
int ret;
|
||||
|
||||
p_mutex = (sem_t *)malloc(sizeof(sem_t));
|
||||
ret = sem_init((sem_t *)p_mutex, 0, 1);
|
||||
if (ret != 0)
|
||||
{
|
||||
free(p_mutex);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return p_mutex;
|
||||
}
|
||||
|
||||
HT_API void * sys_os_create_sig()
|
||||
{
|
||||
void * p_sig = NULL;
|
||||
|
||||
#ifdef IOS
|
||||
|
||||
static int index = 0;
|
||||
char name[32] = {'\0'};
|
||||
snprintf(name, sizeof(name), "testsig%u", (uint32)time(NULL)+index++);
|
||||
|
||||
p_sig = sem_open(name, O_CREAT, 0644, 1);
|
||||
if (p_sig == SEM_FAILED)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, sem_open failed. name=%s\r\n", __FUNCTION__, name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
p_sig = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
int ret;
|
||||
|
||||
p_sig = malloc(sizeof(sem_t));
|
||||
ret = sem_init((sem_t *)p_sig, 0, 0);
|
||||
if (ret != 0)
|
||||
{
|
||||
free(p_sig);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return p_sig;
|
||||
}
|
||||
|
||||
HT_API void sys_os_destroy_sig_mutex(void * ptr)
|
||||
{
|
||||
if (ptr == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef IOS
|
||||
|
||||
sem_close((sem_t *)ptr);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
CloseHandle(ptr);
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
sem_destroy((sem_t *)ptr);
|
||||
free(ptr);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
HT_API int sys_os_mutex_enter(void * p_sem)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (p_sem == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
ret = sem_wait((sem_t *)p_sem);
|
||||
if (ret != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
ret = WaitForSingleObject(p_sem, INFINITE);
|
||||
if (ret == WAIT_FAILED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HT_API void sys_os_mutex_leave(void * p_sem)
|
||||
{
|
||||
if (p_sem == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
sem_post((sem_t *)p_sem);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
ReleaseMutex(p_sem);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
HT_API int sys_os_sig_wait(void * p_sig)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (p_sig == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
ret = sem_wait((sem_t *)p_sig);
|
||||
if (ret != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
ret = WaitForSingleObject(p_sig, INFINITE);
|
||||
if (ret == WAIT_FAILED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HT_API int sys_os_sig_wait_timeout(void * p_sig, uint32 ms)
|
||||
{
|
||||
#ifdef IOS
|
||||
|
||||
if (p_sig == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (ms > 0)
|
||||
{
|
||||
if (sem_trywait((sem_t *)p_sig) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
usleep(1000);
|
||||
|
||||
ms -= 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
int ret;
|
||||
struct timespec ts;
|
||||
struct timeval tt;
|
||||
|
||||
if (p_sig == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
gettimeofday(&tt,NULL);
|
||||
|
||||
tt.tv_sec = tt.tv_sec + ms / 1000;
|
||||
tt.tv_usec = tt.tv_usec + (ms % 1000) * 1000;
|
||||
tt.tv_sec += tt.tv_usec / (1000 * 1000);
|
||||
tt.tv_usec = tt.tv_usec % (1000 * 1000);
|
||||
|
||||
ts.tv_sec = tt.tv_sec;
|
||||
ts.tv_nsec = tt.tv_usec * 1000;
|
||||
|
||||
ret = sem_timedwait((sem_t *)p_sig, &ts);
|
||||
if (ret == -1 && errno == ETIMEDOUT)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
DWORD ret;
|
||||
|
||||
if (p_sig == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = WaitForSingleObject(p_sig, ms);
|
||||
if (ret == WAIT_FAILED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (ret == WAIT_TIMEOUT)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HT_API void sys_os_sig_sign(void * p_sig)
|
||||
{
|
||||
if (p_sig == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
sem_post((sem_t *)p_sig);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
SetEvent(p_sig);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
HT_API pthread_t sys_os_create_thread(void * thread_func, void * argv)
|
||||
{
|
||||
pthread_t tid = 0;
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
int ret = pthread_create(&tid, NULL, (void *(*)(void *))thread_func, argv);
|
||||
if (ret != 0)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, pthread_create failed, ret = %d\r\n", __FUNCTION__, ret);
|
||||
}
|
||||
|
||||
pthread_detach(tid);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
HANDLE hret = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread_func, argv, 0, &tid);
|
||||
if (hret == NULL || tid == 0)
|
||||
{
|
||||
log_print(HT_LOG_ERR, "%s, CreateThread hret=%u, tid=%u, err=%u\r\n", __FUNCTION__, hret, tid, GetLastError());
|
||||
}
|
||||
|
||||
CloseHandle(hret);
|
||||
|
||||
#endif
|
||||
|
||||
return tid;
|
||||
}
|
||||
|
||||
HT_API uint32 sys_os_get_ms()
|
||||
{
|
||||
uint32 ms = 0;
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
ms = tv.tv_sec * 1000 + tv.tv_usec/1000;
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
ms = GetTickCount();
|
||||
|
||||
#endif
|
||||
|
||||
return ms;
|
||||
}
|
||||
|
||||
HT_API uint32 sys_os_get_uptime()
|
||||
{
|
||||
uint32 upt = 0;
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
upt = (uint32)time(NULL);
|
||||
|
||||
#elif __LINUX_OS__
|
||||
|
||||
int rlen;
|
||||
char bufs[512];
|
||||
char * ptr;
|
||||
FILE * file;
|
||||
|
||||
file = fopen("/proc/uptime", "rb");
|
||||
if (NULL == file)
|
||||
{
|
||||
return (uint32)time(NULL);
|
||||
}
|
||||
|
||||
rlen = fread(bufs, 1, sizeof(bufs)-1, file);
|
||||
fclose(file);
|
||||
|
||||
if (rlen <= 0)
|
||||
{
|
||||
return (uint32)time(NULL);
|
||||
}
|
||||
|
||||
bufs[rlen] = '\0';
|
||||
ptr = bufs;
|
||||
|
||||
while (*ptr != '\0' && *ptr != ' ' && *ptr != '\r' && *ptr != '\n')
|
||||
{
|
||||
ptr++;
|
||||
}
|
||||
|
||||
if (*ptr == ' ')
|
||||
{
|
||||
*ptr = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
return (uint32)time(NULL);
|
||||
}
|
||||
|
||||
upt = (uint32)strtod(bufs, NULL);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
LARGE_INTEGER freq;
|
||||
LARGE_INTEGER cur;
|
||||
|
||||
QueryPerformanceFrequency(&freq);
|
||||
QueryPerformanceCounter(&cur);
|
||||
|
||||
upt = (uint32) (cur.QuadPart / freq.QuadPart);
|
||||
|
||||
#endif
|
||||
|
||||
return upt;
|
||||
}
|
||||
|
||||
HT_API char * sys_os_get_socket_error()
|
||||
{
|
||||
char * p_estr = NULL;
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
p_estr = strerror(errno);
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
int err = WSAGetLastError();
|
||||
static char err_buf[24];
|
||||
snprintf(err_buf, sizeof(err_buf), "WSAE-%d", err);
|
||||
p_estr = err_buf;
|
||||
|
||||
#endif
|
||||
|
||||
return p_estr;
|
||||
}
|
||||
|
||||
HT_API int sys_os_get_socket_error_num()
|
||||
{
|
||||
int sockerr;
|
||||
|
||||
#if __LINUX_OS__
|
||||
|
||||
sockerr = errno;
|
||||
|
||||
#elif __WINDOWS_OS__
|
||||
|
||||
sockerr = WSAGetLastError();
|
||||
|
||||
#endif
|
||||
|
||||
return sockerr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1687
MediaClient/MediaClient/bm/util.cpp
Normal file
94
MediaClient/MediaClient/bm/util.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/***************************************************************************************
|
||||
*
|
||||
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
||||
*
|
||||
* Redistribution and use in binary forms, with or without modification, are permitted.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed
|
||||
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef __H_UTIL_H__
|
||||
#define __H_UTIL_H__
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#define ARRAY_SIZE(ary) (sizeof(ary) / sizeof(ary[0]))
|
||||
|
||||
/*************************************************************************/
|
||||
HT_API int get_if_nums();
|
||||
HT_API uint32 get_if_ip(int index);
|
||||
HT_API uint32 get_route_if_ip(uint32 dst_ip);
|
||||
HT_API uint32 get_default_if_ip();
|
||||
HT_API const char * get_local_ip();
|
||||
HT_API uint32 get_if_mask(int index);
|
||||
HT_API uint32 get_route_if_mask(uint32 dst_ip);
|
||||
HT_API uint32 get_default_if_mask();
|
||||
HT_API int is_local_if_net(uint32 destip);
|
||||
HT_API int get_default_if_mac(uint8 * mac);
|
||||
HT_API uint32 get_address_by_name(const char * host_name);
|
||||
HT_API const char * get_default_gateway();
|
||||
HT_API const char * get_dns_server();
|
||||
HT_API const char * get_mask_by_prefix_len(int len);
|
||||
HT_API int get_prefix_len_by_mask(const char * mask);
|
||||
HT_API const char * get_ip_str(uint32 ipaddr /* network byte order */);
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
HT_API char * lowercase(char * str);
|
||||
HT_API char * uppercase(char * str);
|
||||
HT_API int unicode(char ** dst, char * src);
|
||||
|
||||
HT_API BOOL bin_to_hex_str(uint8 * bin, int binlen, char * hex, int hexlen);
|
||||
HT_API int hex_str_to_bin(char * hex, int hexlen, uint8 * bin, int binlen);
|
||||
|
||||
HT_API int url_encode(const char * src, const int srcsize, char * dst, const int dstsize);
|
||||
HT_API int url_decode(char * dst, char const * src, uint32 len);
|
||||
HT_API void url_split(char const* url, char *proto, int proto_size, char *user, int user_size, char *pass, int pass_size, char *host, int host_size, int *port, char *path, int path_size);
|
||||
|
||||
/*************************************************************************/
|
||||
HT_API time_t get_time_by_string(char * p_time_str);
|
||||
HT_API void get_time_str(char * buff, int len);
|
||||
HT_API void get_time_str_day_off(time_t nt, char * buff, int len, int dayoff);
|
||||
HT_API void get_time_str_mon_off(time_t nt, char * buff, int len, int moffset);
|
||||
HT_API time_t get_time_by_tstring(const char * p_time_str);
|
||||
HT_API void get_tstring_by_time(time_t t, char * buff, int len);
|
||||
|
||||
HT_API SOCKET tcp_connect_timeout(uint32 rip, int port, int timeout);
|
||||
|
||||
/*************************************************************************/
|
||||
HT_API void network_init();
|
||||
HT_API void network_deinit();
|
||||
HT_API int daemon_init();
|
||||
|
||||
#if __WINDOWS_OS__
|
||||
HT_API int gettimeofday(struct timeval* tp, int* tz);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __H_UTIL_H__
|
||||
|
||||
|
||||
|
||||