[vlc-commits] demux: adaptative: provide xmlreader reset ability
Francois Cartegnie
git at videolan.org
Tue Oct 27 19:13:55 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Oct 25 16:49:28 2015 +0100| [8672e25796b4fd0596194a72b893f6e6076ba266] | committer: Francois Cartegnie
demux: adaptative: provide xmlreader reset ability
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8672e25796b4fd0596194a72b893f6e6076ba266
---
modules/demux/adaptative/xml/DOMParser.cpp | 9 +++++++++
modules/demux/adaptative/xml/DOMParser.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/modules/demux/adaptative/xml/DOMParser.cpp b/modules/demux/adaptative/xml/DOMParser.cpp
index 9bf4fd2..a1a1a23 100644
--- a/modules/demux/adaptative/xml/DOMParser.cpp
+++ b/modules/demux/adaptative/xml/DOMParser.cpp
@@ -65,6 +65,15 @@ bool DOMParser::parse ()
return true;
}
+bool DOMParser::reset(stream_t *s)
+{
+ delete root;
+ root = NULL;
+ stream = s;
+ vlc_reader = xml_ReaderReset(vlc_reader, s);
+ return !!vlc_reader;
+}
+
Node* DOMParser::processNode()
{
const char *data;
diff --git a/modules/demux/adaptative/xml/DOMParser.h b/modules/demux/adaptative/xml/DOMParser.h
index cdc0027..7470bf3 100644
--- a/modules/demux/adaptative/xml/DOMParser.h
+++ b/modules/demux/adaptative/xml/DOMParser.h
@@ -45,6 +45,7 @@ namespace adaptative
virtual ~DOMParser ();
bool parse ();
+ bool reset (stream_t *);
Node* getRootNode ();
void print ();
More information about the vlc-commits
mailing list