-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
23 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,10 @@ | |
*本Key为3个月临时授权License,如需商业使用,请邮件至[email protected]咨询商业授权方案。 | ||
*/ | ||
#ifdef _WIN32 | ||
#define KEY "6A36334A743469576B5A73414B735662704472563465784659584E355548567A6147567958314A55553141755A58686C567778576F502F683430566863336C4559584A33615735555A57467453584E55614756435A584E30514449774D54686C59584E35" | ||
#define EasyRTSPClient_KEY "79393674363469576B5A754165385A6270446D455965784659584E355548567A6147567958314A55553141755A58686C567778576F502F683430566863336C4559584A33615735555A57467453584E55614756435A584E30514449774D54686C59584E35" | ||
#define EasyRTSPClient_KEY "79393674363469576B5A7541725370636F3956524575784659584E355548567A6147567958314A55553141755A58686C567778576F5036533430566863336C4559584A33615735555A57467453584E55614756435A584E30514449774D54686C59584E35" | ||
#include "getopt.h" | ||
#else //linux | ||
#define KEY "6A36334A74354F576B596F416E396462704368677066426C59584E356348567A6147567958334A3063334258444661672F36586A5257467A65555268636E6470626C526C5957314A6331526F5A554A6C633352414D6A41784F47566863336B3D" | ||
#define EasyRTSPClient_KEY "7939367436354F576B596F412F4E526270437344772F426C59584E356348567A6147567958334A3063334258444661672F38506A5257467A65555268636E6470626C526C5957314A6331526F5A554A6C633352414D6A41784F47566863336B3D" | ||
#define EasyRTSPClient_KEY "79393674363469576B5A7541725370636F3956524576426C59584E356348567A6147567958334A3063334258444661672F704C6A5257467A65555268636E6470626C526C5957314A6331526F5A554A6C633352414D6A41784F47566863336B3D" | ||
#include "unistd.h" | ||
#include <signal.h> | ||
#endif | ||
|
@@ -30,8 +28,8 @@ char* ConfigName = "easypusher_rtsp.sdp";//Default Stream Name | |
char* ConfigRTSPURL = "rtsp://admin:[email protected]/22"; //RTSP Source URL(With username:password@) | ||
char* ProgName; //Program Name | ||
|
||
Easy_Pusher_Handle fPusherHandle = 0; //libEasyPusher Handle | ||
Easy_RTSP_Handle fRTSPHandle = 0; //libEasyRTSPClient Handle | ||
Easy_Handle fPusherHandle = 0; //libEasyPusher Handle | ||
Easy_Handle fRTSPHandle = 0; //libEasyRTSPClient Handle | ||
|
||
EASY_MEDIA_INFO_T* fSourceMediaInfo = NULL; | ||
|
||
|
@@ -49,7 +47,7 @@ int __EasyPusher_Callback(int _id, EASY_PUSH_STATE_T _state, EASY_AV_Frame *_fra | |
} | ||
|
||
/* EasyRTSPClient Callback */ | ||
int Easy_APICALL __RTSPSourceCallBack( int _chid, void *_chPtr, int _mediatype, char *pbuf, RTSP_FRAME_INFO *frameinfo) | ||
int Easy_APICALL __RTSPSourceCallBack( int _chid, void *_chPtr, int _mediatype, char *pbuf, EASY_FRAME_INFO *frameinfo) | ||
{ | ||
if (_mediatype == EASY_SDK_VIDEO_FRAME_FLAG) | ||
{ | ||
|
@@ -162,35 +160,6 @@ int main(int argc, char * argv[]) | |
} | ||
} | ||
|
||
isActivated = EasyPusher_Activate(KEY); | ||
switch(isActivated) | ||
{ | ||
case EASY_ACTIVATE_INVALID_KEY: | ||
printf("KEY is EASY_ACTIVATE_INVALID_KEY!\n"); | ||
break; | ||
case EASY_ACTIVATE_TIME_ERR: | ||
printf("KEY is EASY_ACTIVATE_TIME_ERR!\n"); | ||
break; | ||
case EASY_ACTIVATE_PROCESS_NAME_LEN_ERR: | ||
printf("KEY is EASY_ACTIVATE_PROCESS_NAME_LEN_ERR!\n"); | ||
break; | ||
case EASY_ACTIVATE_PROCESS_NAME_ERR: | ||
printf("KEY is EASY_ACTIVATE_PROCESS_NAME_ERR!\n"); | ||
break; | ||
case EASY_ACTIVATE_VALIDITY_PERIOD_ERR: | ||
printf("KEY is EASY_ACTIVATE_VALIDITY_PERIOD_ERR!\n"); | ||
break; | ||
case EASY_ACTIVATE_SUCCESS: | ||
printf("KEY is EASY_ACTIVATE_SUCCESS!\n"); | ||
break; | ||
} | ||
|
||
if(EASY_ACTIVATE_SUCCESS != isActivated) | ||
{ | ||
getchar(); | ||
return -1; | ||
} | ||
|
||
if(EASY_ACTIVATE_SUCCESS != EasyRTSP_Activate(EasyRTSPClient_KEY)) | ||
{ | ||
getchar(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters