Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / Examples / psi2tsModule / psi2ts.cc
index 2ff2538..ce0023c 100644 (file)
@@ -31,7 +31,7 @@
 //#include "psi2ts.cc.mpp"
 
 #define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace {
     template <class InputIterator, class Distance>
@@ -43,35 +43,43 @@ namespace {
 }
 
 
-prefix_ Psi2TsModule::Psi2TsModule()
+prefix_ Psi2TsModule::Psi2TsModule(unsigned pid, senf::ClockService::clock_type timeout)
 {
+    pid_ = pid;
     continuity_counter_ = 0;
     state_ = IDLE;
     route( input, output );
     input.onRequest( &Psi2TsModule::onRequest );
+    timeout_ = timeout;
 }
-
+#include <senf/Utils/hexdump.hh>
 prefix_ void Psi2TsModule::onRequest()
 {
     senf::PacketData & section = input.read().data();
     iterator sec_end = section.end();
     iterator begin = section.begin();
     iterator end = section.begin();
-    advance_max( end, 184, sec_end);
-    
+    advance_max( end, 183, sec_end);
+
     do {
         senf::TransportPacket tsPacket (senf::TransportPacket::create(188));
         tsPacket->continuity_counter() = next_continuity_counter();
+        tsPacket->pid() = pid_;
         if (state_ == IDLE) {
             state_ = PROC;
-            tsPacket->pusi() = true;
+            tsPacket->setPUSI(true);
+            tsPacket->pointer_field() = 0;
         }
         senf::PacketData & payloadData (tsPacket.next().data());
-        std::copy( begin, end, payloadData.begin() );
+        std::fill(
+                std::copy( begin, end, payloadData.begin() ),
+                payloadData.end(),
+                0xff
+        );
         tsPacket.finalize();
-        
+
         output.write( tsPacket);
-        
+
         advance_max( begin, 184, sec_end);
         advance_max( end,   184, sec_end);
     } while (begin != end);
@@ -85,7 +93,7 @@ prefix_ unsigned Psi2TsModule::next_continuity_counter()
 }
 
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 //#include "psi2ts.cc.mpp"