[vlc-commits] demux: adaptative: always ignore group/program
Francois Cartegnie
git at videolan.org
Thu Aug 6 17:30:20 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 3 20:14:46 2015 +0200| [10a3848b5d712dc47a513500b61eb0e901ec6d5b] | committer: Francois Cartegnie
demux: adaptative: always ignore group/program
Since we can swap formats, some doesn't provide any or same values
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10a3848b5d712dc47a513500b61eb0e901ec6d5b
---
modules/demux/adaptative/PlaylistManager.cpp | 11 +----------
modules/demux/adaptative/PlaylistManager.h | 1 -
modules/demux/adaptative/Streams.cpp | 16 ++--------------
modules/demux/adaptative/Streams.hpp | 3 ---
4 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/modules/demux/adaptative/PlaylistManager.cpp b/modules/demux/adaptative/PlaylistManager.cpp
index fb98d55..7876c81 100644
--- a/modules/demux/adaptative/PlaylistManager.cpp
+++ b/modules/demux/adaptative/PlaylistManager.cpp
@@ -215,14 +215,6 @@ mtime_t PlaylistManager::getFirstDTS() const
return dts;
}
-int PlaylistManager::getGroup() const
-{
- if (!streams.empty())
- return streams[0]->getGroup();
- else
- return -1;
-}
-
int PlaylistManager::esCount() const
{
int es = 0;
@@ -314,8 +306,7 @@ int PlaylistManager::doDemux(int64_t increment)
if( i_nzpcr != VLC_TS_INVALID )
{
i_nzpcr += increment;
- int group = getGroup();
- es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, group, VLC_TS_0 + i_nzpcr);
+ es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, 0, VLC_TS_0 + i_nzpcr);
}
break;
}
diff --git a/modules/demux/adaptative/PlaylistManager.h b/modules/demux/adaptative/PlaylistManager.h
index 5f18115..aa60b45 100644
--- a/modules/demux/adaptative/PlaylistManager.h
+++ b/modules/demux/adaptative/PlaylistManager.h
@@ -60,7 +60,6 @@ namespace adaptative
mtime_t getDuration() const;
mtime_t getPCR() const;
mtime_t getFirstDTS() const;
- int getGroup() const;
int esCount() const;
bool setPosition(mtime_t);
bool seekAble() const;
diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index c2f90e1..5ef349f 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -119,13 +119,6 @@ mtime_t Stream::getFirstDTS() const
return output->getFirstDTS();
}
-int Stream::getGroup() const
-{
- if(!output)
- return 0;
- return output->getGroup();
-}
-
int Stream::esCount() const
{
if(!output)
@@ -326,7 +319,6 @@ AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &f
{
realdemux = demux;
pcr = VLC_TS_INVALID;
- group = 0;
format = format_;
}
@@ -354,11 +346,6 @@ mtime_t AbstractStreamOutput::getPCR() const
return pcr;
}
-int AbstractStreamOutput::getGroup() const
-{
- return group;
-}
-
BaseStreamOutput::BaseStreamOutput(demux_t *demux, const StreamFormat &format, const std::string &name) :
AbstractStreamOutput(demux, format)
{
@@ -659,6 +646,7 @@ es_out_id_t * BaseStreamOutput::esOutAdd(const es_format_t *p_fmt)
es_format_t fmtcpy;
es_format_Init(&fmtcpy, p_fmt->i_cat, p_fmt->i_codec);
es_format_Copy(&fmtcpy, p_fmt);
+ fmtcpy.i_group = 0;
if(!fmtcpy.psz_language && !language.empty())
fmtcpy.psz_language = strdup(language.c_str());
if(!fmtcpy.psz_description && !description.empty())
@@ -756,7 +744,7 @@ int BaseStreamOutput::esOutControl(int i_query, va_list args)
else if( i_query == ES_OUT_SET_GROUP_PCR )
{
vlc_mutex_lock(&lock);
- group = (int) va_arg( args, int );
+ static_cast<void>(va_arg( args, int ));
pcr = (int64_t)va_arg( args, int64_t );
if(pcr > VLC_TS_INVALID && timestamps_offset > VLC_TS_INVALID)
pcr += (timestamps_offset - VLC_TS_0);
diff --git a/modules/demux/adaptative/Streams.hpp b/modules/demux/adaptative/Streams.hpp
index 972d129..efc67e8 100644
--- a/modules/demux/adaptative/Streams.hpp
+++ b/modules/demux/adaptative/Streams.hpp
@@ -73,7 +73,6 @@ namespace adaptative
bool isEOF() const;
mtime_t getPCR() const;
mtime_t getFirstDTS() const;
- int getGroup() const;
int esCount() const;
bool seekAble() const;
bool isSelected() const;
@@ -115,7 +114,6 @@ namespace adaptative
virtual void pushBlock(block_t *, bool) = 0;
virtual mtime_t getPCR() const;
virtual mtime_t getFirstDTS() const = 0;
- virtual int getGroup() const;
virtual int esCount() const = 0;
virtual bool seekAble() const = 0;
virtual void setPosition(mtime_t) = 0;
@@ -128,7 +126,6 @@ namespace adaptative
protected:
demux_t *realdemux;
mtime_t pcr;
- int group;
std::string language;
std::string description;
More information about the vlc-commits
mailing list