Commit 10a3848b authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: adaptative: always ignore group/program

Since we can swap formats, some doesn't provide any or same values
parent 9f7aa6fe
......@@ -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;
}
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment