-void
-FFmpegAudioStream::as_xml (xmlpp::Node* root) const
-{
- FFmpegStream::as_xml (root);
- root->add_child("FrameRate")->add_child_text (lexical_cast<string> (frame_rate));
- root->add_child("Channels")->add_child_text (lexical_cast<string> (channels));
- if (first_audio) {
- root->add_child("FirstAudio")->add_child_text (lexical_cast<string> (first_audio.get ()));
- }
- mapping.as_xml (root->add_child("Mapping"));
-}
-
-int
-FFmpegStream::index (AVFormatContext const * fc) const
-{
- if (_legacy_id) {
- return id;
- }
-
- size_t i = 0;
- while (i < fc->nb_streams) {
- if (fc->streams[i]->id == id) {
- return i;
- }
- ++i;
- }
-
- assert (false);
-}
-
-AVStream *
-FFmpegStream::stream (AVFormatContext const * fc) const
-{
- if (_legacy_id) {
- return fc->streams[id];
- }
-
- size_t i = 0;
- while (i < fc->nb_streams) {
- if (fc->streams[i]->id == id) {
- return fc->streams[i];
- }
- ++i;
- }
-
- assert (false);
- return 0;
-}
-
-/** Construct a SubtitleStream from a value returned from to_string().
- * @param t String returned from to_string().
- * @param v State file version.
- */
-FFmpegSubtitleStream::FFmpegSubtitleStream (shared_ptr<const cxml::Node> node, int version)
- : FFmpegStream (node, version)
-{
-
-}
-
-void
-FFmpegSubtitleStream::as_xml (xmlpp::Node* root) const
-{
- FFmpegStream::as_xml (root);
-}
-
-Time