正在显示
14 个修改的文件
包含
31 行增加
和
32 行删除
| @@ -141,20 +141,21 @@ KERNEL_OBJS="${MODULE_OBJS[@]}" | @@ -141,20 +141,21 @@ KERNEL_OBJS="${MODULE_OBJS[@]}" | ||
| 141 | #Protocol, depends on core/kernel, provides rtmp/htttp protocol features. | 141 | #Protocol, depends on core/kernel, provides rtmp/htttp protocol features. |
| 142 | MODULE_ID="PROTOCOL" | 142 | MODULE_ID="PROTOCOL" |
| 143 | MODULE_DEPENDS=("CORE" "KERNEL") | 143 | MODULE_DEPENDS=("CORE" "KERNEL") |
| 144 | -ModuleLibIncs=(${SRS_OBJS}) | ||
| 145 | -MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_rtmp_stack") | 144 | +ModuleLibIncs=(${SRS_OBJS} ${LibSSLRoot}) |
| 145 | +MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_rtmp_stack" "srs_protocol_rtmp" | ||
| 146 | + "srs_protocol_handshake") | ||
| 146 | MODULE_DIR="src/pro" . auto/modules.sh | 147 | MODULE_DIR="src/pro" . auto/modules.sh |
| 147 | PROTOCOL_OBJS="${MODULE_OBJS[@]}" | 148 | PROTOCOL_OBJS="${MODULE_OBJS[@]}" |
| 148 | # | 149 | # |
| 149 | #App Module | 150 | #App Module |
| 150 | MODULE_ID="APP" | 151 | MODULE_ID="APP" |
| 151 | MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL") | 152 | MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL") |
| 152 | -ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${LibSSLRoot} ${SRS_OBJS}) | 153 | +ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS}) |
| 153 | MODULE_FILES=("srs_core_server" | 154 | MODULE_FILES=("srs_core_server" |
| 154 | "srs_core_conn" "srs_core_client" | 155 | "srs_core_conn" "srs_core_client" |
| 155 | - "srs_core_rtmp" "srs_core_socket" | 156 | + "srs_core_socket" |
| 156 | "srs_core_source" "srs_core_codec" | 157 | "srs_core_source" "srs_core_codec" |
| 157 | - "srs_core_handshake" "srs_core_refer" | 158 | + "srs_core_refer" |
| 158 | "srs_core_hls" "srs_core_forward" "srs_core_encoder" | 159 | "srs_core_hls" "srs_core_forward" "srs_core_encoder" |
| 159 | "srs_core_http" "srs_core_thread" "srs_core_bandwidth" | 160 | "srs_core_http" "srs_core_thread" "srs_core_bandwidth" |
| 160 | "srs_core_st" "srs_core_log_context") | 161 | "srs_core_st" "srs_core_log_context") |
| @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 28 | 28 | ||
| 29 | using namespace std; | 29 | using namespace std; |
| 30 | 30 | ||
| 31 | -#include <srs_core_rtmp.hpp> | 31 | +#include <srs_protocol_rtmp.hpp> |
| 32 | #include <srs_kernel_error.hpp> | 32 | #include <srs_kernel_error.hpp> |
| 33 | #include <srs_protocol_amf0.hpp> | 33 | #include <srs_protocol_amf0.hpp> |
| 34 | #include <srs_protocol_rtmp_stack.hpp> | 34 | #include <srs_protocol_rtmp_stack.hpp> |
| @@ -30,7 +30,7 @@ using namespace std; | @@ -30,7 +30,7 @@ using namespace std; | ||
| 30 | 30 | ||
| 31 | #include <srs_kernel_error.hpp> | 31 | #include <srs_kernel_error.hpp> |
| 32 | #include <srs_kernel_log.hpp> | 32 | #include <srs_kernel_log.hpp> |
| 33 | -#include <srs_core_rtmp.hpp> | 33 | +#include <srs_protocol_rtmp.hpp> |
| 34 | #include <srs_protocol_rtmp_stack.hpp> | 34 | #include <srs_protocol_rtmp_stack.hpp> |
| 35 | #include <srs_core_autofree.hpp> | 35 | #include <srs_core_autofree.hpp> |
| 36 | #include <srs_core_source.hpp> | 36 | #include <srs_core_source.hpp> |
| @@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 35 | #include <srs_kernel_error.hpp> | 35 | #include <srs_kernel_error.hpp> |
| 36 | #include <srs_kernel_log.hpp> | 36 | #include <srs_kernel_log.hpp> |
| 37 | #include <srs_kernel_config.hpp> | 37 | #include <srs_kernel_config.hpp> |
| 38 | -#include <srs_core_rtmp.hpp> | 38 | +#include <srs_protocol_rtmp.hpp> |
| 39 | #include <srs_kernel_pithy_print.hpp> | 39 | #include <srs_kernel_pithy_print.hpp> |
| 40 | #include <srs_protocol_rtmp_stack.hpp> | 40 | #include <srs_protocol_rtmp_stack.hpp> |
| 41 | 41 |
| @@ -29,11 +29,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -29,11 +29,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 29 | #include <arpa/inet.h> | 29 | #include <arpa/inet.h> |
| 30 | 30 | ||
| 31 | #include <srs_kernel_error.hpp> | 31 | #include <srs_kernel_error.hpp> |
| 32 | -#include <srs_core_rtmp.hpp> | 32 | +#include <srs_protocol_rtmp.hpp> |
| 33 | #include <srs_kernel_log.hpp> | 33 | #include <srs_kernel_log.hpp> |
| 34 | #include <srs_protocol_rtmp_stack.hpp> | 34 | #include <srs_protocol_rtmp_stack.hpp> |
| 35 | #include <srs_kernel_pithy_print.hpp> | 35 | #include <srs_kernel_pithy_print.hpp> |
| 36 | -#include <srs_core_rtmp.hpp> | 36 | +#include <srs_protocol_rtmp.hpp> |
| 37 | #include <srs_kernel_config.hpp> | 37 | #include <srs_kernel_config.hpp> |
| 38 | #include <srs_core_source.hpp> | 38 | #include <srs_core_source.hpp> |
| 39 | #include <srs_core_autofree.hpp> | 39 | #include <srs_core_autofree.hpp> |
| @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 40 | #include <srs_kernel_config.hpp> | 40 | #include <srs_kernel_config.hpp> |
| 41 | #include <srs_core_source.hpp> | 41 | #include <srs_core_source.hpp> |
| 42 | #include <srs_core_autofree.hpp> | 42 | #include <srs_core_autofree.hpp> |
| 43 | -#include <srs_core_rtmp.hpp> | 43 | +#include <srs_protocol_rtmp.hpp> |
| 44 | #include <srs_kernel_pithy_print.hpp> | 44 | #include <srs_kernel_pithy_print.hpp> |
| 45 | 45 | ||
| 46 | // max PES packets size to flush the video. | 46 | // max PES packets size to flush the video. |
| @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 33 | #include <arpa/inet.h> | 33 | #include <arpa/inet.h> |
| 34 | 34 | ||
| 35 | #include <srs_kernel_error.hpp> | 35 | #include <srs_kernel_error.hpp> |
| 36 | -#include <srs_core_rtmp.hpp> | 36 | +#include <srs_protocol_rtmp.hpp> |
| 37 | #include <srs_kernel_log.hpp> | 37 | #include <srs_kernel_log.hpp> |
| 38 | #include <srs_core_socket.hpp> | 38 | #include <srs_core_socket.hpp> |
| 39 | 39 |
| @@ -35,7 +35,7 @@ using namespace std; | @@ -35,7 +35,7 @@ using namespace std; | ||
| 35 | #include <srs_core_forward.hpp> | 35 | #include <srs_core_forward.hpp> |
| 36 | #include <srs_kernel_config.hpp> | 36 | #include <srs_kernel_config.hpp> |
| 37 | #include <srs_core_encoder.hpp> | 37 | #include <srs_core_encoder.hpp> |
| 38 | -#include <srs_core_rtmp.hpp> | 38 | +#include <srs_protocol_rtmp.hpp> |
| 39 | 39 | ||
| 40 | #define CONST_MAX_JITTER_MS 500 | 40 | #define CONST_MAX_JITTER_MS 500 |
| 41 | #define DEFAULT_FRAME_TIME_MS 40 | 41 | #define DEFAULT_FRAME_TIME_MS 40 |
| @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 28 | #include <getopt.h> | 28 | #include <getopt.h> |
| 29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
| 30 | 30 | ||
| 31 | -#include <srs_core_rtmp.hpp> | 31 | +#include <srs_protocol_rtmp.hpp> |
| 32 | #include <srs_protocol_rtmp_stack.hpp> | 32 | #include <srs_protocol_rtmp_stack.hpp> |
| 33 | #include <srs_kernel_error.hpp> | 33 | #include <srs_kernel_error.hpp> |
| 34 | #include <srs_protocol_amf0.hpp> | 34 | #include <srs_protocol_amf0.hpp> |
| @@ -21,14 +21,14 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | @@ -21,14 +21,14 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | -#include <srs_core_handshake.hpp> | 24 | +#include <srs_protocol_handshake.hpp> |
| 25 | 25 | ||
| 26 | #include <time.h> | 26 | #include <time.h> |
| 27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
| 28 | 28 | ||
| 29 | +#include <srs_core_autofree.hpp> | ||
| 29 | #include <srs_kernel_error.hpp> | 30 | #include <srs_kernel_error.hpp> |
| 30 | #include <srs_kernel_log.hpp> | 31 | #include <srs_kernel_log.hpp> |
| 31 | -#include <srs_core_autofree.hpp> | ||
| 32 | #include <srs_protocol_io.hpp> | 32 | #include <srs_protocol_io.hpp> |
| 33 | 33 | ||
| 34 | void srs_random_generate(char* bytes, int size) | 34 | void srs_random_generate(char* bytes, int size) |
| @@ -21,11 +21,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | @@ -21,11 +21,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | -#ifndef SRS_CORE_HANDSHKAE_HPP | ||
| 25 | -#define SRS_CORE_HANDSHKAE_HPP | 24 | +#ifndef SRS_PROTOCOL_HANDSHKAE_HPP |
| 25 | +#define SRS_PROTOCOL_HANDSHKAE_HPP | ||
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | -#include <srs_core_complex_handshake.hpp> | 28 | +#include <srs_protocol_handshake.hpp> |
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #include <srs_core.hpp> | 31 | #include <srs_core.hpp> |
| @@ -21,16 +21,16 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | @@ -21,16 +21,16 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | -#include <srs_core_rtmp.hpp> | 24 | +#include <srs_protocol_rtmp.hpp> |
| 25 | 25 | ||
| 26 | +#include <srs_core_autofree.hpp> | ||
| 27 | +#include <srs_protocol_handshake.hpp> | ||
| 26 | #include <srs_kernel_log.hpp> | 28 | #include <srs_kernel_log.hpp> |
| 27 | #include <srs_kernel_error.hpp> | 29 | #include <srs_kernel_error.hpp> |
| 30 | +#include <srs_kernel_config.hpp> | ||
| 28 | #include <srs_protocol_io.hpp> | 31 | #include <srs_protocol_io.hpp> |
| 29 | #include <srs_protocol_rtmp_stack.hpp> | 32 | #include <srs_protocol_rtmp_stack.hpp> |
| 30 | -#include <srs_core_autofree.hpp> | ||
| 31 | #include <srs_protocol_amf0.hpp> | 33 | #include <srs_protocol_amf0.hpp> |
| 32 | -#include <srs_core_handshake.hpp> | ||
| 33 | -#include <srs_kernel_config.hpp> | ||
| 34 | 34 | ||
| 35 | using namespace std; | 35 | using namespace std; |
| 36 | 36 |
| @@ -21,19 +21,17 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | @@ -21,19 +21,17 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | -#ifndef SRS_CORE_RTMP_HPP | ||
| 25 | -#define SRS_CORE_RTMP_HPP | 24 | +#ifndef SRS_PROTOCOL_RTMP_HPP |
| 25 | +#define SRS_PROTOCOL_RTMP_HPP | ||
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | -#include <srs_core_rtmp.hpp> | 28 | +#include <srs_protocol_rtmp.hpp> |
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #include <srs_core.hpp> | 31 | #include <srs_core.hpp> |
| 32 | 32 | ||
| 33 | #include <string> | 33 | #include <string> |
| 34 | 34 | ||
| 35 | -#include <srs_core_st.hpp> | ||
| 36 | - | ||
| 37 | class SrsProtocol; | 35 | class SrsProtocol; |
| 38 | class ISrsProtocolReaderWriter; | 36 | class ISrsProtocolReaderWriter; |
| 39 | class ISrsMessage; | 37 | class ISrsMessage; |
| @@ -27,8 +27,12 @@ file | @@ -27,8 +27,12 @@ file | ||
| 27 | protocol readonly separator, | 27 | protocol readonly separator, |
| 28 | ..\pro\srs_protocol_amf0.hpp, | 28 | ..\pro\srs_protocol_amf0.hpp, |
| 29 | ..\pro\srs_protocol_amf0.cpp, | 29 | ..\pro\srs_protocol_amf0.cpp, |
| 30 | + ..\app\srs_protocol_handshake.hpp, | ||
| 31 | + ..\app\srs_protocol_handshake.cpp, | ||
| 30 | ..\pro\srs_protocol_io.hpp, | 32 | ..\pro\srs_protocol_io.hpp, |
| 31 | ..\pro\srs_protocol_io.cpp, | 33 | ..\pro\srs_protocol_io.cpp, |
| 34 | + ..\pro\srs_protocol_rtmp.hpp, | ||
| 35 | + ..\pro\srs_protocol_rtmp.cpp, | ||
| 32 | ..\pro\srs_protocol_rtmp_stack.hpp, | 36 | ..\pro\srs_protocol_rtmp_stack.hpp, |
| 33 | ..\pro\srs_protocol_rtmp_stack.cpp, | 37 | ..\pro\srs_protocol_rtmp_stack.cpp, |
| 34 | app readonly separator, | 38 | app readonly separator, |
| @@ -44,8 +48,6 @@ file | @@ -44,8 +48,6 @@ file | ||
| 44 | ..\app\srs_core_encoder.cpp, | 48 | ..\app\srs_core_encoder.cpp, |
| 45 | ..\app\srs_core_forward.hpp, | 49 | ..\app\srs_core_forward.hpp, |
| 46 | ..\app\srs_core_forward.cpp, | 50 | ..\app\srs_core_forward.cpp, |
| 47 | - ..\app\srs_core_handshake.hpp, | ||
| 48 | - ..\app\srs_core_handshake.cpp, | ||
| 49 | ..\app\srs_core_hls.hpp, | 51 | ..\app\srs_core_hls.hpp, |
| 50 | ..\app\srs_core_hls.cpp, | 52 | ..\app\srs_core_hls.cpp, |
| 51 | ..\app\srs_core_http.hpp, | 53 | ..\app\srs_core_http.hpp, |
| @@ -54,8 +56,6 @@ file | @@ -54,8 +56,6 @@ file | ||
| 54 | ..\app\srs_core_log_context.cpp, | 56 | ..\app\srs_core_log_context.cpp, |
| 55 | ..\app\srs_core_refer.hpp, | 57 | ..\app\srs_core_refer.hpp, |
| 56 | ..\app\srs_core_refer.cpp, | 58 | ..\app\srs_core_refer.cpp, |
| 57 | - ..\app\srs_core_rtmp.hpp, | ||
| 58 | - ..\app\srs_core_rtmp.cpp, | ||
| 59 | ..\app\srs_core_thread.hpp, | 59 | ..\app\srs_core_thread.hpp, |
| 60 | ..\app\srs_core_thread.cpp, | 60 | ..\app\srs_core_thread.cpp, |
| 61 | ..\app\srs_core_server.hpp, | 61 | ..\app\srs_core_server.hpp, |
-
请 注册 或 登录 后发表评论