DEBUG.C
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:1k
源码类别:
VC书籍
开发平台:
Visual C++
- #include <stdarg.h>
- #include <stdio.h>
- #include "mp4_vars.h"
- #include "debug.h"
- /**
- *
- **/
- #ifndef _DECORE
- #ifdef _DEBUG
- static int siPrintPic_start = 0;
- static int siPrintPic_end = 0;
- static int siPrintMba_start = 0;
- static int siPrintMba_end = 0;
- /***/
- void _SetPrintCond(int picnum_start, int picnum_end,
- int mba_start, int mba_end)
- {
- siPrintPic_start = picnum_start;
- siPrintPic_end = picnum_end;
- siPrintMba_start = mba_start;
- siPrintMba_end = mba_end;
- }
- void _Print(const char * format, ...)
- {
- if ((mp4_state->hdr.picnum >= siPrintPic_start) &&
- (mp4_state->hdr.picnum <= siPrintPic_end))
- {
- if ((mp4_state->hdr.mba >= siPrintMba_start) &&
- (mp4_state->hdr.mba <= siPrintMba_end))
- {
- va_list arglist;
- va_start(arglist, format);
- vprintf(format, arglist);
- va_end(arglist);
- }
- }
- }
- void _Break(int picnum, int mba)
- {
- if ((mp4_state->hdr.picnum == picnum) && (mp4_state->hdr.mba == mba)) {
- int iBreak = 0;
- }
- }
- void _Error(const char * format, ...)
- {
- va_list arglist;
- va_start(arglist, format);
- vprintf(format, arglist);
- va_end(arglist);
- }
- #endif
- #endif