chromecast: refactor out encoder option functions