示例#1
0
 void operator()( boost::property_tree::ptree & s, object_type & obj ) {
     boost::property_tree::ptree fr;
     clotho::utility::add_value_array( fr, obj.free_begin(), obj.free_end() );
     
     s.put_child( "free", fr );
     s.add( "free_size", obj.free_size() );
     s.add( "variable_count", obj.variable_count() );
 }
示例#2
0
GF::GF()
{
  boost::property_tree::ptree ac, audioCodecs, vc, videoCodecs;
  gst_init(nullptr, nullptr);

  moduleManager.loadModulesFromDirectories ("../../src/server:../../..");

  config.add ("configPath", "../../../tests" );
  config.add ("modules.kurento.SdpEndpoint.numAudioMedias", 1);
  config.add ("modules.kurento.SdpEndpoint.numVideoMedias", 1);

  ac.put ("name", "opus/48000/2");
  audioCodecs.push_back (std::make_pair ("", ac) );
  config.add_child ("modules.kurento.SdpEndpoint.audioCodecs", audioCodecs);

  vc.put ("name", "VP8/90000");
  videoCodecs.push_back (std::make_pair ("", vc) );
  config.add_child ("modules.kurento.SdpEndpoint.videoCodecs", videoCodecs);

  mediaPipelineId = moduleManager.getFactory ("MediaPipeline")->createObject (
                      config, "",
                      Json::Value() )->getId();
}
void LightSensor::SaveToTree(boost::property_tree::ptree& tree, const string& path) const
{
	pt::ptree &sensNode = tree.add(path + "lightsensor", "");
	sensNode.put("id", _id);
	sensNode.put("threshold", _threshold);
}