From a784b63f36d004d11dff900263f39dcd51675db1 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 27 Jan 2022 01:27:03 +0100 Subject: [PATCH] Added "bframes" stream selector --- lib/stream.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/stream.cpp b/lib/stream.cpp index a811cd84..5549d2c5 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -1140,6 +1140,15 @@ std::set Util::pickTracks(const DTSC::Meta &M, const std::set tr // Video-specific matches if (!trackType.size() || trackType == "video"){ + //All tracks containing bframes + if (trackLow == "bframes"){ + for (std::set::iterator it = trackList.begin(); it != trackList.end(); it++){ + if (!trackType.size() || M.getType(*it) == trackType || M.getCodec(*it) == trackType){ + if (M.hasBFrames(*it)){result.insert(*it);} + } + } + return result; + } //Highest resolution if (trackLow == "highres" || trackLow == "bestres" || trackLow == "maxres"){ //Select highest resolution track of this type