Skip to content

Commit

Permalink
修复linux编译及key的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jinlong0813 committed May 26, 2017
1 parent c823d15 commit cdc8fda
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 36 deletions.
2 changes: 0 additions & 2 deletions Buildit
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ build()
make -f nbproject/Makefile-arm.mk QMAKE= SUBPROJECTS= .build-conf
elif [ "$1" = "x64" ] ; then
make -f nbproject/Makefile-x64.mk QMAKE= SUBPROJECTS= .build-conf
elif [ "$1" = "debug" ] ; then
make -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
elif [ "$1" = "i386" ] ; then
make -f nbproject/Makefile-i386.mk QMAKE= SUBPROJECTS= .build-conf
else
Expand Down
15 changes: 9 additions & 6 deletions EasyPusher_File/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@
#include "trace.h"
#include <stdio.h>

/*
*本Key为3个月临时授权License,如需商业使用,请邮件至[email protected]咨询商业授权方案。
*/
#ifdef _WIN32
#include "getopt.h"
#define KEY "6A34714D6C3469576B5A754158357059703257674A65784659584E355548567A6147567958305A4A544555755A58686C567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#define KEY "6A36334A743469576B5A73416343645A707469507065746C6432466B5A6D466D646D526E5A6D526E636E4E6B5A6D526E63694E58444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#elif defined _ARM
#define KEY "6A36334A742F2B2B72624B41594C6459703069664A667868636D3158444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define KEY "6A36334A742F2B2B726249416343645A7074695070653168636D317764584E6F5A584A6D5957527A5A6D566D65474F45567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#include "unistd.h"
#include <signal.h>
#else //x86 linux
#include "unistd.h"
#include <signal.h>
#define KEY "6A34714D6C3469576B5A754158357059703257674A66426C59584E356348567A6147567958325A7062475658444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define KEY "6A36334A74354F576B596F416343645A7074695070664E325A47646E656E5A6C5A336836646D4F2B567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#endif

char* ConfigIP = "127.0.0.1"; //Default EasyDarwin Address 183.220.236.189
char* ConfigIP = "www.easydarwin.org"; //Default EasyDarwin Address 183.220.236.189
char* ConfigPort= "554"; //Default EasyDarwin Port121.40.50.44
char* ConfigName= "easypusher_file.sdp"; //Default RTSP Push StreamName
char* ConfigName= "easypusher_file_linux.sdp"; //Default RTSP Push StreamName
char* ProgName; //Program Name

int __EasyPusher_Callback(int _id, EASY_PUSH_STATE_T _state, EASY_AV_Frame *_frame, void *_userptr)
Expand Down Expand Up @@ -100,7 +103,7 @@ int main(int argc, char * argv[])
mediainfo.u32VideoCodec = EASY_SDK_VIDEO_CODEC_H264;
mediainfo.u32VideoFps = 25;

fES = fopen("./EasyPusher.264", "rb");
fES = fopen("./EasyDarwin.264", "rb");
if (NULL == fES) return 0;

isActivated = EasyPusher_Activate(KEY);
Expand Down
4 changes: 2 additions & 2 deletions EasyPusher_File/nbproject/Makefile-i386.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ FFLAGS=
ASFLAGS=

# Link Libraries and Options
LDLIBSOPTIONS=-L../Lib
LDLIBSOPTIONS=-L../Lib/i386

# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
Expand All @@ -62,7 +62,7 @@ LDLIBSOPTIONS=-L../Lib
${MKDIR} -p ../${CND_CONF}
${LINK.c} -o ../${CND_CONF}/easypusher_file ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -lpthread

${OBJECTDIR}/main.o: main.c
${OBJECTDIR}/main.o: main.c
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.c) -O2 -I../Include -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.c
Expand Down
2 changes: 1 addition & 1 deletion EasyPusher_File/nbproject/Makefile-x64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ LDLIBSOPTIONS=-L../Lib/x64
${MKDIR} -p ../${CND_CONF}
${LINK.c} -o ../${CND_CONF}/easypusher_file ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -lpthread

