#include "callback.h"
#include "dvbsubtitles.h"
#include "log.h"
+#include "telem.h"
#include <cstdlib>
#include <algorithm>
bool Demuxer::submitPacket(PESPacket& packet)
{
+ TELEM(2, packet.getPacketType());
+ TELEM(3, packet.getPTS());
+
u4 sent = 0;
u1 packet_type = packet.getPacketType();
const u1* packetdata = packet.getData();
#include "osdreceiver.h"
#include "buffer.h"
#include "util.h"
+#include "telem.h"
#include "playervideorec.h"
threadBuffer.set(vdr->getBlock(feedPosition, askFor, &thisRead));
//logger->log("Player", Log::DEBUG, "Get Block out");
+ TELEM(1, feedPosition);
+
feedPosition += thisRead;
if (!vdr->isConnected())
#include <string.h>
//#include "oldlog.h"
+
+#include "telem.h"
+
#include "stream.h"
+int Stream::which{};
+
+Stream::Stream()
+{
+ localWhich = which++;
+}
+
Stream::~Stream()
{
shutdown();
hasdts = true;
}
+ TELEM((localWhich ? 11 : 4), newPacket.pts);
+ TELEM((localWhich ? 12 : 5), newPacket.dts);
+
//ok we have the pts now convert it to a continously time code in 100ns units
- if (hasdts && draintarget->dtsTimefix()) newPacket.presentation_time = static_cast<u8>(newPacket.dts * 10000LL / 90LL);
- else newPacket.presentation_time = static_cast<u8>(newPacket.pts * 10000LL / 90LL);
+ if (hasdts && draintarget->dtsTimefix()) newPacket.presentation_time = static_cast<u8>(newPacket.dts * 10000LL / 90LL); // Windows only
+ else newPacket.presentation_time = static_cast<u8>(newPacket.pts * 10000LL / 90LL);
+
+ TELEM((localWhich ? 13 : 6), newPacket.presentation_time);
+
+ // now PTS & DTS are original, presentation_time is OMX ticks. If it's rolled, it's rolled!
//newPacket.presentation_time-=draintarget->SetStartOffset(static_cast<u8>(newPacket.pts*10000LL/90LL),&newPacket.disconti);
- newPacket.presentation_time -= draintarget->SetStartOffset(static_cast<u8>(newPacket.pts * 10000LL / 90LL), &newPacket.disconti);
+ //newPacket.presentation_time -= draintarget->SetStartOffset(static_cast<u8>(newPacket.pts * 10000LL / 90LL), &newPacket.disconti);
+ long long returnedStartOffset = draintarget->SetStartOffset(static_cast<u8>(newPacket.pts * 10000LL / 90LL), &newPacket.disconti);
+ newPacket.presentation_time -= returnedStartOffset;
+ //LogNT::getInstance()->debug("MP", "draintarget {} PTSmod {} disconti {} rso: {}", (void*)draintarget, newPacket.presentation_time, newPacket.disconti, returnedStartOffset);
+
+ TELEM((localWhich ? 14 : 7), newPacket.presentation_time);
+ TELEM((localWhich ? 15 : 8), returnedStartOffset);
}
}
class Stream
{
public:
+ Stream();
~Stream();
int init(DrainTarget* tdt, int bufsize);
void shutdown();
bool drain(bool* dataavail = NULL);
private:
+ static int which;
+ int localWhich{};
MediaPacketList mediapackets;
u4 cur_packet_pos{};
std::mutex mutex;
#include "inputman.h"
#include "util.h"
#include "config.h"
+#include "telem.h"
#include "videoomx.h"
// logger->debug(TAG, "DMP mark 1");
//logger->debug(TAG, "DeliverMediaPacketOMX time {}", packet.presentation_time);
+ TELEM(9, packet.presentation_time);
+
/*First Check, if we have an video sample*/
if (iframemode)
{
}
lastreftimeOMX = packet.presentation_time;
+ TELEM(10, lastreftimeOMX);
// logger->debug(TAG, "Time code {} pts {}", lastreftimeOMX,packet.pts);
lastreftimePTS = packet.pts;
cur_input_buf_omx->nTimeStamp = intToOMXTicks(lastreftimeOMX / 10LL); // the clock component is faulty;