summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authormethodus <methodus@web.de>2012-10-12 13:38:12 +0200
committermethodus <methodus@web.de>2012-10-12 13:38:12 +0200
commit9b199c2d95141de43fac33412ec3e9fc1f543e71 (patch)
treecd62f387aad28bc8216774e52eda0582ebbcc526 /media
parente3ce4d1e7e47af0efe5bc1015ba38598e68a149d (diff)
downloadvdr-plugin-upnp-9b199c2d95141de43fac33412ec3e9fc1f543e71.tar.gz
vdr-plugin-upnp-9b199c2d95141de43fac33412ec3e9fc1f543e71.tar.bz2
Continued DVBProfiler for recordings and Live-TV channels
Diffstat (limited to 'media')
-rw-r--r--media/pluginManager.cpp14
-rw-r--r--media/profile.cpp36
2 files changed, 50 insertions, 0 deletions
diff --git a/media/pluginManager.cpp b/media/pluginManager.cpp
index baacbc2..ea7f82a 100644
--- a/media/pluginManager.cpp
+++ b/media/pluginManager.cpp
@@ -180,6 +180,20 @@ string cMetadata::Property::GetKey() const {
return key;
}
+cMetadata::Resource::Resource()
+: resourceUri(string())
+, protocolInfo(string())
+, duration(string())
+, resolution(string())
+, bitrate(0)
+, size(0)
+, sampleFrequency(0)
+, bitsPerSample(0)
+, nrAudioChannels(0)
+, colorDepth(0)
+{
+}
+
bool cMetadata::Resource::SetResourceUri(string resourceUri){
this->resourceUri = resourceUri;
return true;
diff --git a/media/profile.cpp b/media/profile.cpp
index 1b7b81c..0cff566 100644
--- a/media/profile.cpp
+++ b/media/profile.cpp
@@ -6,9 +6,45 @@
*/
#include "../include/media/profile.h"
+#include <sstream>
+#include <bitset>
using namespace upnp;
+DLNA4thField::DLNA4thField()
+: profile(string())
+, operations(DLNA_OPERATION_NONE)
+, playSpeeds(DLNA_PLAYSPEEDS_NONE)
+, conversionIndicator(DLNA_CONVERSION_NONE)
+, primaryFlags(DLNA_FLAG_NONE)
+{
+}
+
+DLNA4thField::DLNA4thField(string pn, uint8_t op, string ps, bool ci, uint32_t flags)
+: profile(pn)
+, operations(op)
+, playSpeeds(ps)
+, conversionIndicator(ci)
+, primaryFlags(flags)
+{
+}
+
+string DLNA4thField::ToString(){
+ stringstream ss;
+
+ if(profile.empty()) return "*";
+
+ ss << "DLNA.ORG_PN=" << profile << ";";
+
+ ss << "DLNA.ORG_OP=" << bitset<2>(operations) << ";";
+
+ ss << "DLNA.ORG_CI=" << bitset<1>(conversionIndicator) << ";";
+
+ ss << "DLNA.ORG_FLAGS=" << hex << primaryFlags << "000000000000000000000000" << ";";
+
+ return ss.str();
+}
+
image::cIcon image::DLNA_ICON_PNG_SM_24A = { "image/png", 48, 48, 24 };
image::cIcon image::DLNA_ICON_PNG_LRG_24A = { "image/png", 120, 120, 24 };