summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:17:58 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:17:58 +0100
commitac6fff2d6d514c4b4d72088114c1f2e42c5968cd (patch)
treec6e7607b5090ceff1e69a1f0fff206b1a7a9c07b /src/MuxElements.cpp
parentfedab89cd4625617b3e481f1f59ba0fc97b7305b (diff)
parent6800fb66282525542366bc58df3095b93e3bf8ca (diff)
downloaddabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.gz
dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.bz2
dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.zip
Merge branch 'servicelinking' into next
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r--src/MuxElements.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index 79aabf6..9dbe5fc 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -662,4 +662,29 @@ unsigned short DabSubchannel::getSizeDWord() const
return (bitrate * 3) >> 3;
}
+LinkageSet::LinkageSet(const std::string& name,
+ uint16_t lsn,
+ bool hard,
+ bool international) :
+ lsn(lsn),
+ active(true),
+ hard(hard),
+ international(international)
+{}
+
+
+LinkageSet LinkageSet::filter_type(const ServiceLinkType type)
+{
+ LinkageSet lsd(m_name, lsn, hard, international);
+
+ lsd.active = active;
+ lsd.keyservice = keyservice;
+
+ for (const auto& link : id_list) {
+ if (link.type == type) {
+ lsd.id_list.push_back(link);
+ }
+ }
+ return lsd;
+}