Commit 858cbefa authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Dash: static-ify isDash

parent b698c1c3
......@@ -75,13 +75,14 @@ static int Control (stream_t *p_stream, int i_query, va_list args);
/*****************************************************************************
* Open:
*****************************************************************************/
static int Open(vlc_object_t *p_this)
static int Open(vlc_object_t *p_obj)
{
stream_t *p_stream = (stream_t*) p_this;
stream_t *p_stream = (stream_t*) p_obj;
dash::xml::DOMParser parser(p_stream->p_source);
if(!parser.isDash())
if(!dash::xml::DOMParser::isDash(p_stream->p_source))
return VLC_EGENERIC;
dash::xml::DOMParser parser(p_stream->p_source);
if(!parser.parse())
{
msg_Dbg(p_stream, "could not parse file");
......@@ -111,16 +112,16 @@ static int Open(vlc_object_t *p_this)
p_stream->pf_peek = Peek;
p_stream->pf_control = Control;
msg_Dbg(p_this,"DASH filter: open (%s)", p_stream->psz_path);
msg_Dbg(p_obj,"DASH filter: open (%s)", p_stream->psz_path);
return VLC_SUCCESS;
}
/*****************************************************************************
* Close:
*****************************************************************************/
static void Close(vlc_object_t *p_this)
static void Close(vlc_object_t *p_obj)
{
stream_t *p_stream = (stream_t*) p_this;
stream_t *p_stream = (stream_t*) p_obj;
stream_sys_t *p_sys = (stream_sys_t *) p_stream->p_sys;
dash::DASHManager *p_dashManager = p_sys->p_dashManager;
dash::http::HTTPConnectionManager *p_conManager = p_sys->p_conManager;
......
......@@ -139,11 +139,11 @@ Profile DOMParser::getProfile (dash::xml::Node *node)
return dash::mpd::NotValid;
}
bool DOMParser::isDash ()
bool DOMParser::isDash (stream_t *stream)
{
const uint8_t *peek, *peek_end;
int64_t i_size = stream_Peek(this->stream, &peek, 2048);
int64_t i_size = stream_Peek(stream, &peek, 2048);
if(i_size < 1)
return false;
......
......@@ -55,7 +55,7 @@ namespace dash
Node* getRootNode ();
void print ();
dash::mpd::Profile getProfile (dash::xml::Node *node);
bool isDash ();
static bool isDash (stream_t *stream);
private:
Node *root;
......
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