Changeset 87
- Timestamp:
- 08/21/10 18:30:35 (18 months ago)
- Location:
- trunk
- Files:
-
- 6 added
- 21 edited
- 2 moved
-
builders/androidapplestreaming/src/org/apache/android/media/VideoViewDemo.java (modified) (2 diffs)
-
builders/netbeans/osx/applestreamingclient/nbproject/Makefile-Debug.mk (modified) (2 diffs)
-
builders/netbeans/osx/applestreamingclient/nbproject/Makefile-Release.mk (modified) (2 diffs)
-
builders/netbeans/osx/applestreamingclient/nbproject/configurations.xml (modified) (1 diff)
-
builders/netbeans/osx/thelib (modified) (1 prop)
-
builders/netbeans/osx/thelib/nbproject/Makefile-Debug.mk (modified) (8 diffs)
-
builders/netbeans/osx/thelib/nbproject/Makefile-Release.mk (modified) (8 diffs)
-
builders/netbeans/osx/thelib/nbproject/configurations.xml (modified) (5 diffs)
-
sources/androidapplestreaming/include/api.h (modified) (1 diff)
-
sources/androidapplestreaming/include/jniwrapper.h (modified) (2 diffs)
-
sources/androidapplestreaming/src/api.cpp (modified) (2 diffs)
-
sources/androidapplestreaming/src/main.cpp (modified) (3 diffs)
-
sources/applications/applestreamingclient/src/applestreamingclientapplication.cpp (modified) (2 diffs)
-
sources/applications/applestreamingclient/src/clientcontext.cpp (modified) (2 diffs)
-
sources/thelib/include/protocols/protocoltypes.h (modified) (3 diffs)
-
sources/thelib/include/protocols/rtp/connectivity/outboundconnectivity.h (modified) (1 diff)
-
sources/thelib/include/protocols/ssl (added)
-
sources/thelib/include/protocols/ssl/basesslprotocol.h (moved) (moved from trunk/sources/thelib/include/protocols/sslprotocol.h) (2 diffs)
-
sources/thelib/include/protocols/ssl/inboundsslprotocol.h (added)
-
sources/thelib/include/protocols/ssl/outboundsslprotocol.h (added)
-
sources/thelib/src/protocols/defaultprotocolfactory.cpp (modified) (4 diffs)
-
sources/thelib/src/protocols/http/basehttpprotocol.cpp (modified) (1 diff)
-
sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp (modified) (1 diff)
-
sources/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp (modified) (3 diffs)
-
sources/thelib/src/protocols/ssl (added)
-
sources/thelib/src/protocols/ssl/basesslprotocol.cpp (moved) (moved from trunk/sources/thelib/src/protocols/sslprotocol.cpp) (9 diffs)
-
sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp (added)
-
sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp (added)
-
sources/thelib/src/protocols/variant/basevariantappprotocolhandler.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/builders/androidapplestreaming/src/org/apache/android/media/VideoViewDemo.java
r85 r87 144 144 return; 145 145 146 //url="http://10.0.2.7/~shiretu/jwp/m.m3u8";147 //String key="HdnAtffj8TSZvtTRryG5xcI78w8=";148 //String sessId="playback=HTTP_CLOUD_WIRED&contentId=10804941&appAccountName=mlb&eventId=14-265607-2010-08-18&ipid=24061847&sessionKey=jhNOkzFU%2FvMTvsyP4b5l16a47W8%3D&country=us&postalCode=10292&platform=WEB_MEDIAPLAYER";146 url="http://10.0.2.1/~shiretu/jwp/m.m3u8"; 147 String key="mv/riCUfFPozkOrRbr5ddlSFozU="; 148 String sessId="playback=HTTP_CLOUD_WIRED&contentId=7320085&appAccountName=mlb&eventId=14-263849-2010-04-08&ipid=11627706&sessionKey=f8ZFssJ4sqRLYIU1VAXCxyvM5mc%3D"; 149 149 150 150 //url="http://mlbvod-akc.mlb.com/mlbam/2010/04/08/MLB_GAME_VIDEO_LANPIT_HOME_20100408/master_mobile.m3u8"; … … 152 152 //String sessId="playback=HTTP_CLOUD_WIRED&contentId=7320085&appAccountName=mlb&eventId=14-263849-2010-04-08&ipid=11627706&sessionKey=GBncPsxRBV02IC9n80RP1Sdr9ew%3D"; 153 153 154 url="http://mediadownloads.mlb.com/mlbam/2010/06/29/9505835_m3u8/128/dropf_9505835_100m_128K.m3u8"; 155 String key=""; 156 String sessId=""; 154 //url="http://mediadownloads.mlb.com/mlbam/2010/06/29/9505835_m3u8/128/dropf_9505835_100m_128K.m3u8"; 155 //String key=""; 156 //String sessId=""; 157 158 //url="http://mlbsegqa.mlb.com/mlbam/2010/08/17/MLB_GAME_VIDEO_DETNYA_HOME_20100817/master_mobile.m3u8"; 159 //String key="/AMhXX7vmDTcQrsJndNI/TEw+sM="; 160 //String sessId="playback=HTTP_CLOUD_MOBILE&contentId=10111969&appAccountName=mlb&eventId=14-265611-2010-08-18&ipid=11627706&sessionKey=f8ZFssJ4sqRLYIU1VAXCxyvM5mc%3D&deviceId=ANDROID_356698030670609&country=us&postalCode=10011&platform=ANDROID"; 157 161 158 162 Toast.makeText(getApplicationContext(), "Opening: " + url, Toast.LENGTH_LONG).show(); -
trunk/builders/netbeans/osx/applestreamingclient/nbproject/Makefile-Debug.mk
r85 r87 44 44 ${OBJECTDIR}/_ext/441423101/speedcomputer.o \ 45 45 ${OBJECTDIR}/_ext/441423101/applestreamingclient.o \ 46 ${OBJECTDIR}/_ext/1568284858/jnihelpers.o \ 46 47 ${OBJECTDIR}/_ext/413657679/masterm3u8protocol.o \ 47 48 ${OBJECTDIR}/_ext/1372129895/keyappprotocolhandler.o \ … … 139 140 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_VAR -DANDROID -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -I../../../../sources/applications/applestreamingclient/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/441423101/applestreamingclient.o ../../../../sources/applications/applestreamingclient/src/applestreamingclient.cpp 140 141 142 ${OBJECTDIR}/_ext/1568284858/jnihelpers.o: ../../../../sources/applications/applestreamingclient/src/protocols/../jnihelpers.cpp 143 ${MKDIR} -p ${OBJECTDIR}/_ext/1568284858 144 ${RM} $@.d 145 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_VAR -DANDROID -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -I../../../../sources/applications/applestreamingclient/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1568284858/jnihelpers.o ../../../../sources/applications/applestreamingclient/src/protocols/../jnihelpers.cpp 146 141 147 ${OBJECTDIR}/_ext/413657679/masterm3u8protocol.o: ../../../../sources/applications/applestreamingclient/src/protocols/m3u8/masterm3u8protocol.cpp 142 148 ${MKDIR} -p ${OBJECTDIR}/_ext/413657679 -
trunk/builders/netbeans/osx/applestreamingclient/nbproject/Makefile-Release.mk
r85 r87 44 44 ${OBJECTDIR}/_ext/441423101/speedcomputer.o \ 45 45 ${OBJECTDIR}/_ext/441423101/applestreamingclient.o \ 46 ${OBJECTDIR}/_ext/1568284858/jnihelpers.o \ 46 47 ${OBJECTDIR}/_ext/413657679/masterm3u8protocol.o \ 47 48 ${OBJECTDIR}/_ext/1372129895/keyappprotocolhandler.o \ … … 139 140 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_VAR -DANDROID -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -I../../../../sources/applications/applestreamingclient/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/441423101/applestreamingclient.o ../../../../sources/applications/applestreamingclient/src/applestreamingclient.cpp 140 141 142 ${OBJECTDIR}/_ext/1568284858/jnihelpers.o: ../../../../sources/applications/applestreamingclient/src/protocols/../jnihelpers.cpp 143 ${MKDIR} -p ${OBJECTDIR}/_ext/1568284858 144 ${RM} $@.d 145 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_VAR -DANDROID -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -I../../../../sources/applications/applestreamingclient/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1568284858/jnihelpers.o ../../../../sources/applications/applestreamingclient/src/protocols/../jnihelpers.cpp 146 141 147 ${OBJECTDIR}/_ext/413657679/masterm3u8protocol.o: ../../../../sources/applications/applestreamingclient/src/protocols/m3u8/masterm3u8protocol.cpp 142 148 ${MKDIR} -p ${OBJECTDIR}/_ext/413657679 -
trunk/builders/netbeans/osx/applestreamingclient/nbproject/configurations.xml
r85 r87 109 109 <itemPath>../../../../sources/applications/applestreamingclient/src/applestreamingclientapplication.cpp</itemPath> 110 110 <itemPath>../../../../sources/applications/applestreamingclient/src/clientcontext.cpp</itemPath> 111 <itemPath>../../../../sources/applications/applestreamingclient/src/protocols/../jnihelpers.cpp</itemPath> 111 112 <itemPath>../../../../sources/applications/applestreamingclient/src/playlist.cpp</itemPath> 112 113 <itemPath>../../../../sources/applications/applestreamingclient/src/speedcomputer.cpp</itemPath> -
trunk/builders/netbeans/osx/thelib
-
Property
svn:ignore
set to
.dep.inc
build
-
Property
svn:ignore
set to
-
trunk/builders/netbeans/osx/thelib/nbproject/Makefile-Debug.mk
r77 r87 43 43 ${OBJECTDIR}/_ext/772217591/inboundnamedpipecarrier.o \ 44 44 ${OBJECTDIR}/_ext/1215912322/innetrtpstream.o \ 45 ${OBJECTDIR}/_ext/1919749812/sslprotocol.o \46 45 ${OBJECTDIR}/_ext/517913122/pidtypes.o \ 47 46 ${OBJECTDIR}/_ext/1210522057/atomctts.o \ … … 77 76 ${OBJECTDIR}/_ext/501751224/inboundrtmpprotocol.o \ 78 77 ${OBJECTDIR}/_ext/2021747320/somanager.o \ 78 ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o \ 79 79 ${OBJECTDIR}/_ext/501751224/basertmpappprotocolhandler.o \ 80 80 ${OBJECTDIR}/_ext/501751224/inboundhttp4rtmp.o \ … … 91 91 ${OBJECTDIR}/_ext/1054419429/inboundconnectivity.o \ 92 92 ${OBJECTDIR}/_ext/1210522057/atommoov.o \ 93 ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o \ 93 94 ${OBJECTDIR}/_ext/31226533/innetrtmpstream.o \ 94 95 ${OBJECTDIR}/_ext/373925503/baseclientapplication.o \ … … 179 180 ${OBJECTDIR}/_ext/501751224/channel.o \ 180 181 ${OBJECTDIR}/_ext/554535297/tcpacceptor.o \ 182 ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o \ 181 183 ${OBJECTDIR}/_ext/1636055853/streamsmanager.o \ 182 184 ${OBJECTDIR}/_ext/1215912322/outnetrtpudph264stream.o \ … … 260 262 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1215912322/innetrtpstream.o ../../../../sources/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp 261 263 262 ${OBJECTDIR}/_ext/1919749812/sslprotocol.o: ../../../../sources/thelib/src/protocols/sslprotocol.cpp263 ${MKDIR} -p ${OBJECTDIR}/_ext/1919749812264 ${RM} $@.d265 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1919749812/sslprotocol.o ../../../../sources/thelib/src/protocols/sslprotocol.cpp266 267 264 ${OBJECTDIR}/_ext/517913122/pidtypes.o: ../../../../sources/thelib/src/protocols/ts/pidtypes.cpp 268 265 ${MKDIR} -p ${OBJECTDIR}/_ext/517913122 … … 430 427 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/2021747320/somanager.o ../../../../sources/thelib/src/protocols/rtmp/sharedobjects/somanager.cpp 431 428 429 ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp 430 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 431 ${RM} $@.d 432 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o ../../../../sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp 433 432 434 ${OBJECTDIR}/_ext/501751224/basertmpappprotocolhandler.o: ../../../../sources/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp 433 435 ${MKDIR} -p ${OBJECTDIR}/_ext/501751224 … … 500 502 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1210522057/atommoov.o ../../../../sources/thelib/src/mediaformats/mp4/atommoov.cpp 501 503 504 ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/basesslprotocol.cpp 505 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 506 ${RM} $@.d 507 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o ../../../../sources/thelib/src/protocols/ssl/basesslprotocol.cpp 508 502 509 ${OBJECTDIR}/_ext/31226533/innetrtmpstream.o: ../../../../sources/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp 503 510 ${MKDIR} -p ${OBJECTDIR}/_ext/31226533 … … 939 946 ${RM} $@.d 940 947 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/554535297/tcpacceptor.o ../../../../sources/thelib/src/netio/kqueue/tcpacceptor.cpp 948 949 ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp 950 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 951 ${RM} $@.d 952 $(COMPILE.cc) -g -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o ../../../../sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp 941 953 942 954 ${OBJECTDIR}/_ext/1636055853/streamsmanager.o: ../../../../sources/thelib/src/streaming/streamsmanager.cpp -
trunk/builders/netbeans/osx/thelib/nbproject/Makefile-Release.mk
r77 r87 43 43 ${OBJECTDIR}/_ext/772217591/inboundnamedpipecarrier.o \ 44 44 ${OBJECTDIR}/_ext/1215912322/innetrtpstream.o \ 45 ${OBJECTDIR}/_ext/1919749812/sslprotocol.o \46 45 ${OBJECTDIR}/_ext/517913122/pidtypes.o \ 47 46 ${OBJECTDIR}/_ext/1210522057/atomctts.o \ … … 77 76 ${OBJECTDIR}/_ext/501751224/inboundrtmpprotocol.o \ 78 77 ${OBJECTDIR}/_ext/2021747320/somanager.o \ 78 ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o \ 79 79 ${OBJECTDIR}/_ext/501751224/basertmpappprotocolhandler.o \ 80 80 ${OBJECTDIR}/_ext/501751224/inboundhttp4rtmp.o \ … … 91 91 ${OBJECTDIR}/_ext/1054419429/inboundconnectivity.o \ 92 92 ${OBJECTDIR}/_ext/1210522057/atommoov.o \ 93 ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o \ 93 94 ${OBJECTDIR}/_ext/31226533/innetrtmpstream.o \ 94 95 ${OBJECTDIR}/_ext/373925503/baseclientapplication.o \ … … 179 180 ${OBJECTDIR}/_ext/501751224/channel.o \ 180 181 ${OBJECTDIR}/_ext/554535297/tcpacceptor.o \ 182 ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o \ 181 183 ${OBJECTDIR}/_ext/1636055853/streamsmanager.o \ 182 184 ${OBJECTDIR}/_ext/1215912322/outnetrtpudph264stream.o \ … … 260 262 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1215912322/innetrtpstream.o ../../../../sources/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp 261 263 262 ${OBJECTDIR}/_ext/1919749812/sslprotocol.o: ../../../../sources/thelib/src/protocols/sslprotocol.cpp263 ${MKDIR} -p ${OBJECTDIR}/_ext/1919749812264 ${RM} $@.d265 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1919749812/sslprotocol.o ../../../../sources/thelib/src/protocols/sslprotocol.cpp266 267 264 ${OBJECTDIR}/_ext/517913122/pidtypes.o: ../../../../sources/thelib/src/protocols/ts/pidtypes.cpp 268 265 ${MKDIR} -p ${OBJECTDIR}/_ext/517913122 … … 430 427 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/2021747320/somanager.o ../../../../sources/thelib/src/protocols/rtmp/sharedobjects/somanager.cpp 431 428 429 ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp 430 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 431 ${RM} $@.d 432 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/outboundsslprotocol.o ../../../../sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp 433 432 434 ${OBJECTDIR}/_ext/501751224/basertmpappprotocolhandler.o: ../../../../sources/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp 433 435 ${MKDIR} -p ${OBJECTDIR}/_ext/501751224 … … 500 502 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1210522057/atommoov.o ../../../../sources/thelib/src/mediaformats/mp4/atommoov.cpp 501 503 504 ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/basesslprotocol.cpp 505 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 506 ${RM} $@.d 507 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/basesslprotocol.o ../../../../sources/thelib/src/protocols/ssl/basesslprotocol.cpp 508 502 509 ${OBJECTDIR}/_ext/31226533/innetrtmpstream.o: ../../../../sources/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp 503 510 ${MKDIR} -p ${OBJECTDIR}/_ext/31226533 … … 939 946 ${RM} $@.d 940 947 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/554535297/tcpacceptor.o ../../../../sources/thelib/src/netio/kqueue/tcpacceptor.cpp 948 949 ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o: ../../../../sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp 950 ${MKDIR} -p ${OBJECTDIR}/_ext/1124563255 951 ${RM} $@.d 952 $(COMPILE.cc) -O2 -DOSX -DNET_KQUEUE -DLITTLE_ENDIAN_BYTE_ALIGNED -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_VAR -DHAS_PROTOCOL_LIVEFLV -DHAS_MEDIA_MP4 -DHAS_MEDIA_MP3 -DHAS_MEDIA_FLV -I/opt/local/include -I../../../../sources/common/include -I../../../../sources/thelib/include -fPIC -MMD -MP -MF $@.d -o ${OBJECTDIR}/_ext/1124563255/inboundsslprotocol.o ../../../../sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp 941 953 942 954 ${OBJECTDIR}/_ext/1636055853/streamsmanager.o: ../../../../sources/thelib/src/streaming/streamsmanager.cpp -
trunk/builders/netbeans/osx/thelib/nbproject/configurations.xml
r77 r87 190 190 <itemPath>../../../../sources/thelib/include/protocols/rtp/sdp.h</itemPath> 191 191 </logicalFolder> 192 <logicalFolder name="ssl" displayName="ssl" projectFiles="true"> 193 <itemPath>../../../../sources/thelib/include/protocols/ssl/basesslprotocol.h</itemPath> 194 <itemPath>../../../../sources/thelib/include/protocols/ssl/inboundsslprotocol.h</itemPath> 195 <itemPath>../../../../sources/thelib/include/protocols/ssl/outboundsslprotocol.h</itemPath> 196 </logicalFolder> 192 197 <logicalFolder name="timer" displayName="timer" projectFiles="true"> 193 198 <itemPath>../../../../sources/thelib/include/protocols/timer/basetimerprotocol.h</itemPath> … … 217 222 <itemPath>../../../../sources/thelib/include/protocols/protocolmanager.h</itemPath> 218 223 <itemPath>../../../../sources/thelib/include/protocols/protocoltypes.h</itemPath> 219 <itemPath>../../../../sources/thelib/include/protocols/sslprotocol.h</itemPath>220 224 <itemPath>../../../../sources/thelib/include/protocols/tcpprotocol.h</itemPath> 221 225 <itemPath>../../../../sources/thelib/include/protocols/udpprotocol.h</itemPath> … … 235 239 <itemPath>../../../../sources/thelib/include/streaming/streamstypes.h</itemPath> 236 240 </logicalFolder> 237 <itemPath>../../../../sources/thelib/include/thelibglobalcontext.h</itemPath>238 241 </logicalFolder> 239 242 <logicalFolder name="SourceFiles" … … 413 416 <itemPath>../../../../sources/thelib/src/protocols/rtp/sdp.cpp</itemPath> 414 417 </logicalFolder> 418 <logicalFolder name="ssl" displayName="ssl" projectFiles="true"> 419 <itemPath>../../../../sources/thelib/src/protocols/ssl/basesslprotocol.cpp</itemPath> 420 <itemPath>../../../../sources/thelib/src/protocols/ssl/inboundsslprotocol.cpp</itemPath> 421 <itemPath>../../../../sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp</itemPath> 422 </logicalFolder> 415 423 <logicalFolder name="timer" displayName="timer" projectFiles="true"> 416 424 <itemPath>../../../../sources/thelib/src/protocols/timer/basetimerprotocol.cpp</itemPath> … … 438 446 <itemPath>../../../../sources/thelib/src/protocols/protocolfactorymanager.cpp</itemPath> 439 447 <itemPath>../../../../sources/thelib/src/protocols/protocolmanager.cpp</itemPath> 440 <itemPath>../../../../sources/thelib/src/protocols/sslprotocol.cpp</itemPath>441 448 <itemPath>../../../../sources/thelib/src/protocols/tcpprotocol.cpp</itemPath> 442 449 <itemPath>../../../../sources/thelib/src/protocols/udpprotocol.cpp</itemPath> -
trunk/sources/androidapplestreaming/include/api.h
r85 r87 24 24 #include "jniwrapper.h" 25 25 26 #ifdef ANDROID 26 27 void EnvRun(string ip, uint16_t port, CallBackInfo ci); 28 #else 29 void EnvRun(string ip, uint16_t port); 30 #endif /* ANDROID */ 27 31 void EnvStop(); 28 32 -
trunk/sources/androidapplestreaming/include/jniwrapper.h
r85 r87 18 18 */ 19 19 20 #ifdef ANDROID 20 21 #ifndef _JNIWRAPPER_H 21 22 #define _JNIWRAPPER_H … … 49 50 50 51 #endif /* _JNIWRAPPER_H */ 51 52 #endif /* ANDROID */ -
trunk/sources/androidapplestreaming/src/api.cpp
r85 r87 44 44 }while(0) 45 45 46 void EnvRun(string ip, uint16_t port, CallBackInfo ci) { 46 #ifdef ANDROID 47 void EnvRun(string ip, uint16_t port, CallBackInfo ci) 48 #else 49 50 void EnvRun(string ip, uint16_t port) 51 #endif /* ANDROID */ 52 { 47 53 //1. Initialize the logger 48 54 Logger::Init(); … … 78 84 AppleStreamingClientApplication *pApp = new AppleStreamingClientApplication( 79 85 configuration); 86 #ifdef ANDROID 80 87 pApp->SetJavaCallBackInterface(ci); 88 #endif /* ANDROID */ 81 89 if (!pApp->Initialize()) { 82 90 ASSERT("Unable to initialize the application"); -
trunk/sources/androidapplestreaming/src/main.cpp
r85 r87 48 48 49 49 void* worker(void *) { 50 #ifdef ANDROID 50 51 CallBackInfo ci; 51 EnvRun("0.0.0.0", 5544, ci); 52 EnvRun("0.0.0.0", 554, ci); 53 #else 54 EnvRun("0.0.0.0", 554); 55 #endif /* ANDROID */ 52 56 return NULL; 53 57 } … … 88 92 //#define MY_KEY "ugkuOk9Qy4HNS5uRxQcQXHfLuAI=" 89 93 94 #define MY_URL "http://mlbsegqa.mlb.com/mlbam/2010/08/17/MLB_GAME_VIDEO_DETNYA_HOME_20100817/master_mobile.m3u8" 95 #define MY_SESSION_ID "playback=HTTP_CLOUD_WIRED&contentId=7320085&appAccountName=mlb&eventId=14-263849-2010-04-08&ipid=11627706&sessionKey=vlPZfM8Rj1TaGDmMrtDSQh1MIWc%3D" 96 #define MY_KEY "Q8TZUMmOkyVgVSMotTCRMQ==" 97 90 98 //#define CONDENSED_CONN_STRING "base64:aHR0cDovL21sYnZvZC1ha2MubWxiLmNvbS9tbGJhbS8yMDEwLzA0LzA4L01MQl9HQU1FX1ZJREVPX0xBTlBJVF9IT01FXzIwMTAwNDA4L21hc3Rlcl93aXJlZC5tM3U4fHlNQmVFcEl6OEJEaUFYV0k0dUdIUm1UaHdIRT18cGxheWJhY2s9SFRUUF9DTE9VRF9XSVJFRCZjb250ZW50SWQ9NzMyMDA4NSZhcHBBY2NvdW50TmFtZT1tbGImZXZlbnRJZD0xNC0yNjM4NDktMjAxMC0wNC0wOCZpcGlkPTExNjI3NzA2JnNlc3Npb25LZXk9cUNveGRIaUlOY3FDbHlEcEZoU2dma3dJSWc0JTNE" 91 #define CONDENSED_CONN_STRING "aHR0cDovL21sYnZvZC1ha2MubWxiLmNvbS9tbGJhbS8yMDEwLzA0LzA4L01MQl9HQU1FX1ZJREVPX0xBTlBJVF9IT01FXzIwMTAwNDA4L21hc3Rlcl93aXJlZC5tM3U4fGJsOEQyRUFTRUY4V1VyeloreTNvME5pUXlBaz18cGxheWJhY2s9SFRUUF9DTE9VRF9XSVJFRCZjb250ZW50SWQ9NzMyMDA4NSZhcHBBY2NvdW50TmFtZT1tbGImZXZlbnRJZD0xNC0yNjM4NDktMjAxMC0wNC0wOCZpcGlkPTExNjI3NzA2JnNlc3Npb25LZXk9R0JuY1BzeFJCVjAySUM5bjgwUlAxU2RyOWV3JTNE"99 //#define CONDENSED_CONN_STRING "aHR0cDovL21sYnZvZC1ha2MubWxiLmNvbS9tbGJhbS8yMDEwLzA0LzA4L01MQl9HQU1FX1ZJREVPX0xBTlBJVF9IT01FXzIwMTAwNDA4L21hc3Rlcl93aXJlZC5tM3U4fGJsOEQyRUFTRUY4V1VyeloreTNvME5pUXlBaz18cGxheWJhY2s9SFRUUF9DTE9VRF9XSVJFRCZjb250ZW50SWQ9NzMyMDA4NSZhcHBBY2NvdW50TmFtZT1tbGImZXZlbnRJZD0xNC0yNjM4NDktMjAxMC0wNC0wOCZpcGlkPTExNjI3NzA2JnNlc3Npb25LZXk9R0JuY1BzeFJCVjAySUM5bjgwUlAxU2RyOWV3JTNE" 92 100 93 101 void testCommands() { … … 96 104 97 105 uint32_t contextId = (uint32_t) ASC_RES_PARAM(result, "contextId"); 98 // result = CommandPlay(contextId, MY_URL, MY_SESSION_ID, MY_KEY); 106 result = CommandPlay(contextId, MY_URL, MY_SESSION_ID, MY_KEY); 107 FINEST("result:\n%s", STR(result.ToString())); 108 // result = CommandPlay(contextId, CONDENSED_CONN_STRING); 99 109 // FINEST("result:\n%s", STR(result.ToString())); 100 result = CommandPlay(contextId, CONDENSED_CONN_STRING);101 FINEST("result:\n%s", STR(result.ToString()));102 110 103 for (;;) {104 result = InfoBandwidth(contextId);105 FINEST("InfoBandwidth:\n%s", STR(result.ToString()));106 // result = InfoPlayback(contextId);107 // FINEST("InfoBandwidth:\n%s", STR(result.ToString()));108 sleep(1);109 }111 // for (;;) { 112 // result = InfoBandwidth(contextId); 113 // FINEST("InfoBandwidth:\n%s", STR(result.ToString())); 114 // // result = InfoPlayback(contextId); 115 // // FINEST("InfoBandwidth:\n%s", STR(result.ToString())); 116 // sleep(1); 117 // } 110 118 111 119 // sleep(5); -
trunk/sources/applications/applestreamingclient/src/applestreamingclientapplication.cpp
r85 r87 165 165 } 166 166 167 #ifdef ANDROID 167 168 void AppleStreamingClientApplication::SetJavaCallBackInterface(CallBackInfo ci) { 168 169 _ci.pEnv = ci.pEnv; … … 175 176 return _ci; 176 177 } 178 #endif /* ANDROID */ 177 179 178 180 void AppleStreamingClientApplication::SignalStreamRegistered(BaseStream *pStream) { -
trunk/sources/applications/applestreamingclient/src/clientcontext.cpp
r85 r87 230 230 pScheduleTimer->AddJob(job, true); 231 231 232 job["type"] = "testJNICallback";233 pScheduleTimer->AddJob(job, true);232 // job["type"] = "testJNICallback"; 233 // pScheduleTimer->AddJob(job, true); 234 234 235 235 //6. Start the master M3U8 fetching … … 640 640 } 641 641 642 if ((uri[4] == 'S') || (uri[4] == 's')) { 643 644 FOR_VECTOR_ITERATOR(uint64_t, protocolStackTypes, i) { 645 if (VECTOR_VAL(i) == PT_INBOUND_HTTP) { 646 protocolStackTypes.insert(i, PT_INBOUND_SSL); 647 break; 648 } else if (VECTOR_VAL(i) == PT_OUTBOUND_HTTP) { 649 protocolStackTypes.insert(i, PT_OUTBOUND_SSL); 650 break; 651 } 652 } 653 } 654 642 655 //3. Prepare the HTTP info 643 656 Variant parameters; -
trunk/sources/thelib/include/protocols/protocoltypes.h
r58 r87 1 1 /* 2 * Copyright (c) 2010,3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com)4 * 5 * This file is part of crtmpserver.6 * crtmpserver is free software: you can redistribute it and/or modify7 * it under the terms of the GNU General Public License as published by8 * the Free Software Foundation, either version 3 of the License, or9 * (at your option) any later version.10 * 11 * crtmpserver is distributed in the hope that it will be useful,12 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 * GNU General Public License for more details.15 * 16 * You should have received a copy of the GNU General Public License17 * along with crtmpserver. If not, see <http://www.gnu.org/licenses/>.18 */2 * Copyright (c) 2010, 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) 4 * 5 * This file is part of crtmpserver. 6 * crtmpserver is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * crtmpserver is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with crtmpserver. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 19 20 20 … … 34 34 //RTMP protocols 35 35 #define PT_INBOUND_RTMP MAKE_TAG2('I','R') 36 #define PT_OUTBOUND_RTMP MAKE_TAG2('O','R')36 #define PT_OUTBOUND_RTMP MAKE_TAG2('O','R') 37 37 #define PT_MONITOR_RTMP MAKE_TAG2('M','R') 38 38 39 39 //encryption protocols 40 40 #define PT_RTMPE MAKE_TAG2('R','E') 41 #define PT_SSL MAKE_TAG3('S','S','L') 41 #define PT_INBOUND_SSL MAKE_TAG4('I','S','S','L') 42 #define PT_OUTBOUND_SSL MAKE_TAG4('O','S','S','L') 42 43 43 44 //Async DNS protocols … … 49 50 50 51 //HTTP protocols 51 #define PT_INBOUND_HTTP MAKE_TAG4('I','H','T','T')52 #define PT_INBOUND_HTTP_FOR_RTMP MAKE_TAG4('I','H','4','R')52 #define PT_INBOUND_HTTP MAKE_TAG4('I','H','T','T') 53 #define PT_INBOUND_HTTP_FOR_RTMP MAKE_TAG4('I','H','4','R') 53 54 #define PT_OUTBOUND_HTTP MAKE_TAG4('O','H','T','T') 54 55 #define PT_OUTBOUND_HTTP_FOR_RTMP MAKE_TAG4('O','H','4','R') -
trunk/sources/thelib/include/protocols/rtp/connectivity/outboundconnectivity.h
r49 r87 84 84 bool FeedAudioDataUDP(msghdr &message); 85 85 bool FeedAudioDataTCP(msghdr &message); 86 bool CreateRTCPPacket(uint8_t *pDest, uint8_t *pSrc, 87 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, 88 uint32_t bytesCount, bool isAudio); 86 89 }; 87 90 -
trunk/sources/thelib/include/protocols/ssl/basesslprotocol.h
r56 r87 24 24 #include "protocols/baseprotocol.h" 25 25 26 class SSLProtocol26 class BaseSSLProtocol 27 27 : public BaseProtocol { 28 28 private: 29 IOBuffer _inputBuffer; 30 IOBuffer _outputBuffer; 31 protected: 29 32 static map<string, SSL_CTX *> _pGlobalContexts; 30 33 static bool _libraryInitialized; 31 SSL_CTX *_pGlobalSSLContext 1;34 SSL_CTX *_pGlobalSSLContext; 32 35 SSL *_pSSL; 33 IOBuffer _inputBuffer; 34 IOBuffer _outputBuffer; 36 bool _sslHandshakeCompleted; 35 37 uint8_t *_pReadBuffer; 36 38 public: 37 SSLProtocol();38 virtual ~ SSLProtocol();39 BaseSSLProtocol(uint64_t type); 40 virtual ~BaseSSLProtocol(); 39 41 virtual bool Initialize(Variant ¶meters); 40 42 virtual bool AllowFarProtocol(uint64_t type); … … 45 47 virtual bool SignalInputData(int32_t recvAmount); 46 48 virtual bool SignalInputData(IOBuffer &buffer); 49 protected: 50 virtual bool DoHandshake() = 0; 51 virtual bool InitGlobalContext(Variant ¶meters) = 0; 52 bool PerformIO(); 53 string GetSSLErrors(); 47 54 private: 48 55 string DumpBIO(BIO *pBIO); 49 string GetSSLErrors();50 56 void InitRandGenerator(); 51 bool PerformIO();52 57 }; 53 58 -
trunk/sources/thelib/src/protocols/defaultprotocolfactory.cpp
r56 r87 23 23 #include "protocols/rtmp/inboundrtmpprotocol.h" 24 24 #include "protocols/rtmp/outboundrtmpprotocol.h" 25 #include "protocols/sslprotocol.h" 25 #include "protocols/ssl/inboundsslprotocol.h" 26 #include "protocols/ssl/outboundsslprotocol.h" 26 27 #include "protocols/dns/inbounddnsresolverprotocol.h" 27 28 #include "protocols/dns/outbounddnsresolverprotocol.h" … … 51 52 ADD_VECTOR_END(result, PT_TCP); 52 53 ADD_VECTOR_END(result, PT_UDP); 53 ADD_VECTOR_END(result, PT_SSL); 54 ADD_VECTOR_END(result, PT_INBOUND_SSL); 55 ADD_VECTOR_END(result, PT_OUTBOUND_SSL); 54 56 ADD_VECTOR_END(result, PT_INBOUND_DNS); 55 57 ADD_VECTOR_END(result, PT_OUTBOUND_DNS); … … 156 158 else if (name == CONF_PROTOCOL_INBOUND_RTMPS) { 157 159 ADD_VECTOR_END(result, PT_TCP); 158 ADD_VECTOR_END(result, PT_ SSL);160 ADD_VECTOR_END(result, PT_INBOUND_SSL); 159 161 ADD_VECTOR_END(result, PT_INBOUND_HTTP); 160 162 ADD_VECTOR_END(result, PT_INBOUND_HTTP_FOR_RTMP); … … 256 258 pResult = new UDPProtocol(); 257 259 break; 258 case PT_SSL: 259 pResult = new SSLProtocol(); 260 case PT_INBOUND_SSL: 261 pResult = new InboundSSLProtocol(); 262 break; 263 case PT_OUTBOUND_SSL: 264 pResult = new OutboundSSLProtocol(); 260 265 break; 261 266 case PT_INBOUND_DNS: -
trunk/sources/thelib/src/protocols/http/basehttpprotocol.cpp
r56 r87 58 58 bool BaseHTTPProtocol::AllowFarProtocol(uint64_t type) { 59 59 return type == PT_TCP 60 || type == PT_SSL; 60 || type == PT_INBOUND_SSL 61 || type == PT_OUTBOUND_SSL; 61 62 } 62 63 -
trunk/sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp
r56 r87 118 118 if (type == PT_TCP 119 119 || type == PT_RTMPE 120 || type == PT_ SSL120 || type == PT_INBOUND_SSL 121 121 || type == PT_INBOUND_HTTP_FOR_RTMP) 122 122 return true; -
trunk/sources/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp
r49 r87 305 305 //uint16_t seq = ntohsp(((uint8_t *) message.msg_iov[0].iov_base) + 2); 306 306 //FINEST("seq: %d", seq); 307 if ((_videoPacketsCount % 300) == 0) { 308 /* 309 0 1 2 3 310 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 312 |V=2|P| RC | PT=SR=200 | length | header 313 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 314 | SSRC of sender | 315 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 316 | NTP timestamp, most significant word | sender 317 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ info 318 | NTP timestamp, least significant word | 319 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 320 | RTP timestamp | 321 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 322 | sender's packet count | 323 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 324 | sender's octet count | 325 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 326 */ 327 328 WARN("Video: MUST send SR to %d clients", _udpVideoRTCPClients.size()); 307 if (((_videoPacketsCount % 300) == 0) || _videoPacketsCount == 1) { 329 308 uint8_t buff[28]; 330 buff[0] = 0x80; //V,P,RC 331 buff[1] = 0xc8; //PT 332 buff[2] = 0x00; //length 333 buff[3] = 0x06; //length 334 uint32_t ssrc = _pOutStream->SSRC(); 335 put_htonl(buff + 4, ssrc); //SSRC 336 uint64_t ntp; 337 GETNTP(ntp); 338 put_htonll(buff + 8, ntp); //NTP 339 double rtpDouble; 340 GETCLOCKS(rtpDouble); 341 // ASSERT("_pOutStream->GetCapabilities()->audioCodecInfo.aac.sampleRate: %d", 342 // _pOutStream->GetCapabilities()->audioCodecInfo.aac.sampleRate); 343 put_htonl(buff + 16, (uint32_t) (rtpDouble / CLOCKS_PER_SEC) 344 * _pOutStream->GetCapabilities()->audioCodecInfo.aac.sampleRate); //RTP ts 345 put_htonl(buff + 20, _videoPacketsCount); //sender's packet count 346 put_htonl(buff + 24, _videoBytesCount); //sender's octet count 347 309 CreateRTCPPacket(buff, 310 (uint8_t *) message.msg_iov[0].iov_base, 311 _pOutStream->SSRC(), 312 90000, 313 _videoPacketsCount, 314 _videoBytesCount, 315 false); 348 316 _message.msg_iov[0].iov_base = buff; 349 317 _message.msg_iov[0].iov_len = 28; … … 365 333 //uint16_t seq = ntohsp(((uint8_t *) message.msg_iov[0].iov_base) + 2); 366 334 //FINEST("seq: %d", seq); 367 if ((_audioPacketsCount % 300) == 0) { 368 /* 369 0 1 2 3 370 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 372 |V=2|P| RC | PT=SR=200 | length | header 373 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 374 | SSRC of sender | 375 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 376 | NTP timestamp, most significant word | sender 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ info 378 | NTP timestamp, least significant word | 379 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 380 | RTP timestamp | 381 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 382 | sender's packet count | 383 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 384 | sender's octet count | 385 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 386 */ 387 388 WARN("Audio: MUST send SR to %d clients", _udpAudioRTCPClients.size()); 335 if (((_audioPacketsCount % 300) == 0) || (_audioPacketsCount == 1)) { 389 336 uint8_t buff[28]; 390 buff[0] = 0x80; //V,P,RC 391 buff[1] = 0xc8; //PT 392 buff[2] = 0x00; //length 393 buff[3] = 0x06; //length 394 uint32_t ssrc = _pOutStream->SSRC(); 395 put_htonl(buff + 4, ssrc); //SSRC 396 uint64_t ntp; 397 GETNTP(ntp); 398 put_htonll(buff + 8, ntp); //NTP 399 double rtpDouble; 400 GETCLOCKS(rtpDouble); 401 put_htonl(buff + 16, (uint32_t) (rtpDouble / CLOCKS_PER_SEC)*1000 * 90); //RTP ts 402 put_htonl(buff + 20, _audioPacketsCount); //sender's packet count 403 put_htonl(buff + 24, _audioBytesCount); //sender's octet count 404 337 CreateRTCPPacket(buff, 338 (uint8_t *) message.msg_iov[0].iov_base, 339 _pOutStream->SSRC(), 340 _pOutStream->GetCapabilities()->audioCodecInfo.aac.sampleRate, 341 _audioPacketsCount, 342 _audioBytesCount, 343 true); 405 344 _message.msg_iov[0].iov_base = buff; 406 345 _message.msg_iov[0].iov_len = 28; … … 415 354 return true; 416 355 } 356 357 bool OutboundConnectivity::CreateRTCPPacket(uint8_t *pDest, uint8_t *pSrc, 358 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, uint32_t bytesCount, 359 bool isAudio) { 360 361 /* 362 0 1 2 3 363 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 364 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 365 |V=2|P| RC | PT=SR=200 | length | header 366 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 367 | SSRC of sender | 368 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 369 | NTP timestamp, most significant word | sender 370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ info 371 | NTP timestamp, least significant word | 372 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 373 | RTP timestamp | 374 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 375 | sender's packet count | 376 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 377 | sender's octet count | 378 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 379 */ 380 381 // WARN("%s: MUST send SR to %d clients", 382 // isAudio ? "Audio" : "Video", 383 // _udpVideoRTCPClients.size()); 384 385 //1. V,P,RC 386 pDest[0] = 0x80; 387 388 //2. PT 389 pDest[1] = 0xc8; 390 391 //3. Length 392 pDest[2] = 0x00; 393 pDest[3] = 0x06; 394 395 //4. ssrc 396 put_htonl(pDest + 4, ssrc); //SSRC 397 398 //5. NTP 399 uint64_t ntp; 400 //GETCUSTOMNTP(ntp, (ntohlp(pSrc + 4) / rate)*1000); 401 GETNTP(ntp); 402 put_htonll(pDest + 8, ntp); 403 404 //6. RTP 405 memcpy(pDest + 16, pSrc + 4, 4); 406 407 //7. sender's packet count 408 put_htonl(pDest + 20, packetsCount); 409 410 //8. sender's octet count 411 put_htonl(pDest + 24, bytesCount); 412 413 return true; 414 } 415 417 416 #endif /* HAS_PROTOCOL_RTP */ -
trunk/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
r56 r87 18 18 */ 19 19 20 #include "protocols/ssl protocol.h"21 22 #define MAX_SSL_READ_BUFFER 819223 24 map<string, SSL_CTX *> SSLProtocol::_pGlobalContexts;25 bool SSLProtocol::_libraryInitialized = false;26 27 SSLProtocol::SSLProtocol()28 : BaseProtocol( PT_SSL) {29 _pGlobalSSLContext 1= NULL;20 #include "protocols/ssl/basesslprotocol.h" 21 22 #define MAX_SSL_READ_BUFFER 65536 23 24 map<string, SSL_CTX *> BaseSSLProtocol::_pGlobalContexts; 25 bool BaseSSLProtocol::_libraryInitialized = false; 26 27 BaseSSLProtocol::BaseSSLProtocol(uint64_t type) 28 : BaseProtocol(type) { 29 _pGlobalSSLContext = NULL; 30 30 _pSSL = NULL; 31 _sslHandshakeCompleted = false; 31 32 _pReadBuffer = new uint8_t[MAX_SSL_READ_BUFFER]; 32 FINEST("SSL protocol created"); 33 } 34 35 SSLProtocol::~SSLProtocol() { 33 } 34 35 BaseSSLProtocol::~BaseSSLProtocol() { 36 36 if (_pSSL != NULL) { 37 37 SSL_free(_pSSL); … … 39 39 } 40 40 delete[] _pReadBuffer; 41 FINEST("SSL protocol deleted"); 42 } 43 44 bool SSLProtocol::Initialize(Variant ¶meters) { 45 //1. Comput the hash on key/cert pair and see 46 //if we have a global context with that hash 47 string hash = ""; 48 if (parameters["hash"] != V_STRING) { 49 if (parameters[CONF_SSL_KEY] != V_STRING 50 || parameters[CONF_SSL_CERT] != V_STRING) { 51 FATAL("No key/cert provided"); 52 return false; 53 } 54 hash = md5((string) parameters[CONF_SSL_KEY] 55 + (string) parameters[CONF_SSL_CERT], true); 56 parameters["hash"] = hash; 57 } else { 58 hash = (string) parameters["hash"]; 59 } 60 string key = parameters[CONF_SSL_KEY]; 61 string cert = parameters[CONF_SSL_CERT]; 62 _pGlobalSSLContext1 = _pGlobalContexts[hash]; 63 64 //2. Initialize the global context based on the specified 65 //key/cert pair if we don't have it 66 if (_pGlobalSSLContext1 == NULL) { 67 if (!_libraryInitialized) { 68 //3. This is the first time we use the library. So we have to 69 //initialize it first 70 SSL_library_init(); 71 72 //init readable error messages 73 SSL_load_error_strings(); 74 ERR_load_SSL_strings(); 75 ERR_load_CRYPTO_strings(); 76 ERR_load_crypto_strings(); 77 OpenSSL_add_all_algorithms(); 78 OpenSSL_add_all_ciphers(); 79 OpenSSL_add_all_digests(); 80 81 //initialize the random numbers generator 82 InitRandGenerator(); 83 _libraryInitialized = false; 84 } 85 86 //4. prepare the global ssl context 87 _pGlobalSSLContext1 = SSL_CTX_new(SSLv23_method()); 88 if (_pGlobalSSLContext1 == NULL) { 89 FATAL("Unable to create global SSL context"); 90 return false; 91 } 92 93 //5. setup the certificate 94 if (SSL_CTX_use_certificate_file(_pGlobalSSLContext1, STR(cert), 95 SSL_FILETYPE_PEM) <= 0) { 96 FATAL("Unable to load certificate %s; Error(s) was: %s", 97 STR(cert), 98 STR(GetSSLErrors())); 99 SSL_CTX_free(_pGlobalSSLContext1); 100 _pGlobalSSLContext1 = NULL; 101 return false; 102 } 103 104 //6. setup the private key 105 if (SSL_CTX_use_PrivateKey_file(_pGlobalSSLContext1, STR(key), 106 SSL_FILETYPE_PEM) <= 0) { 107 FATAL("Unable to load key %s; Error(s) was: %s", 108 STR(key), 109 STR(GetSSLErrors())); 110 SSL_CTX_free(_pGlobalSSLContext1); 111 _pGlobalSSLContext1 = NULL; 112 return false; 113 } 114 115 //7. disable client certificate authentication 116 SSL_CTX_set_verify(_pGlobalSSLContext1, SSL_VERIFY_NONE, NULL); 117 118 //8. Store the global context for later usage 119 _pGlobalContexts[hash] = _pGlobalSSLContext1; 120 } 121 122 //9. create connection SSL context 123 _pSSL = SSL_new(_pGlobalSSLContext1); 41 } 42 43 bool BaseSSLProtocol::Initialize(Variant ¶meters) { 44 //1. Initialize the SSL library 45 if (!_libraryInitialized) { 46 //3. This is the first time we use the library. So we have to 47 //initialize it first 48 SSL_library_init(); 49 50 //init readable error messages 51 SSL_load_error_strings(); 52 ERR_load_SSL_strings(); 53 ERR_load_CRYPTO_strings(); 54 ERR_load_crypto_strings(); 55 OpenSSL_add_all_algorithms(); 56 OpenSSL_add_all_ciphers(); 57 OpenSSL_add_all_digests(); 58 59 //initialize the random numbers generator 60 InitRandGenerator(); 61 _libraryInitialized = false; 62 } 63 64 //2. Initialize the global context 65 if (!InitGlobalContext(parameters)) { 66 FATAL("Unable to initialize global context"); 67 return false; 68 } 69 70 //3. create connection SSL context 71 _pSSL = SSL_new(_pGlobalSSLContext); 124 72 if (_pSSL == NULL) { 125 73 FATAL("Unable to create SSL connection context"); … … 127 75 } 128 76 77 //4. setup the I/O buffers 129 78 SSL_set_bio(_pSSL, BIO_new(BIO_s_mem()), BIO_new(BIO_s_mem())); 130 SSL_set_accept_state(_pSSL); 131 132 return true; 133 } 134 135 bool SSLProtocol::AllowFarProtocol(uint64_t type) { 79 80 return DoHandshake(); 81 } 82 83 bool BaseSSLProtocol::AllowFarProtocol(uint64_t type) { 136 84 if (type == PT_TCP) 137 85 return true; … … 140 88 } 141 89 142 bool SSLProtocol::AllowNearProtocol(uint64_t type) {90 bool BaseSSLProtocol::AllowNearProtocol(uint64_t type) { 143 91 return true; 144 92 } 145 93 146 bool SSLProtocol::EnqueueForOutbound() { 94 bool BaseSSLProtocol::EnqueueForOutbound() { 95 //1. Is the SSL handshake completed? 96 if (!_sslHandshakeCompleted) { 97 return DoHandshake(); 98 } 99 100 //2. Do we have some outstanding data? 147 101 IOBuffer *pBuffer = _pNearProtocol->GetOutputBuffer(); 148 102 if (pBuffer == NULL) 149 103 return true; 104 105 //3. Encrypt the outstanding data 150 106 if (SSL_write(_pSSL, GETIBPOINTER(*pBuffer), GETAVAILABLEBYTESCOUNT(*pBuffer)) 151 107 != (int32_t) GETAVAILABLEBYTESCOUNT(*pBuffer)) { … … 154 110 } 155 111 pBuffer->IgnoreAll(); 112 113 //4. Do the actual I/O 156 114 return PerformIO(); 157 115 } 158 116 159 IOBuffer * SSLProtocol::GetOutputBuffer() {117 IOBuffer * BaseSSLProtocol::GetOutputBuffer() { 160 118 if (GETAVAILABLEBYTESCOUNT(_outputBuffer) > 0) 161 119 return &_outputBuffer; … … 163 121 } 164 122 165 IOBuffer * SSLProtocol::GetInputBuffer() {123 IOBuffer * BaseSSLProtocol::GetInputBuffer() { 166 124 return &_inputBuffer; 167 125 } 168 126 169 bool SSLProtocol::SignalInputData(int32_t recvAmount) {127 bool BaseSSLProtocol::SignalInputData(int32_t recvAmount) { 170 128 ASSERT("OPERATION NOT SUPPORTED"); 171 129 return false; 172 130 } 173 131 174 bool SSLProtocol::SignalInputData(IOBuffer &buffer) {175 // 2. get the SSL input buffer132 bool BaseSSLProtocol::SignalInputData(IOBuffer &buffer) { 133 //1. get the SSL input buffer 176 134 BIO *pInBio = SSL_get_rbio(_pSSL); 177 135 178 // 3. dump all the data from the network inside the ssl input136 //2. dump all the data from the network inside the ssl input 179 137 BIO_write(pInBio, GETIBPOINTER(buffer), 180 138 GETAVAILABLEBYTESCOUNT(buffer)); 181 139 buffer.IgnoreAll(); 182 140 183 //4. Try to do the handshake 184 int32_t errorCode = SSL_ERROR_NONE; 185 if (!SSL_is_init_finished(_pSSL)) { 186 errorCode = SSL_accept(_pSSL); 187 if (errorCode < 0) { 188 int32_t error = SSL_get_error(_pSSL, errorCode); 189 if (error != SSL_ERROR_WANT_READ && 190 error != SSL_ERROR_WANT_WRITE) { 191 FATAL("Unable to accept SSL connection: %d; %s", 192 error, STR(GetSSLErrors())); 193 return false; 194 } 195 } 196 } 197 198 //5. if the init is made, read the actual data an put it in the 199 //descrypted input buffer 200 if (SSL_is_init_finished(_pSSL)) { 201 int32_t read = 0; 202 while ((read = SSL_read(_pSSL, _pReadBuffer, MAX_SSL_READ_BUFFER)) > 0) { 203 _inputBuffer.ReadFromBuffer(_pReadBuffer, (uint32_t) read); 204 } 205 if (read < 0) { 206 int32_t error = SSL_get_error(_pSSL, read); 207 if (error != SSL_ERROR_WANT_READ && 208 error != SSL_ERROR_WANT_WRITE) { 209 FATAL("Unable to read data: %d", error); 210 return false; 211 } 212 } 213 } 214 215 //6. If we have pending data inside the decrypted buffer, bubble it up 216 //on the protocol stack 141 //3. Do we have to do some handshake? 142 if (!_sslHandshakeCompleted) { 143 if (!DoHandshake()) { 144 FATAL("Unable to do the SSL handshake"); 145 return false; 146 } 147 if (!_sslHandshakeCompleted) { 148 //WARN("SSL handshake not completed yet"); 149 return true; 150 } 151 } 152 153 //4. Read the actual data an put it in the descrypted input buffer 154 int32_t read = 0; 155 while ((read = SSL_read(_pSSL, _pReadBuffer, MAX_SSL_READ_BUFFER)) > 0) { 156 _inputBuffer.ReadFromBuffer(_pReadBuffer, (uint32_t) read); 157 } 158 if (read < 0) { 159 int32_t error = SSL_get_error(_pSSL, read); 160 if (error != SSL_ERROR_WANT_READ && 161 error != SSL_ERROR_WANT_WRITE) { 162 FATAL("Unable to read data: %d", error); 163 return false; 164 } 165 } 166 167 //6. If we have pending data inside the decrypted buffer, bubble it up on the protocol stack 168 //FINEST("_inputBuffer:\n%s", STR(_inputBuffer)); 217 169 if (GETAVAILABLEBYTESCOUNT(_inputBuffer) > 0) { 218 170 if (_pNearProtocol != NULL) { … … 225 177 226 178 //7. After the data was sent on the upper layers, we might have outstanding 227 //data that needs to be sent. Also this outstanding data might come from 228 //the ssl handshake itself. So we do I/O 179 //data that needs to be sent. 229 180 return PerformIO(); 230 181 } 231 182 232 string SSLProtocol::DumpBIO(BIO *pBIO) { 183 bool BaseSSLProtocol::PerformIO() { 184 //1. Put the data from SSL output buffer inside our protocol output buffer 185 if (!_outputBuffer.ReadFromBIO(SSL_get_wbio(_pSSL))) { 186 FATAL("Unable to transfer data from outBIO to outputBuffer"); 187 return false; 188 } 189 190 //2. Enqueue the protocol for outbound if we have data that needs to be sent 191 if (GETAVAILABLEBYTESCOUNT(_outputBuffer) > 0) { 192 if (_pFarProtocol != NULL) { 193 return _pFarProtocol->EnqueueForOutbound(); 194 } 195 } 196 197 //3. Done 198 return true; 199 } 200 201 string BaseSSLProtocol::GetSSLErrors() { 202 string result = ""; 203 uint32_t errorCode; 204 char *pTempBuffer = new char[4096]; 205 while ((errorCode = ERR_get_error()) != 0) { 206 memset(pTempBuffer, 0, 4096); 207 ERR_error_string_n(errorCode, pTempBuffer, 4095); 208 result += "\n"; 209 result += pTempBuffer; 210 } 211 delete[] pTempBuffer; 212 return result; 213 } 214 215 string BaseSSLProtocol::DumpBIO(BIO *pBIO) { 233 216 string formatString; 234 217 formatString = "method: %p\n"; … … 263 246 } 264 247 265 string SSLProtocol::GetSSLErrors() { 266 string result = ""; 267 uint32_t errorCode; 268 char *pTempBuffer = new char[4096]; 269 while ((errorCode = ERR_get_error()) != 0) { 270 memset(pTempBuffer, 0, 4096); 271 ERR_error_string_n(errorCode, pTempBuffer, 4095); 272 result += "\n"; 273 result += pTempBuffer; 274 } 275 delete[] pTempBuffer; 276 return result; 277 } 278 279 void SSLProtocol::InitRandGenerator() { 248 void BaseSSLProtocol::InitRandGenerator() { 280 249 srand((uint32_t) time(NULL)); 281 250 … … 294 263 } 295 264 296 bool SSLProtocol::PerformIO() { 297 //1. Put the data from SSL output buffer inside our 298 //protocol output buffer 299 if (!_outputBuffer.ReadFromBIO(SSL_get_wbio(_pSSL))) { 300 FATAL("Unable to transfer data from outBIO to outputBuffer"); 301 return false; 302 } 303 304 //2. Enqueue the protocol for outbound if we have data that needs 305 //to be sent 306 if (GETAVAILABLEBYTESCOUNT(_outputBuffer) > 0) { 307 if (_pFarProtocol != NULL) { 308 return _pFarProtocol->EnqueueForOutbound(); 309 } 310 } 311 312 //3. Done 313 return true; 314 } 315 316 265 -
trunk/sources/thelib/src/protocols/variant/basevariantappprotocolhandler.cpp
r56 r87 54 54 55 55 void BaseVariantAppProtocolHandler::RegisterProtocol(BaseProtocol *pProtocol) { 56 FINEST("BaseVariantAppProtocolHandler::RegisterProtocol");56 //FINEST("BaseVariantAppProtocolHandler::RegisterProtocol"); 57 57 } 58 58 59 59 void BaseVariantAppProtocolHandler::UnRegisterProtocol(BaseProtocol *pProtocol) { 60 FINEST("BaseVariantAppProtocolHandler::UnRegisterProtocol");60 //FINEST("BaseVariantAppProtocolHandler::UnRegisterProtocol"); 61 61 } 62 62
Note: See TracChangeset
for help on using the changeset viewer.
