diff --git a/src/include/aes67/rtsp.h b/src/include/aes67/rtsp.h new file mode 100644 index 0000000000000000000000000000000000000000..7c5149b95441623c251995a1c05fdc3c4001d668 --- /dev/null +++ b/src/include/aes67/rtsp.h @@ -0,0 +1,66 @@ +/** + * @file rtsp.h + * Real-Time Session Protocol utilities + * + * References: + * Real Time Streaming Protocol (RTSP) https://tools.ietf.org/html/rfc2326 + * Real-Time Streaming Protocol Version 2.0 https://tools.ietf.org/html/rfc7826 + */ + +/** + * AES67 Framework + * Copyright (C) 2021 Philip Tschiemer, https://github.com/tschiemer/aes67 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef AES67_RTSP_H +#define AES67_RTSP_H + +#include "aes67/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define AES67_RTSP_DEFAULT_PORT 554 +#define AES67_RTSP_SCHEME "rtsp" + +#define AES67_RTSP_STATUS_OK 200 + +//struct aes67_rtsp { +// u32_t cseq; +// +// u16_t buflen; +// u8_t * buf; +//}; +// +//enum aes67_rtsp_rx_status { +// aes67_rtsp_rx_status_pending, +// aes67_rtsp_rx_status_server +//}; +// +//void aes67_rtsp_init(struct aes67_rtsp * rtsp); +//void aes67_rtsp_deinit(struct aes67_rtsp * rtsp); +// +//void aes67_rtsp_received(struct aes67_rtsp * rtsp, u8_t * buf, u16_t len); +// +//s32_t aes67_rtsp_describe(struct aes67_rtsp * rtsp, u8_t * buf, u16_t maxlen); + + +#ifdef __cplusplus +} +#endif + +#endif //AES67_RTSP_H diff --git a/src/include/aes67/utils/mdns.h b/src/include/aes67/utils/mdns.h index a0fdaa25b68c3bf150d4f948039463c7b748ba7e..ac7cfe2d38a2d8524f8667f213feaa3040c4d7a7 100644 --- a/src/include/aes67/utils/mdns.h +++ b/src/include/aes67/utils/mdns.h @@ -25,7 +25,7 @@ #define AES67_UTILS_MDNS_H #include "aes67/arch.h" -#include "rtsp.h" +#include "aes67/net.h" #ifdef __cplusplus extern "C" { diff --git a/src/include/aes67/utils/rtsp.h b/src/include/aes67/utils/rtsp-dsc.h similarity index 95% rename from src/include/aes67/utils/rtsp.h rename to src/include/aes67/utils/rtsp-dsc.h index 6188a0ec1368f40d2f319f0ce904c87c41323e76..26a3dcf68c13d030f11f6ded289de91cf6f5d7a9 100644 --- a/src/include/aes67/utils/rtsp.h +++ b/src/include/aes67/utils/rtsp-dsc.h @@ -27,18 +27,16 @@ #ifndef AES67_UTILS_RTSP_H #define AES67_UTILS_RTSP_H -#include <stdbool.h> #include "aes67/arch.h" #include "aes67/net.h" +#include "aes67/rtsp.h" + +#include <stdbool.h> #ifdef __cplusplus extern "C" { #endif -#define AES67_RTSP_DEFAULT_PORT 554 -#define AES67_RTSP_SCHEME "rtsp" - -#define AES67_RTSP_STATUS_OK 200 #define AES67_RTSP_BUFSIZE 1500 diff --git a/src/utils/rtsp-describe/CMakeLists.txt b/src/utils/rtsp-describe/CMakeLists.txt index 314ac97ad4eb51cbb0e99e2b6d45117e6827227c..81f46f756d68e26b9fc27844b6eda26ead691496 100644 --- a/src/utils/rtsp-describe/CMakeLists.txt +++ b/src/utils/rtsp-describe/CMakeLists.txt @@ -7,8 +7,8 @@ project(rtsp-describe) add_executable(rtsp-describe rtsp-describe.c aes67opts.h - ${AES67_DIR}/src/include/aes67/utils/rtsp.h - ${AES67_DIR}/src/utils/rtsp.c + ${AES67_DIR}/src/include/aes67/utils/rtsp-dsc.h + ${AES67_DIR}/src/utils/rtsp-dsc.c ${AES67_INCLUDES} ${AES67_SOURCE_FILES} ) diff --git a/src/utils/rtsp-describe/rtsp-describe.c b/src/utils/rtsp-describe/rtsp-describe.c index af11dd581e97a692f0a01f2ab9febbb49af24634..06cdc538bd0bbaad4caa7f1bf71f7efb92934c58 100644 --- a/src/utils/rtsp-describe/rtsp-describe.c +++ b/src/utils/rtsp-describe/rtsp-describe.c @@ -16,7 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "aes67/utils/rtsp.h" +#include "aes67/utils/rtsp-dsc.h" #include <getopt.h> #include <stdio.h> diff --git a/src/utils/rtsp.c b/src/utils/rtsp-dsc.c similarity index 99% rename from src/utils/rtsp.c rename to src/utils/rtsp-dsc.c index 0c8219deaee77f62452e7a5e5af4a23a122d371f..ecac35da94e789291d29a2db976c8a927798dd0f 100644 --- a/src/utils/rtsp.c +++ b/src/utils/rtsp-dsc.c @@ -16,7 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "aes67/utils/rtsp.h" +#include "aes67/utils/rtsp-dsc.h" //#include "aes67/debug.h" diff --git a/src/utils/sapd/CMakeLists.txt b/src/utils/sapd/CMakeLists.txt index 51cdea3c0bfef237333860be336cfbe2aff67c92..327e3d56f9566671101b1b812b43ec40c5b21ee9 100644 --- a/src/utils/sapd/CMakeLists.txt +++ b/src/utils/sapd/CMakeLists.txt @@ -17,8 +17,8 @@ if (${SAPD_WITH_RAV}) set(RAV_SOURCE_FILES ${AES67_DIR}/src/include/aes67/utils/mdns.h ${AES67_MDNS_SOURCE_FILES} - ${AES67_DIR}/src/include/aes67/utils/rtsp.h - ${AES67_DIR}/src/utils/rtsp.c + ${AES67_DIR}/src/include/aes67/utils/rtsp-dsc.h + ${AES67_DIR}/src/utils/rtsp-dsc.c ${AES67_DIR}/src/third_party/dnmfarrell/URI-Encode-C/src/uri_encode.h ${AES67_DIR}/src/third_party/dnmfarrell/URI-Encode-C/src/uri_encode.c ) diff --git a/src/utils/sapd/sapd.c b/src/utils/sapd/sapd.c index a845283305e47a107bf6cab21f7cb840bead6a6e..f6aa4303c57f3d68d725690941795aab07fd6790 100644 --- a/src/utils/sapd/sapd.c +++ b/src/utils/sapd/sapd.c @@ -24,6 +24,7 @@ #if AES67_SAPD_WITH_RAV == 1 #include "aes67/utils/mdns.h" +#include "aes67/utils/rtsp-dsc.h" #include "aes67/rav.h" #include "dnmfarrell/URI-Encode-C/src/uri_encode.h" #endif