diff options
author | chriszero <zerov83@gmail.com> | 2015-01-28 21:17:18 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-01-28 21:17:18 +0100 |
commit | 87eb8a9e931606da4197391b6e3a09376b1383c2 (patch) | |
tree | 9427c28a2d7e9e44d4d77dc7fe53ff91f5152e23 /Stream.cpp | |
parent | 1da4dbe662e75be47e046472137c6bd72daa7b4d (diff) | |
download | vdr-plugin-plex-87eb8a9e931606da4197391b6e3a09376b1383c2.tar.gz vdr-plugin-plex-87eb8a9e931606da4197391b6e3a09376b1383c2.tar.bz2 |
- Counting played time correctly
- Implemented switching audiostreams
- Removed some compile warnings
Diffstat (limited to 'Stream.cpp')
-rw-r--r-- | Stream.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Stream.cpp b/Stream.cpp new file mode 100644 index 0000000..1611f72 --- /dev/null +++ b/Stream.cpp @@ -0,0 +1,26 @@ +#include "Stream.h" + +namespace plexclient +{ + +Stream::Stream(Poco::XML::Node* pNode) +{ + if(Poco::icompare(pNode->nodeName(), "Stream") == 0) { + + Poco::XML::AutoPtr<Poco::XML::NamedNodeMap> pAttribs = pNode->attributes(); + + m_iID = GetNodeValueAsInt(pAttribs->getNamedItem("id")); + m_iStreamType = GetNodeValueAsInt(pAttribs->getNamedItem("streamType")); + m_iIndex = GetNodeValueAsInt(pAttribs->getNamedItem("index")); + m_iChannels = GetNodeValueAsInt(pAttribs->getNamedItem("channels")); + m_sCodec = GetNodeValue(pAttribs->getNamedItem("codec")); + m_sCodecId = GetNodeValue(pAttribs->getNamedItem("codecID")); + m_sLanguage = GetNodeValue(pAttribs->getNamedItem("language")); + m_sLanguageCode = GetNodeValue(pAttribs->getNamedItem("languageCode")); + m_eStreamType = GetNodeValueAsStreamType(pAttribs->getNamedItem("streamType")); + + pAttribs->release(); + } +} + +} // namespace |