提交 130d077b authored 作者: blu's avatar blu

init

上级 4a60847c
......@@ -315,7 +315,7 @@ public:
int main(int argc, const char *argv[])
{
av_log_set_level(AV_LOG_ERROR);
spdlog::set_level(spdlog::level::debug);
spdlog::set_level(spdlog::level::info);
EvMgr mgr;
mgr.join();
return 0;
......
......@@ -569,8 +569,8 @@ protected:
}
}
zmq_msg_close(&msg);
if(pktCnt % 1024 == 0) {
spdlog::info("seq: {}, pts: {}, dts: {}, dur: {}, idx: {}", pktCnt, packet.pts, packet.dts, packet.duration, packet.stream_index);
if(pktCnt % EV_LOG_PACKET_CNT == 0) {
spdlog::info("seq: {}, pts: {}, dts: {}, idx: {}", pktCnt, packet.pts, packet.dts, packet.stream_index);
}
pktCnt++;
......
......@@ -296,7 +296,7 @@ protected:
av_packet_unref(&packet);
continue;
}
if(pktCnt % 1024 == 0) {
if(pktCnt % EV_LOG_PACKET_CNT == 0) {
spdlog::info("pktCnt: {:d}", pktCnt);
}
......
......@@ -351,8 +351,12 @@ protected:
continue;
}
// decode
if(pktCnt % EV_LOG_PACKET_CNT == 0) {
spdlog::info("seq: {}, pts: {}, dts: {}, idx: {}", pktCnt, packet.pts, packet.dts, packet.stream_index);
}
pktCnt++;
// decode
ret = AVPacketSerializer::decode((char*)zmq_msg_data(&msg), ret, &packet);
{
if (ret < 0) {
......@@ -369,10 +373,6 @@ protected:
packet.stream_index = streamList[packet.stream_index];
out_stream = pAVFormatRemux->streams[packet.stream_index];
//calc pts
if(pktCnt % (18*60*5) == 0) {
spdlog::info("seq: {:lld}, pts: {:lld}, dts: {:lld}, dur: {:lld}, idx: {:d}", pktCnt, packet.pts, packet.dts, packet.duration, packet.stream_index);
}
/* copy packet */
if(pktCnt == 0) {
packet.pts = 0;
......
......@@ -402,8 +402,8 @@ protected:
out_stream = pAVFormatRemux->streams[packet.stream_index];
//calc pts
if(pktCnt % 1024 == 0) {
spdlog::info("seq: {}, pts: {}, dts: {}, dur: {}, idx: {}", pktCnt, packet.pts, packet.dts, packet.duration, packet.stream_index);
if(pktCnt % EV_LOG_PACKET_CNT == 0) {
spdlog::info("seq: {}, pts: {}, dts: {}, idx: {}", pktCnt, packet.pts, packet.dts, packet.stream_index);
}
/* copy packet */
if(pktCnt == 0) {
......@@ -481,6 +481,7 @@ public:
int main(int argc, const char *argv[])
{
av_log_set_level(AV_LOG_ERROR);
spdlog::set_level(spdlog::level::info);
EvSlicer es;
es.join();
......
......@@ -17,6 +17,8 @@ using json = nlohmann::json;
#define PS_MARK_E "DEADBEEF"
#define PS_MARK_S "BEEFDEAD"
#define EV_LOG_PACKET_CNT (18*60*5)
void avlogThrow(void *avcl, int lvl, const char *fmt, ...)
{
(void)avcl;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论