diff --git a/components/vision/include/maix_rtmp.hpp b/components/vision/include/maix_rtmp.hpp index cbaed950..f9e22cb8 100644 --- a/components/vision/include/maix_rtmp.hpp +++ b/components/vision/include/maix_rtmp.hpp @@ -14,7 +14,8 @@ #include #include -namespace maix { +namespace maix::rtmp +{ /** * Rtmp class * @maixpy maix.rtmp.Rtmp @@ -116,7 +117,7 @@ namespace maix { /** * @brief Get the file path of the push stream - * @return error code, err::ERR_NONE means success, others means failed + * @return file path * @maixpy maix.rtmp.Rtmp.get_path */ std::string get_path() { @@ -125,7 +126,7 @@ namespace maix { /** * @brief Check whether push streaming has started - * @return error code, err::ERR_NONE means success, others means failed + * @return If rtmp thread is running, returns true * @maixpy maix.rtmp.Rtmp.get_path */ bool is_started() { diff --git a/components/vision/port/maixcam/maix_rtmp_maixcam.cpp b/components/vision/port/maixcam/maix_rtmp_maixcam.cpp index 711942fe..77e4a377 100644 --- a/components/vision/port/maixcam/maix_rtmp_maixcam.cpp +++ b/components/vision/port/maixcam/maix_rtmp_maixcam.cpp @@ -22,7 +22,7 @@ static int rtmp_client_send(void* param, const void* header, size_t len, const v return socket_send_v_all_by_time(*socket, vec, bytes > 0 ? 2 : 1, 0, 5000); } -namespace maix { +namespace maix::rtmp { Rtmp::Rtmp(std::string host, int port, std::string app, std::string stream) { _host = host; _port = port; diff --git a/examples/rtmp_demo/main/src/main.cpp b/examples/rtmp_demo/main/src/main.cpp index a6d6b2da..669bf917 100644 --- a/examples/rtmp_demo/main/src/main.cpp +++ b/examples/rtmp_demo/main/src/main.cpp @@ -49,7 +49,7 @@ int _main(int argc, char* argv[]) std::string file = argv[5]; printf("push %s to rtmp://%s:%d/%s/%s!\r\n", &file[0], &host[0], port, &app[0], &stream[0]); - Rtmp rtmp = Rtmp(host, port, app, stream); + rtmp::Rtmp rtmp = rtmp::Rtmp(host, port, app, stream); log::info("start\r\n"); rtmp.start(file);