${OBJECTDIR}/main.o: main.c
${OBJECTDIR}/main.o: main.c
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.c) -O2 -I../Include -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.c
Expand Down
Binary file modified EasyPusher_RTSP/libEasyRTSPClient/Lib/i386/libeasyrtspclient.a
Binary file not shown.
Binary file modified EasyPusher_RTSP/libEasyRTSPClient/Lib/x64/libeasyrtspclient.a
Binary file not shown.
16 changes: 10 additions & 6 deletions EasyPusher_RTSP/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*
*本Key为3个月临时授权License,如需商业使用,请邮件至[email protected]咨询商业授权方案。
*/
#ifdef _WIN32
#define KEY "6A36334A743469576B5A754142665259707776364A65784659584E355548567A6147567958305A4A544555755A58686C567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#define EasyRTSPClient_KEY "79393674363469576B5A754142665259707776364A65784659584E355548567A6147567958314A55553141755A58686C567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#define KEY "6A36334A743469576B5A73416343645A707469507065746C6432466B5A6D466D646D526E5A6D526E636E4E6B5A6D526E63694E58444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define EasyRTSPClient_KEY "79393674363469576B5A73416343645A707469507065784659584E355548567A6147567958314A55553141755A58686C567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#include "getopt.h"
#elif defined _ARM
#define KEY "6A36334A742F2B2B7262494174504A597077314C7066426C59584E355548567A6147567958325A7062475658444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define EasyRTSPClient_KEY "79393674362F2B2B72624B4142665259707776364A66426C59584E356348567A6147567958334A3063334258444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define KEY "6A36334A742F2B2B726249416343645A7074695070653168636D317764584E6F5A584A6D5957527A5A6D566D65474F45567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#define EasyRTSPClient_KEY "79393674362F2B2B726249416343645A707469507066426C59584E356348567A6147567958334A3063334258444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#include "unistd.h"
#include <signal.h>
#else //x86 linux
#define KEY "6A36334A74354F576B59714142665259707776364A66424659584E355548567A6147567958325A7062475658444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define EasyRTSPClient_KEY "7939367436354F576B596F4174504A597077314C7066426C59584E356348567A6147567958334A3063334258444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define KEY "6A36334A74354F576B596F416343645A7074695070664E325A47646E656E5A6C5A336836646D4F2B567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#define EasyRTSPClient_KEY "7939367436354F576B596F416343645A707469507066426C59584E356348567A6147567958334A3063334258444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#include "unistd.h"
#include <signal.h>
#endif
Expand Down
6 changes: 3 additions & 3 deletions EasyPusher_RTSP/nbproject/Makefile-i386.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ FFLAGS=
ASFLAGS=

# Link Libraries and Options
LDLIBSOPTIONS=-LlibEasyRTSPClient/Lib -L../Lib
LDLIBSOPTIONS=-LlibEasyRTSPClient/Lib/${CND_CONF} -L../Lib/${CND_CONF}

# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
"${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ../${CND_CONF}/easypusher_rtsp

../${CND_CONF}/easypusher_rtsp: ${OBJECTFILES}
${MKDIR} -p ../${CND_CONF}
${LINK.cc} -o ../${CND_CONF}/easypusher_rtsp ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -leasyrtspclient -lpthread
${LINK.cc} -o ../${CND_CONF}/easypusher_rtsp ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -leasyrtspclient -lpthread -lrt

${OBJECTDIR}/main.o: main.cpp
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -IlibEasyRTSPClient/Include -I../Include -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
Expand Down
4 changes: 2 additions & 2 deletions EasyPusher_RTSP/nbproject/Makefile-x64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ LDLIBSOPTIONS=-LlibEasyRTSPClient/Lib/x64 -L../Lib/x64

../${CND_CONF}/easypusher_rtsp: ${OBJECTFILES}
${MKDIR} -p ../${CND_CONF}
${LINK.cc} -o ../${CND_CONF}/easypusher_rtsp ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -leasyrtspclient -lpthread
${LINK.cc} -o ../${CND_CONF}/easypusher_rtsp ${OBJECTFILES} ${LDLIBSOPTIONS} -leasypusher -leasyrtspclient -lpthread -lrt

