Skip to content

Commit

Permalink
updated video options
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Jun 18, 2020
1 parent 5b2aa34 commit d47a4f4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions video/videoOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,25 @@ bool videoOptions::Parse( const char* URI, const commandLine& cmdLine, videoOpti
}

// parse stream settings
width = cmdLine.GetUnsignedInt("width");
height = cmdLine.GetUnsignedInt("height");
frameRate = cmdLine.GetUnsignedInt("framerate", frameRate);
numBuffers = cmdLine.GetUnsignedInt("num-buffers", numBuffers);
zeroCopy = cmdLine.GetFlag("zero-copy");
loop = cmdLine.GetInt("loop");

// width
width = (type == INPUT) ? cmdLine.GetUnsignedInt("input-width")
: cmdLine.GetUnsignedInt("output-width");

if( width == 0 )
width = cmdLine.GetUnsignedInt("width");

// height
height = (type == INPUT) ? cmdLine.GetUnsignedInt("input-height")
: cmdLine.GetUnsignedInt("output-height");

if( height == 0 )
height = cmdLine.GetUnsignedInt("height");

// flip-method
const char* flipStr = (type == INPUT) ? cmdLine.GetString("input-flip-method")
: cmdLine.GetString("output-flip-method");
Expand Down

0 comments on commit d47a4f4

Please sign in to comment.