Commit 10a3848b authored by Francois Cartegnie's avatar Francois Cartegnie

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 ...@@ -215,14 +215,6 @@ mtime_t PlaylistManager::getFirstDTS() const
return dts; return dts;
} }
int PlaylistManager::getGroup() const
{
if (!streams.empty())
return streams[0]->getGroup();
else
return -1;
}
int PlaylistManager::esCount() const int PlaylistManager::esCount() const
{ {
int es = 0; int es = 0;
...@@ -314,8 +306,7 @@ int PlaylistManager::doDemux(int64_t increment) ...@@ -314,8 +306,7 @@ int PlaylistManager::doDemux(int64_t increment)
if( i_nzpcr != VLC_TS_INVALID ) if( i_nzpcr != VLC_TS_INVALID )
{ {
i_nzpcr += increment; i_nzpcr += increment;
int group = getGroup(); es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, 0, VLC_TS_0 + i_nzpcr);
es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, group, VLC_TS_0 + i_nzpcr);
} }
break; break;
} }
......
...@@ -60,7 +60,6 @@ namespace adaptative ...@@ -60,7 +60,6 @@ namespace adaptative
mtime_t getDuration() const; mtime_t getDuration() const;
mtime_t getPCR() const; mtime_t getPCR() const;
mtime_t getFirstDTS() const; mtime_t getFirstDTS() const;
int getGroup() const;
int esCount() const; int esCount() const;
bool setPosition(mtime_t); bool setPosition(mtime_t);
bool seekAble() const; bool seekAble() const;
......
...@@ -119,13 +119,6 @@ mtime_t Stream::getFirstDTS() const ...@@ -119,13 +119,6 @@ mtime_t Stream::getFirstDTS() const
return output->getFirstDTS(); return output->getFirstDTS();
} }
int Stream::getGroup() const
{
if(!output)
return 0;
return output->getGroup();
}
int Stream::esCount() const int Stream::esCount() const
{ {
if(!output) if(!output)
...@@ -326,7 +319,6 @@ AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &f ...@@ -326,7 +319,6 @@ AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &f
{ {
realdemux = demux; realdemux = demux;
pcr = VLC_TS_INVALID; pcr = VLC_TS_INVALID;
group = 0;
format = format_; format = format_;
} }
...@@ -354,11 +346,6 @@ mtime_t AbstractStreamOutput::getPCR() const ...@@ -354,11 +346,6 @@ mtime_t AbstractStreamOutput::getPCR() const
return pcr; return pcr;
} }
int AbstractStreamOutput::getGroup() const
{
return group;
}
BaseStreamOutput::BaseStreamOutput(demux_t *demux, const StreamFormat &format, const std::string &name) : BaseStreamOutput::BaseStreamOutput(demux_t *demux, const StreamFormat &format, const std::string &name) :
AbstractStreamOutput(demux, format) AbstractStreamOutput(demux, format)
{ {
...@@ -659,6 +646,7 @@ es_out_id_t * BaseStreamOutput::esOutAdd(const es_format_t *p_fmt) ...@@ -659,6 +646,7 @@ es_out_id_t * BaseStreamOutput::esOutAdd(const es_format_t *p_fmt)
es_format_t fmtcpy; es_format_t fmtcpy;
es_format_Init(&fmtcpy, p_fmt->i_cat, p_fmt->i_codec); es_format_Init(&fmtcpy, p_fmt->i_cat, p_fmt->i_codec);
es_format_Copy(&fmtcpy, p_fmt); es_format_Copy(&fmtcpy, p_fmt);
fmtcpy.i_group = 0;
if(!fmtcpy.psz_language && !language.empty()) if(!fmtcpy.psz_language && !language.empty())
fmtcpy.psz_language = strdup(language.c_str()); fmtcpy.psz_language = strdup(language.c_str());
if(!fmtcpy.psz_description && !description.empty()) if(!fmtcpy.psz_description && !description.empty())
...@@ -756,7 +744,7 @@ int BaseStreamOutput::esOutControl(int i_query, va_list args) ...@@ -756,7 +744,7 @@ int BaseStreamOutput::esOutControl(int i_query, va_list args)
else if( i_query == ES_OUT_SET_GROUP_PCR ) else if( i_query == ES_OUT_SET_GROUP_PCR )
{ {
vlc_mutex_lock(&lock); 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 ); pcr = (int64_t)va_arg( args, int64_t );
if(pcr > VLC_TS_INVALID && timestamps_offset > VLC_TS_INVALID) if(pcr > VLC_TS_INVALID && timestamps_offset > VLC_TS_INVALID)
pcr += (timestamps_offset - VLC_TS_0); pcr += (timestamps_offset - VLC_TS_0);
......
...@@ -73,7 +73,6 @@ namespace adaptative ...@@ -73,7 +73,6 @@ namespace adaptative
bool isEOF() const; bool isEOF() const;
mtime_t getPCR() const; mtime_t getPCR() const;
mtime_t getFirstDTS() const; mtime_t getFirstDTS() const;
int getGroup() const;
int esCount() const; int esCount() const;
bool seekAble() const; bool seekAble() const;
bool isSelected() const; bool isSelected() const;
...@@ -115,7 +114,6 @@ namespace adaptative ...@@ -115,7 +114,6 @@ namespace adaptative
virtual void pushBlock(block_t *, bool) = 0; virtual void pushBlock(block_t *, bool) = 0;
virtual mtime_t getPCR() const; virtual mtime_t getPCR() const;
virtual mtime_t getFirstDTS() const = 0; virtual mtime_t getFirstDTS() const = 0;
virtual int getGroup() const;
virtual int esCount() const = 0; virtual int esCount() const = 0;
virtual bool seekAble() const = 0; virtual bool seekAble() const = 0;
virtual void setPosition(mtime_t) = 0; virtual void setPosition(mtime_t) = 0;
...@@ -128,7 +126,6 @@ namespace adaptative ...@@ -128,7 +126,6 @@ namespace adaptative
protected: protected:
demux_t *realdemux; demux_t *realdemux;
mtime_t pcr; mtime_t pcr;
int group;
std::string language; std::string language;
std::string description; 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