log笔记

原创 2015年07月10日 17:06:02
printf("instance: %ld, %ld, %d, %ld, %ld, %ld, %ld, %ld, \n%ld, %ld, %d, %ld, %ld, %ld, %d, %d, \
%ld, %ld, %d-%d-%d-%d-%d-%d, %ld, %ld, %ld, %ld, %ld, %ld, \n%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %s, %s, \
%ld, %ld, %d, %d, %d, %d, %d, %c, 0x%x, 0x%x, \n%d, %ld, %ld, 0x%x, 0x%x, %d, %ld, %ld\n", 
g_record_instance[nChannel]->first_time_code,
g_record_instance[nChannel]->first_time_tick,
g_record_instance[nChannel]->first_i_frame,
g_record_instance[nChannel]->current_time_code,
g_record_instance[nChannel]->write_pos,
g_record_instance[nChannel]->frame_size,
g_record_instance[nChannel]->file_size,
g_record_instance[nChannel]->play_time,
g_record_instance[nChannel]->video_width,
g_record_instance[nChannel]->video_height,
g_record_instance[nChannel]->audio_channel,
g_record_instance[nChannel]->audio_sample_rate,
g_record_instance[nChannel]->audio_bit_rate,
g_record_instance[nChannel]->ip,
g_record_instance[nChannel]->channel,
g_record_instance[nChannel]->port,
g_record_instance[nChannel]->file_header.File_Flag,
g_record_instance[nChannel]->file_header.File_Size,
g_record_instance[nChannel]->file_header.Creation_Date.nYear,
g_record_instance[nChannel]->file_header.Creation_Date.nMonth,
g_record_instance[nChannel]->file_header.Creation_Date.nDay,
g_record_instance[nChannel]->file_header.Creation_Date.nHour,
g_record_instance[nChannel]->file_header.Creation_Date.nMinute,
g_record_instance[nChannel]->file_header.Creation_Date.nSecond,
g_record_instance[nChannel]->file_header.Play_Duration,
g_record_instance[nChannel]->file_header.BeginTimeTick,
g_record_instance[nChannel]->file_header.EndTimeTick,
g_record_instance[nChannel]->file_header.File_Type,
g_record_instance[nChannel]->file_header.Index_Position,
g_record_instance[nChannel]->file_header.AV_Format.nVideoEncType,
g_record_instance[nChannel]->file_header.AV_Format.nImageWidth,
g_record_instance[nChannel]->file_header.AV_Format.nImageHeight,
g_record_instance[nChannel]->file_header.AV_Format.nVideoBitRate,
g_record_instance[nChannel]->file_header.AV_Format.nFrameRate,
g_record_instance[nChannel]->file_header.AV_Format.nAudioEncType,
g_record_instance[nChannel]->file_header.AV_Format.nAudioChannels,
g_record_instance[nChannel]->file_header.AV_Format.nAudioSamples,
g_record_instance[nChannel]->file_header.AV_Format.nAudioBitRate,
g_record_instance[nChannel]->file_header.AV_Format.nReserve,
g_record_instance[nChannel]->file_header.Title,
g_record_instance[nChannel]->file_header.Reserved,
g_record_instance[nChannel]->frame_header.nTimeTick,
g_record_instance[nChannel]->frame_header.nVideoSize,
g_record_instance[nChannel]->frame_header.nAudioSize,
g_record_instance[nChannel]->frame_header.nImgWidth,
g_record_instance[nChannel]->frame_header.nImgHeight,
g_record_instance[nChannel]->frame_header.nKeyFrame,
g_record_instance[nChannel]->frame_header.nEnRefType,
g_record_instance[nChannel]->frame_header.nReserve,
g_record_instance[nChannel]->pcallback_fun,
g_record_instance[nChannel]->pcallback_fun2,
g_record_instance[nChannel]->seekable,
g_record_instance[nChannel]->index_cur_pos,
g_record_instance[nChannel]->index_max_pos,
g_record_instance[nChannel]->context,
g_record_instance[nChannel]->index_buf,
g_record_instance[nChannel]->init_instanceLock,
((TDS_INDEXOBJECT * )g_record_instance[nChannel]->index_buf)[0].Index_Flag, 

((TDS_INDEXOBJECT * )g_record_instance[nChannel]->index_buf)[0].Index_Count);











