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;
}










SOAPUI 接口测试学习笔记节选 结果写入操作方法介绍

在测试过程中我们经常需要将记录保存到指定文件,便于后续分析,这里介绍这种场景代码如何编写 基本方式是先将需要的节点的值取出来,而取值的部分我们前面已讲过,现在就差一个文件的写入操作 继续对上面脚本做...
  • liuchangxin1982
  • liuchangxin1982
  • 2016年03月22日 08:15
  • 4746

【JAVA笔记——器】Spring Aop 实现Log日志系统——基本实现

Log日志系统可以说是项目开发中最基本的模块之一,在未使用Spring Aop之前,日志记录都是采用手工配置。由于开发人员的代码风格不统一,经常会导致日志风格混乱,难以阅读,甚至日志遗漏情况。 通过...
  • wang135139
  • wang135139
  • 2016年09月07日 23:10
  • 795

笔记-android log

monkey: add shell  monkey -p packageName -v 1500 log的分类:Verbose(黑色)  Debug(蓝色) Info(绿色) Warn(黄色) E...
  • yanjin_pang
  • yanjin_pang
  • 2016年09月12日 20:20
  • 125

laravel 基础笔记~快速入门

Laravel框架笔记课程大纲: 1. composer的安装 2. laravel框架的安装 3. 本地域名解析与apapche虚拟主机配置 4. 环境配置与...
  • LiuMiao1128
  • LiuMiao1128
  • 2016年08月04日 14:43
  • 2233

Archive Log笔记

1、log_archive_start=true 这个参数控制数据库实例启动的时候,是否启动归档进程,通常为ora_arc0_SID 2、归档进程启动了,并不意味着一定可以产生归档日志,因为还有一个开...
  • wester2008
  • wester2008
  • 2007年12月30日 22:10
  • 153

android log笔记

一、添加log 1 java层 import android.util.Log //在需要打印Log的地方执行Log.v,Log.d,Log.i,Log.w,Log.e. ...
  • DICKJTK
  • DICKJTK
  • 2015年03月17日 00:11
  • 1272

Git -> git log笔记

显示提交关系图 git log --graph --oneline 显示最近的几条日志 git log -3 --pretty=oneline 显示每次提交的具体改动 git log -p -1 显示...
  • FeeLang
  • FeeLang
  • 2014年05月12日 19:36
  • 1380

Android 笔记之Log

打印Log日志在程序开发调试中都无比重要,因此通常会为Log书写一个工具类来方便其使用。 public class UtilLog { public static boolean IsLog ...
  • ccw0054
  • ccw0054
  • 2017年01月08日 16:16
  • 179

【论文笔记】Learning to log

paper链接:http://www.academia.edu/download/36281506/jmzhu_icse2015.pdfAbstract作者先进行了背景介绍, 在这篇paper里提出...
  • u013398398
  • u013398398
  • 2017年08月26日 19:32
  • 157

Android Log 用法 笔记

android.util.Log常用的方法有5个:  根据首字母分别对应 Log.v()  VERBOSE 黑色,任何消息都会输出,这里的v代表verbose啰嗦的意思,平时使用就...
  • UFO00001
  • UFO00001
  • 2015年11月19日 10:44
  • 317
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:log笔记
举报原因:
原因补充:

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