Commit 6b984f72 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

dash: Fixing STREAM_GET_SIZE control query.

parent e7a13d6b
......@@ -109,3 +109,8 @@ const logic::IAdaptationLogic* DASHManager::getAdaptionLogic() const
{
return this->adaptationLogic;
}
const Chunk *DASHManager::getCurrentChunk() const
{
return this->currentChunk;
}
......@@ -47,6 +47,7 @@ namespace dash
int peek( const uint8_t **pp_peek, size_t i_peek );
const mpd::IMPDManager* getMpdManager() const;
const logic::IAdaptationLogic* getAdaptionLogic() const;
const http::Chunk *getCurrentChunk() const;
private:
http::HTTPConnectionManager *conManager;
......
......@@ -199,9 +199,20 @@ static int Control (stream_t *p_stream, int i_query, va_list args)
case STREAM_SET_POSITION:
return VLC_EGENERIC;
case STREAM_GET_SIZE:
{
uint64_t* res = (va_arg (args, uint64_t *));
if(p_sys->isLive)
*(va_arg (args, uint64_t *)) = 0;
*res = 0;
else
{
const dash::mpd::Representation *rep = p_sys->p_dashManager->getAdaptionLogic()->getCurrentRepresentation();
if ( rep == NULL )
*res = 0;
else
*res = p_sys->p_mpd->getDuration() * rep->getBandwidth();
}
break;
}
default:
return VLC_EGENERIC;
}
......
......@@ -42,7 +42,6 @@ namespace dash
virtual void done();
private:
bool containRuntimeIdentifier;
Representation* representation;
size_t beginTime;
size_t beginIndex;
int currentSegmentIndex;
......
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