_IPC_DEBUG("start instance: %ld, %ld, %d, %ld, %ld, %ld, %ld, %ld, \n%ld, %ld, %d, %ld, %ld, %ld, %d, %d, \
%ld, %ld, %d-%d-%d-%d-%d-%d, %ld, %ld, %ld, %ld, %ld, %ld, \n%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %s, %s, \
%ld, %ld, %d, %d, %d, %d, %d, %c, 0x%x, 0x%x, \n%d, %ld, %ld, 0x%x, 0x%x, %d, %ld, %ld\n", 
  m_hRecInstance->first_time_code,
  m_hRecInstance->first_time_tick,
  m_hRecInstance->first_i_frame,
  m_hRecInstance->current_time_code,
  m_hRecInstance->write_pos,
  m_hRecInstance->frame_size,
  m_hRecInstance->file_size,
  m_hRecInstance->play_time,
  m_hRecInstance->video_width,
  m_hRecInstance->video_height,
  m_hRecInstance->audio_channel,
  m_hRecInstance->audio_sample_rate,
  m_hRecInstance->audio_bit_rate,
  m_hRecInstance->ip,
  m_hRecInstance->channel,
  m_hRecInstance->port,
  m_hRecInstance->file_header.File_Flag,
  m_hRecInstance->file_header.File_Size,
  m_hRecInstance->file_header.Creation_Date.nYear,
  m_hRecInstance->file_header.Creation_Date.nMonth,
  m_hRecInstance->file_header.Creation_Date.nDay,
  m_hRecInstance->file_header.Creation_Date.nHour,
  m_hRecInstance->file_header.Creation_Date.nMinute,
  m_hRecInstance->file_header.Creation_Date.nSecond,
  m_hRecInstance->file_header.Play_Duration,
  m_hRecInstance->file_header.BeginTimeTick,
  m_hRecInstance->file_header.EndTimeTick,
  m_hRecInstance->file_header.File_Type,
  m_hRecInstance->file_header.Index_Position,
  m_hRecInstance->file_header.AV_Format.nVideoEncType,
  m_hRecInstance->file_header.AV_Format.nImageWidth,
  m_hRecInstance->file_header.AV_Format.nImageHeight,
  m_hRecInstance->file_header.AV_Format.nVideoBitRate,
  m_hRecInstance->file_header.AV_Format.nFrameRate,
  m_hRecInstance->file_header.AV_Format.nAudioEncType,
  m_hRecInstance->file_header.AV_Format.nAudioChannels,
  m_hRecInstance->file_header.AV_Format.nAudioSamples,
  m_hRecInstance->file_header.AV_Format.nAudioBitRate,
  m_hRecInstance->file_header.AV_Format.nReserve,
  m_hRecInstance->file_header.Title,
  m_hRecInstance->file_header.Reserved,
  m_hRecInstance->frame_header.nTimeTick,
  m_hRecInstance->frame_header.nVideoSize,
  m_hRecInstance->frame_header.nAudioSize,
  m_hRecInstance->frame_header.nImgWidth,
  m_hRecInstance->frame_header.nImgHeight,
  m_hRecInstance->frame_header.nKeyFrame,
  m_hRecInstance->frame_header.nEnRefType,
  m_hRecInstance->frame_header.nReserve,
  m_hRecInstance->pcallback_fun,
  m_hRecInstance->pcallback_fun2,
  m_hRecInstance->seekable,
  m_hRecInstance->index_cur_pos,
  m_hRecInstance->index_max_pos,
  m_hRecInstance->context,
  m_hRecInstance->index_buf,
  m_hRecInstance->init_instanceLock,
  ((TDS_INDEXOBJECT * )m_hRecInstance->index_buf)[0].Index_Flag, 
  ((TDS_INDEXOBJECT * )m_hRecInstance->index_buf)[0].Index_Count);














char cfiledecinfo[32];


