Cleaned up the structure of the code a bit and added visual feedback for
changing the input mode: Depending on the input mode the background
color changes.
Wrote some documenting comments for the new functions that were not yet
documented (mostly cropping related).
Improved performance a lot by not repeatedly decoding and uploading the
same frame when simply switching between streams. This reduces the
CPU load when switching between streams at the same frame position to
almost none. Also implemented printing frame type to stdout in a format
that allows for easy comparison between source and encode without printing
unnecessary many lines.
Implemented command line option parsing via GNU getopt for -c top:bottom
(cropping) and -s step:range (selectrangeevery). Also pulled the code
for cropping out of the key callback into its own function.