[vlc-commits] demux: smooth: fill codecsdescription from specific codec parameters
Francois Cartegnie
git at videolan.org
Thu Feb 25 09:55:39 UTC 2021
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 18 20:39:34 2021 +0100| [74eb8ac6e2ea718cd764ce589ccc254c39b27ccb] | committer: Francois Cartegnie
demux: smooth: fill codecsdescription from specific codec parameters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74eb8ac6e2ea718cd764ce589ccc254c39b27ccb
---
modules/demux/smooth/playlist/QualityLevel.cpp | 15 +++++++++++++++
modules/demux/smooth/playlist/QualityLevel.hpp | 9 +++++++++
2 files changed, 24 insertions(+)
diff --git a/modules/demux/smooth/playlist/QualityLevel.cpp b/modules/demux/smooth/playlist/QualityLevel.cpp
index 5bb1c46ee8..bcf3c5bd10 100644
--- a/modules/demux/smooth/playlist/QualityLevel.cpp
+++ b/modules/demux/smooth/playlist/QualityLevel.cpp
@@ -29,6 +29,16 @@
using namespace smooth::playlist;
+SmoothCodecDescription::SmoothCodecDescription(const CodecParameters ¶ms)
+{
+ params.initAndFillEsFmt(&fmt);
+}
+
+SmoothCodecDescription::~SmoothCodecDescription()
+{
+
+}
+
QualityLevel::QualityLevel ( BaseAdaptationSet *set ) :
BaseRepresentation( set )
{
@@ -43,6 +53,11 @@ StreamFormat QualityLevel::getStreamFormat() const
return StreamFormat(StreamFormat::MP4);
}
+CodecDescription * QualityLevel::makeCodecDescription(const std::string &) const
+{
+ return new SmoothCodecDescription(codecParameters);
+}
+
InitSegment * QualityLevel::getInitSegment() const
{
if(initialisationSegment.Get())
diff --git a/modules/demux/smooth/playlist/QualityLevel.hpp b/modules/demux/smooth/playlist/QualityLevel.hpp
index afea48d4fb..8b9d155621 100644
--- a/modules/demux/smooth/playlist/QualityLevel.hpp
+++ b/modules/demux/smooth/playlist/QualityLevel.hpp
@@ -22,6 +22,7 @@
#include "../../adaptive/playlist/SegmentBaseType.hpp"
#include "../../adaptive/playlist/BaseRepresentation.h"
+#include "../../adaptive/playlist/CodecDescription.hpp"
#include "CodecParameters.hpp"
namespace adaptive
@@ -39,6 +40,13 @@ namespace smooth
using namespace adaptive;
using namespace adaptive::playlist;
+ class SmoothCodecDescription : public CodecDescription
+ {
+ public:
+ SmoothCodecDescription(const CodecParameters &);
+ virtual ~SmoothCodecDescription();
+ };
+
class QualityLevel : public BaseRepresentation,
public Initializable<InitSegment>
{
@@ -57,6 +65,7 @@ namespace smooth
const CodecParameters & getCodecParameters() const;
protected:
+ virtual CodecDescription * makeCodecDescription(const std::string &) const override;
CodecParameters codecParameters;
};
}
More information about the vlc-commits
mailing list