if (m_decFrame.uPictureID==0)
{
sprintf(cfiledecinfo, "pc_%d_%d_%d_%d______I.txt", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
}
else
{
sprintf(cfiledecinfo, "pc_%d_%d_%d_%d_P.txt", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
}
m_file = fopen(cfiledecinfo, "w");


char strInfo[1024*2];
ZeroMemory(strInfo, 1024*2);
sprintf(strInfo, "len: %d\n\
pY: 0x%x\n\
pU: 0x%x\n\
pV: 0x%x\n\
uWidth: %d\n\
uHeight: %d\n\
uYStride: %d\n\
uUVStride: %d\n\
uCroppingLeftOffset: %d\n\
uCroppingRightOffset: %d\n\
uCroppingTopOffset: %d\n\
uCroppingBottomOffset: %d\n\
uDpbIdx: %d\n\
uPicFlag: %d\n\
bError: %d\n\
bIntra: %d\n\
ullPTS: %I64d\n\
uPictureID: %d\n\
uReserved: %d\n\
pUserData: %d\n\
pFrameInfo: %d\n",
len,
m_decFrame.pY,
m_decFrame.pU,
m_decFrame.pV,
m_decFrame.uWidth,
m_decFrame.uHeight,
m_decFrame.uYStride,
m_decFrame.uUVStride,
m_decFrame.uCroppingLeftOffset,
m_decFrame.uCroppingRightOffset,
m_decFrame.uCroppingTopOffset,
m_decFrame.uCroppingBottomOffset,
m_decFrame.uDpbIdx,
m_decFrame.uPicFlag,
m_decFrame.bError,
m_decFrame.bIntra,
m_decFrame.ullPTS,
m_decFrame.uPictureID,
m_decFrame.uReserved,
m_decFrame.pUserData,
m_decFrame.pFrameInfo);


if (NULL != m_file)
{
fwrite(strInfo, 1024*2, 1, m_file);
}


char strUseData[1024];
ZeroMemory(strUseData, 1024);


int index=0;


hiH264_USERDATA_S *phiUserData = m_decFrame.pUserData;
while(NULL!=phiUserData && NULL!=m_file)
{
ZeroMemory(strUseData, 1024);
sprintf(strUseData, "\nxxxIndex: %d\npuserData: 0x%x\nuUserDataType: %d\nuUserDataSize: %d\npData: %s\n", 
index++,
phiUserData,
phiUserData->uUserDataType,
phiUserData->uUserDataSize,
phiUserData->pData);


fwrite(strUseData, 1024, 1, m_file);
phiUserData = phiUserData->pNext;
}


char strFrameInfo[1024];
ZeroMemory(strFrameInfo, 1024);


if (NULL!=m_decFrame.pFrameInfo && NULL!=m_file)
{
sprintf(strFrameInfo, "\nuPicBytes: %d\n\
uI4MbNum: %d\n\
uI8MbNum: %d\n\
uI16MbNum: %d\n\
uP16MbNum: %d\n\
uP16x8MbNum: %d\n\
uP8x16MbNum: %d\n\
uP8MbNum: %d\n\
uPskipMbNum: %d\n\
uIpcmMbNum: %d\n",
m_decFrame.pFrameInfo->uPicBytes,
m_decFrame.pFrameInfo->uI4MbNum,
m_decFrame.pFrameInfo->uI8MbNum,
m_decFrame.pFrameInfo->uI16MbNum,
m_decFrame.pFrameInfo->uP16MbNum,
m_decFrame.pFrameInfo->uP16x8MbNum,
m_decFrame.pFrameInfo->uP8x16MbNum,
m_decFrame.pFrameInfo->uP8MbNum,
m_decFrame.pFrameInfo->uPskipMbNum,
m_decFrame.pFrameInfo->uIpcmMbNum
);
fwrite(strFrameInfo, 1024, 1, m_file);


fclose(m_file);
m_file = NULL;
}










相关文章推荐

log4j的学习笔记

  • 2011年05月13日 22:41
  • 70KB
  • 下载

log4J学习笔记

  • 2012年05月09日 20:44
  • 45KB
  • 下载

log4j 1.x 2.x 源码阅读笔记

周晓峰 - xiaofeng.zhouxf83@gmail.com 2014年10月15日 log4j 1.2.x 版本介绍 log4j 全称 log f...

log4j使用笔记

  • 2014年11月29日 10:54
  • 1.27MB
  • 下载

Log4Qt使用笔记(三)

接前面Log4Qt 使用笔记(一),继续学习一下,关注环境变量和初始化: Logger 在前面,我们提到,除了一个根root之外,还可以有多个命名的Logger存在,为了直观,我们可以...

log4j详细的学习笔记.

  • 2010年04月05日 14:31
  • 126KB
  • 下载

log4j学习笔记

  • 2008年03月26日 12:35
  • 185KB
  • 下载

InnoDB存储引擎redo log文件——《MySQL技术内幕InnoDB存储引擎》读书笔记

redo log的作用是记录事务日志。万一实例或介质失败,可以通过redo log进行恢复,保证数据的完整性。 每个InnoDB存储引擎至少有1个redo log文件组,每个文件组下至少有2个redo...

log4j的笔记

  • 2007年07月12日 14:56
  • 38KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:log笔记
举报原因:
原因补充:

(最多只允许输入30个字)