${OBJECTDIR}/main.o: main.cpp
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -IlibEasyRTSPClient/Include -I../Include -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
Expand Down
10 changes: 5 additions & 5 deletions EasyPusher_RTSP/nbproject/configurations.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="97">
<configurationDescriptor version="100">
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
<logicalFolder name="HeaderFiles" displayName="头文件" projectFiles="true">
</logicalFolder>
Expand Down Expand Up @@ -74,10 +74,10 @@
<linkerTool>
<output>../${CND_CONF}/easypusher_rtsp</output>
<linkerAddLib>
<pElem>libEasyRTSPClient/Lib</pElem>
<pElem>../Lib</pElem>
<pElem>libEasyRTSPClient/Lib/${CND_CONF}</pElem>
<pElem>../Lib/${CND_CONF}</pElem>
</linkerAddLib>
<commandLine>-leasypusher -leasyrtspclient -lpthread</commandLine>
<commandLine>-leasypusher -leasyrtspclient -lpthread -lrt</commandLine>
</linkerTool>
</compileType>
<item path="main.cpp" ex="false" tool="1" flavor2="0">
Expand Down Expand Up @@ -116,7 +116,7 @@
<pElem>libEasyRTSPClient/Lib/x64</pElem>
<pElem>../Lib/x64</pElem>
</linkerAddLib>
<commandLine>-leasypusher -leasyrtspclient -lpthread</commandLine>
<commandLine>-leasypusher -leasyrtspclient -lpthread -lrt</commandLine>
</linkerTool>
</compileType>
<item path="main.cpp" ex="false" tool="1" flavor2="9">
Expand Down
11 changes: 7 additions & 4 deletions EasyPusher_SDK/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
#include <stdio.h>
#include <string.h>
#include "EasyPusherAPI.h"
/*
*本Key为3个月临时授权License,如需商业使用,请邮件至[email protected]咨询商业授权方案。
*/
#ifdef _WIN32
#define KEY "6A36334A743469576B5A754142665259707776364A65784659584E355548567A6147567958305A4A544555755A58686C567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#include "getopt.h"
#elif define _ARM
#define KEY "6A36334A742F2B2B7262494174504A597077314C7066426C59584E355548567A6147567958325A7062475658444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#define KEY "6A36334A743469576B5A73416343645A707469507065746C6432466B5A6D466D646D526E5A6D526E636E4E6B5A6D526E63694E58444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#elif defined _ARM
#define KEY "6A36334A742F2B2B726249416343645A7074695070653168636D317764584E6F5A584A6D5957527A5A6D566D65474F45567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#include "unistd.h"
#include <signal.h>
#else //x86 linux
#define KEY "6A36334A74354F576B59714142665259707776364A66424659584E355548567A6147567958325A7062475658444661672F365867523246326157346D516D466962334E68514449774D545A4659584E355247467964326C75564756686257566863336B3D"
#include "unistd.h"
#include <signal.h>
#define KEY "6A36334A74354F576B596F416343645A7074695070664E325A47646E656E5A6C5A336836646D4F2B567778576F502B6C34456468646D6C754A6B4A68596D397A595541794D4445325257467A65555268636E6470626C526C5957316C59584E35"
#endif
#include <stdlib.h>
#include "hi_type.h"
Expand Down
4 changes: 2 additions & 2 deletions EasyPusher_SDK/nbproject/Makefile-i386.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ FFLAGS=
ASFLAGS=

# Link Libraries and Options
LDLIBSOPTIONS=-L../Lib -LSDK/Lib
LDLIBSOPTIONS=-L../Lib/i386 -LSDK/Lib

# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
Expand All @@ -62,7 +62,7 @@ LDLIBSOPTIONS=-L../Lib -LSDK/Lib
${MKDIR} -p ../${CND_CONF}
${LINK.cc} -o ../${CND_CONF}/easypusher_sdk ${OBJECTFILES} ${LDLIBSOPTIONS} -lNetLib -leasypusher

${OBJECTDIR}/main.o: main.cpp
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -DHI_OS_LINUX -ISDK/Include -I../Include -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
Expand Down
4 changes: 2 additions & 2 deletions EasyPusher_SDK/nbproject/configurations.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="97">
<configurationDescriptor version="100">
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
<logicalFolder name="HeaderFiles" displayName="头文件" projectFiles="true">
</logicalFolder>
Expand Down Expand Up @@ -83,7 +83,7 @@
<linkerTool>
<output>../${CND_CONF}/easypusher_sdk</output>
<linkerAddLib>
<pElem>../Lib</pElem>
<pElem>../Lib/i386</pElem>
<pElem>SDK/Lib</pElem>
</linkerAddLib>
<commandLine>-lNetLib -leasypusher</commandLine>
Expand Down
2 changes: 1 addition & 1 deletion EasyPusher_Win/EasyPusher/SourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Add by SwordTwelve
#pragma once

#define EasyPusher_VersionInfo _T("Version:1.0.1.3 Powered By SwordTwelve/Gavin/Arno")
#define EasyPusher_VersionInfo _T("Version:1.3.17.0524 Powered By SwordTwelve/Gavin/Arno")

// //本地音频捕获
#include "AudioSource\DirectSound.h"
Expand Down
Binary file modified Lib/i386/libeasypusher.a
Binary file not shown.
Binary file modified Lib/x64/libeasypusher.a
Binary file not shown.

0 comments on commit cdc8fda

Please sign in to comment.