From 175f775e4fe1149924040f5309bb35e861d82042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=B9=BF?= Date: Fri, 7 Apr 2023 13:48:18 +0800 Subject: [PATCH] add cmd play --- src/main.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index efa119a..726f698 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,17 @@ int call_playback(CmdLineParser *parser){ return playback(&loginInfo, &stream); } + +int call_play(CmdLineParser *parser){ + string user = parser->getOpt("user"); + string password = parser->getOpt("password"); + string device = parser->getOpt("device"); + string channelStr = parser->getOpt("channel"); + unsigned long channel = stol(channelStr); + LoginInfo loginInfo = {device, user, password}; + StreamCon stream = {channel, 2048}; + return play(&loginInfo, &stream); +} int call_test(CmdLineParser *parser){ cout<<"Cmd:"<getOpt("cmd")<getOpt("user")<help();