const MUXER_OPTS: &[NAOptionDefinition] = &[
NAOptionDefinition {
- name: "stream_tag", description: "forced stream tag(s) in 'streamNtagHHHHHHHH' format",
+ name: FORCE_STREAM_TAG_OPTION, description: FORCE_STREAM_TAG_OPTION_DESC,
opt_type: NAOptionDefinitionType::String(None) },
];
fn get_supported_options(&self) -> &[NAOptionDefinition] { MUXER_OPTS }
fn set_options(&mut self, options: &[NAOption]) {
for opt in options.iter() {
- if let NAOption { name: "stream_tag" , value: NAValue::String(ref stag) } = opt {
+ if let NAOption { name: FORCE_STREAM_TAG_OPTION , value: NAValue::String(ref stag) } = opt {
if let Some(new_tag) = parse_tag(stag.as_bytes()) {
let mut found = false;
for tag in self.forced_tags.iter_mut() {
/// Common description for forcing seek outside defined seekpoints.
pub const FORCE_SEEK_OPTION_DESC: &str = "Allow seeking to arbitrary positions";
+/// Common name for forcing stream tag.
+pub const FORCE_STREAM_TAG_OPTION: &str = "stream_tag";
+/// Common description for forcing stream tag.
+pub const FORCE_STREAM_TAG_OPTION_DESC: &str = "Forced stream tag(s) in 'streamNtagHHHH' format";
+
/// A list specifying option parsing and validating errors.
#[derive(Clone,Copy,Debug,PartialEq)]
pub enum OptionError {