Update MediaClient
This commit is contained in:
252
MediaClient/HttpMjpegTest/HttpMjpegTest.cpp
Normal file
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
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
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
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
|
||||
|
||||
Reference in New Issue
Block a user