diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ConfigParser.cpp | 9 | ||||
-rw-r--r-- | src/ConfigParser.h | 10 | ||||
-rw-r--r-- | src/DabMultiplexer.cpp | 10 | ||||
-rw-r--r-- | src/DabMultiplexer.h | 15 | ||||
-rw-r--r-- | src/DabMux.cpp | 14 | ||||
-rw-r--r-- | src/MuxElements.cpp | 3 | ||||
-rw-r--r-- | src/MuxElements.h | 2 | ||||
-rw-r--r-- | src/RemoteControl.h | 3 | ||||
-rw-r--r-- | src/fig/FIG.h | 6 | ||||
-rw-r--r-- | src/fig/FIGCarousel.cpp | 3 | ||||
-rw-r--r-- | src/fig/FIGCarousel.h | 4 | ||||
-rw-r--r-- | src/utils.cpp | 6 | ||||
-rw-r--r-- | src/utils.h | 5 |
13 files changed, 47 insertions, 43 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index db01769..8795277 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -39,6 +39,7 @@ #include <boost/property_tree/ptree.hpp> #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/split.hpp> +#include <memory> #include <exception> #include <iostream> #include <vector> @@ -143,8 +144,8 @@ uint16_t get_announcement_flag_from_ptree( } void parse_ptree(boost::property_tree::ptree& pt, - boost::shared_ptr<dabEnsemble> ensemble, - boost::shared_ptr<BaseRemoteController> rc + std::shared_ptr<dabEnsemble> ensemble, + std::shared_ptr<BaseRemoteController> rc ) { using boost::property_tree::ptree; @@ -554,9 +555,9 @@ void parse_ptree(boost::property_tree::ptree& pt, void setup_subchannel_from_ptree(dabSubchannel* subchan, boost::property_tree::ptree &pt, - boost::shared_ptr<dabEnsemble> ensemble, + std::shared_ptr<dabEnsemble> ensemble, string subchanuid, - boost::shared_ptr<BaseRemoteController> rc) + std::shared_ptr<BaseRemoteController> rc) { using boost::property_tree::ptree; using boost::property_tree::ptree_error; diff --git a/src/ConfigParser.h b/src/ConfigParser.h index 1eec783..0b10c04 100644 --- a/src/ConfigParser.h +++ b/src/ConfigParser.h @@ -36,17 +36,17 @@ #include "MuxElements.h" #include "DabMux.h" #include <boost/property_tree/ptree.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> void parse_ptree(boost::property_tree::ptree& pt, - boost::shared_ptr<dabEnsemble> ensemble, - boost::shared_ptr<BaseRemoteController> rc); + std::shared_ptr<dabEnsemble> ensemble, + std::shared_ptr<BaseRemoteController> rc); void setup_subchannel_from_ptree(dabSubchannel* subchan, boost::property_tree::ptree &pt, - boost::shared_ptr<dabEnsemble> ensemble, + std::shared_ptr<dabEnsemble> ensemble, std::string subchanuid, - boost::shared_ptr<BaseRemoteController> rc); + std::shared_ptr<BaseRemoteController> rc); #endif diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index eb6de3d..fd59b8f 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -24,9 +24,9 @@ */ #include <set> +#include <memory> #include "DabMultiplexer.h" #include "ConfigParser.h" -#include <boost/make_shared.hpp> #include "fig/FIG.h" using namespace std; @@ -76,7 +76,7 @@ const unsigned short BitRateTable[64] = { }; DabMultiplexer::DabMultiplexer( - boost::shared_ptr<BaseRemoteController> rc, + std::shared_ptr<BaseRemoteController> rc, boost::property_tree::ptree pt) : RemoteControllable("mux"), m_pt(pt), @@ -89,7 +89,7 @@ DabMultiplexer::DabMultiplexer( currentFrame(0), insertFIG(0), rotateFIB(0), - ensemble(boost::make_shared<dabEnsemble>()), + ensemble(std::make_shared<dabEnsemble>()), fig_carousel(ensemble) { prepare_watermark(); @@ -125,7 +125,7 @@ void DabMultiplexer::prepare_watermark() void DabMultiplexer::update_config(boost::property_tree::ptree pt) { - ensemble_next = boost::make_shared<dabEnsemble>(); + ensemble_next = std::make_shared<dabEnsemble>(); m_pt_next = pt; @@ -425,7 +425,7 @@ void DabMultiplexer::prepare_data_inputs() } /* Each call creates one ETI frame */ -void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outputs) +void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs) { int cur; time_t date; diff --git a/src/DabMultiplexer.h b/src/DabMultiplexer.h index bafefff..aa468ea 100644 --- a/src/DabMultiplexer.h +++ b/src/DabMultiplexer.h @@ -49,7 +49,7 @@ #include <vector> #include <memory> #include <string> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/property_tree/ptree.hpp> class MuxInitException : public std::exception @@ -66,13 +66,14 @@ class MuxInitException : public std::exception class DabMultiplexer : public RemoteControllable { public: - DabMultiplexer(boost::shared_ptr<BaseRemoteController> rc, - boost::property_tree::ptree pt); + DabMultiplexer( + std::shared_ptr<BaseRemoteController> rc, + boost::property_tree::ptree pt); void prepare(void); unsigned long getCurrentFrame() { return currentFrame; } - void mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outputs); + void mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs); void print_info(void); @@ -95,7 +96,7 @@ class DabMultiplexer : public RemoteControllable { void reconfigure(void); boost::property_tree::ptree m_pt; - boost::shared_ptr<BaseRemoteController> m_rc; + std::shared_ptr<BaseRemoteController> m_rc; unsigned timestamp; bool MNSC_increment_time; @@ -128,11 +129,11 @@ class DabMultiplexer : public RemoteControllable { std::vector<dabSubchannel*>::iterator subchannelFIG0_1; - boost::shared_ptr<dabEnsemble> ensemble; + std::shared_ptr<dabEnsemble> ensemble; // Multiplex reconfiguration requires two sets of configurations boost::property_tree::ptree m_pt_next; - boost::shared_ptr<dabEnsemble> ensemble_next; + std::shared_ptr<dabEnsemble> ensemble_next; #if HAVE_OUTPUT_EDI std::ofstream edi_debug_file; diff --git a/src/DabMux.cpp b/src/DabMux.cpp index f3f0c95..18fee19 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -29,7 +29,7 @@ # include "config.h" #endif -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/info_parser.hpp> #include <cstdio> @@ -219,7 +219,7 @@ int main(int argc, char *argv[]) int returnCode = 0; ptree pt; - std::vector<boost::shared_ptr<DabOutput> > outputs; + std::vector<std::shared_ptr<DabOutput> > outputs; try { if (argc == 2) { // Assume the only argument is a config file @@ -276,15 +276,13 @@ int main(int argc, char *argv[]) /************** READ REMOTE CONTROL PARAMETERS *************/ int telnetport = pt.get<int>("remotecontrol.telnetport", 0); - boost::shared_ptr<BaseRemoteController> rc; + std::shared_ptr<BaseRemoteController> rc; if (telnetport != 0) { - rc = boost::shared_ptr<RemoteControllerTelnet>( - new RemoteControllerTelnet(telnetport)); + rc = std::make_shared<RemoteControllerTelnet>(telnetport); } else { - rc = boost::shared_ptr<RemoteControllerDummy>( - new RemoteControllerDummy()); + rc = std::make_shared<RemoteControllerDummy>(); } DabMultiplexer mux(rc, pt); @@ -412,7 +410,7 @@ int main(int argc, char *argv[]) return -1; } - boost::shared_ptr<DabOutput> dabout(output); + std::shared_ptr<DabOutput> dabout(output); outputs.push_back(dabout); } diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index adc6a60..b47a1ae 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -24,6 +24,7 @@ */ #include <vector> +#include <memory> #include <algorithm> #include "MuxElements.h" @@ -335,7 +336,7 @@ const string DabComponent::get_parameter(const string& parameter) const } -subchannel_type_t DabService::getType(boost::shared_ptr<dabEnsemble> ensemble) +subchannel_type_t DabService::getType(std::shared_ptr<dabEnsemble> ensemble) { vector<dabSubchannel*>::iterator subchannel; vector<DabComponent*>::iterator component = diff --git a/src/MuxElements.h b/src/MuxElements.h index 8539909..97b1390 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -361,7 +361,7 @@ class DabService : public RemoteControllable uint16_t ASu; std::vector<uint8_t> clusters; - subchannel_type_t getType(boost::shared_ptr<dabEnsemble> ensemble); + subchannel_type_t getType(std::shared_ptr<dabEnsemble> ensemble); unsigned char nbComponent(std::vector<DabComponent*>& components); DabLabel label; diff --git a/src/RemoteControl.h b/src/RemoteControl.h index 46a828f..e7bb7fe 100644 --- a/src/RemoteControl.h +++ b/src/RemoteControl.h @@ -31,6 +31,7 @@ #include <list> #include <map> +#include <memory> #include <string> #include <atomic> #include <iostream> @@ -105,7 +106,7 @@ class RemoteControllable { controller.enrol(this); } - virtual void enrol_at(boost::shared_ptr<BaseRemoteController> controller) { + virtual void enrol_at(std::shared_ptr<BaseRemoteController> controller) { controller->enrol(this); } diff --git a/src/fig/FIG.h b/src/fig/FIG.h index c1a5ae3..1c1ab8e 100644 --- a/src/fig/FIG.h +++ b/src/fig/FIG.h @@ -27,7 +27,7 @@ #ifndef __FIG_H_ #define __FIG_H_ -#include <boost/shared_ptr.hpp> +#include <memory> #include "MuxElements.h" namespace FIC { @@ -36,14 +36,14 @@ namespace FIC { class FIGRuntimeInformation { public: - FIGRuntimeInformation(boost::shared_ptr<dabEnsemble> e) : + FIGRuntimeInformation(std::shared_ptr<dabEnsemble> e) : currentFrame(0), ensemble(e), factumAnalyzer(false) {} time_t date; unsigned long currentFrame; - boost::shared_ptr<dabEnsemble> ensemble; + std::shared_ptr<dabEnsemble> ensemble; bool factumAnalyzer; }; diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp index c9daddf..5e1e82f 100644 --- a/src/fig/FIGCarousel.cpp +++ b/src/fig/FIGCarousel.cpp @@ -31,6 +31,7 @@ #include "fig/FIGCarousel.h" #include <boost/format.hpp> #include <iostream> +#include <memory> #include <deque> #define CAROUSELDEBUG 0 @@ -56,7 +57,7 @@ void FIGCarouselElement::increase_deadline() /**************** FIGCarousel *****************/ -FIGCarousel::FIGCarousel(boost::shared_ptr<dabEnsemble> ensemble) : +FIGCarousel::FIGCarousel(std::shared_ptr<dabEnsemble> ensemble) : m_rti(ensemble), m_fig0_0(&m_rti), m_fig0_1(&m_rti), diff --git a/src/fig/FIGCarousel.h b/src/fig/FIGCarousel.h index bb6b546..738a302 100644 --- a/src/fig/FIGCarousel.h +++ b/src/fig/FIGCarousel.h @@ -34,7 +34,7 @@ #include "fig/FIG1.h" #include <list> #include <map> -#include <boost/shared_ptr.hpp> +#include <memory> #include "MuxElements.h" namespace FIC { @@ -58,7 +58,7 @@ enum class FIBAllocation { class FIGCarousel { public: - FIGCarousel(boost::shared_ptr<dabEnsemble> ensemble); + FIGCarousel(std::shared_ptr<dabEnsemble> ensemble); void update(unsigned long currentFrame, time_t dabTime); diff --git a/src/utils.cpp b/src/utils.cpp index 7d80239..e87a698 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -24,7 +24,7 @@ */ #include <cstring> #include <iostream> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/algorithm/string/join.hpp> #include "DabMux.h" #include "utils.h" @@ -354,7 +354,7 @@ void printUsage(char *name, FILE* out) } #endif -void printOutputs(vector<boost::shared_ptr<DabOutput> >& outputs) +void printOutputs(vector<shared_ptr<DabOutput> >& outputs) { int index = 0; @@ -533,7 +533,7 @@ void printSubchannels(vector<dabSubchannel*>& subchannels) } } -void printEnsemble(const boost::shared_ptr<dabEnsemble> ensemble) +void printEnsemble(const shared_ptr<dabEnsemble> ensemble) { etiLog.log(info, "Ensemble"); etiLog.log(info, " id: 0x%lx (%lu)", ensemble->id, ensemble->id); diff --git a/src/utils.h b/src/utils.h index 3a5cf1c..926fa3d 100644 --- a/src/utils.h +++ b/src/utils.h @@ -29,6 +29,7 @@ #define _UTILS_H #include <cstdio> +#include <memory> #include "MuxElements.h" time_t getDabTime(); @@ -50,7 +51,7 @@ void printUsageConfigfile(char *name, FILE* out = stderr); /* The following four utility functions display a * description of all outputs, services, components * resp. subchannels*/ -void printOutputs(std::vector<boost::shared_ptr<DabOutput> >& outputs); +void printOutputs(std::vector<std::shared_ptr<DabOutput> >& outputs); void printServices(const std::vector<std::shared_ptr<DabService> >& services); @@ -59,7 +60,7 @@ void printComponents(std::vector<DabComponent*>& components); void printSubchannels(std::vector<dabSubchannel*>& subchannels); /* Print information about the whole ensemble */ -void printEnsemble(const boost::shared_ptr<dabEnsemble> ensemble); +void printEnsemble(const std::shared_ptr<dabEnsemble> ensemble); /* Print detailed component information */ void printComponent(DabComponent* component); |