Return an error with '$' in stream output for WebVTT

WebVTT output with one file per Representatin per Period is not
supported yet.

Bug: 111359775.

Change-Id: I63f8dbbd65e6e286778474175d33f337f2a758ae
This commit is contained in:
KongQun Yang 2018-07-20 13:27:38 -07:00
parent 26997bb361
commit 86a86ce954
1 changed files with 14 additions and 7 deletions

View File

@ -197,13 +197,6 @@ Status ValidateStreamDescriptor(bool dump_stream_info,
RETURN_IF_ERROR(ValidateSegmentTemplate(stream.segment_template));
}
if (stream.output.find('$') != std::string::npos) {
// "$" is only allowed if the output file name is a template, which is
// used to support one file per Representation per Period when there are
// Ad Cues.
RETURN_IF_ERROR(ValidateSegmentTemplate(stream.output));
}
// There are some specifics that must be checked based on which format
// we are writing to.
const MediaContainerName output_format = GetOutputFormat(stream);
@ -248,6 +241,20 @@ Status ValidateStreamDescriptor(bool dump_stream_info,
}
}
if (stream.output.find('$') != std::string::npos) {
if (output_format == CONTAINER_WEBVTT) {
return Status(
error::UNIMPLEMENTED,
"WebVTT output with one file per Representation per Period "
"is not supported yet. Please use fMP4 instead. If that needs to be "
"supported, please file a feature request on GitHub.");
}
// "$" is only allowed if the output file name is a template, which is
// used to support one file per Representation per Period when there are
// Ad Cues.
RETURN_IF_ERROR(ValidateSegmentTemplate(stream.output));
}
return Status::OK;
}