Added -f, --force flags to the manager, this bypass the virtual camera
usage check.
This commit is contained in:
parent
f4a605ee6c
commit
67fdbde187
4 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
akvirtualcamera 9.1.0:
|
||||
|
||||
- Added -f, --force flags to the manager, this bypass the virtual camera usage
|
||||
check.
|
||||
|
||||
akvirtualcamera 9.0.0:
|
||||
|
||||
- Code forked from Webcamoid. This virtual camera isn't compatible with
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace AkVCam {
|
|||
std::vector<CmdParserCommand> m_commands;
|
||||
IpcBridge m_ipcBridge;
|
||||
bool m_parseable {false};
|
||||
bool m_force {false};
|
||||
|
||||
static const std::map<ControlType, std::string> &typeStrMap();
|
||||
std::string basename(const std::string &path);
|
||||
|
@ -184,6 +185,9 @@ AkVCam::CmdParser::CmdParser()
|
|||
this->addFlags("",
|
||||
{"-p", "--parseable"},
|
||||
"Show parseable output.");
|
||||
this->addFlags("",
|
||||
{"-f", "--force"},
|
||||
"Force command.");
|
||||
this->addCommand("devices",
|
||||
"",
|
||||
"List devices.",
|
||||
|
@ -430,7 +434,7 @@ int AkVCam::CmdParser::parse(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (this->d->m_ipcBridge.isBusyFor(command->command)) {
|
||||
if (!this->d->m_force && this->d->m_ipcBridge.isBusyFor(command->command)) {
|
||||
std::cerr << "This operation is not permitted." << std::endl;
|
||||
std::cerr << "The virtual camera is in use. Stop or close the virtual "
|
||||
<< "camera clients and try again." << std::endl;
|
||||
|
@ -791,6 +795,9 @@ int AkVCam::CmdParserPrivate::defaultHandler(const StringMap &flags,
|
|||
if (this->containsFlag(flags, "", "-p"))
|
||||
this->m_parseable = true;
|
||||
|
||||
if (this->containsFlag(flags, "", "-f"))
|
||||
this->m_force = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version: 9.0.0.{build}-{branch}
|
||||
version: 9.1.0.{build}-{branch}
|
||||
os: MinGW
|
||||
|
||||
image: Visual Studio 2019
|
||||
|
|
|
@ -28,7 +28,7 @@ set(COMMONS_APPNAME AkVirtualCamera)
|
|||
string(TOLOWER ${COMMONS_APPNAME} COMMONS_TARGET)
|
||||
|
||||
set(VER_MAJ 9)
|
||||
set(VER_MIN 0)
|
||||
set(VER_MIN 1)
|
||||
set(VER_PAT 0)
|
||||
set(VERSION ${VER_MAJ}.${VER_MIN}.${VER_PAT})
|
||||
set(DAILY_BUILD OFF CACHE BOOL "Mark this as a daily build")
|
||||
|
|
Loading…
Reference in a new issue