This should print a warning or an error if an invalid pixel format is specified. Take a look at how setting the streaming rate is handled.