专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 多媒体/流媒体开发

这个程序里几个参数是什么意思解决办法

发布时间:2011-06-27 19:26:42 文章来源:www.iduyao.cn 采编人员:星星草
这个程序里几个参数是什么意思
#include <stdio.h>  
  #include <conio.h>  
  #include <sys/stat.h>  
  #include <ddraw.h>  
#pragma comment(lib,"ddraw.lib")
 
   
  unsigned char *y;  
  unsigned char *u;  
  unsigned char *v;  
   
  bool testsize(int w, int h, int s, int *pw, int *ph);  
   
  int main(int argc, char *argv[])  
  {  
  HRESULT hr;  
  LPDIRECTDRAW lpDD;  
  DDSURFACEDESC ddsd;  
  LPDIRECTDRAWSURFACE lpPrimary;  
  LPDIRECTDRAWSURFACE lpOverlay;  
  RECT rcSrc;  
  FILE *fd;  
  int i, j, f;  
  char name[256];  
  unsigned char *py, *pu, *pv;  
  unsigned int *dst;  
  int ffirst, fcount, ms_per_frame;  
  int width, height, size;  
  int width2, height2, size2;  
  int t1, t2;  
  char c;  
  bool done, wait;  
   
  if (argc != 4 && argc != 6 && argc != 7)  
  {  
  fprintf(stderr, "vidplay template first count [width height [ms_per_frame]]");  
  return -1;  
  }  
  sscanf(argv[2], "%d", &ffirst);  
  sscanf(argv[3], "%d", &fcount);  
  if (argc == 7)  
  {  
  sscanf(argv[6], "%d", &ms_per_frame);  
  }  
  else  
  {  
  ms_per_frame = 33;  
  }  
  if (argc >= 6)  
  {  
  sscanf(argv[4], "%d", &width);  
  sscanf(argv[5], "%d", &height);  
  }  
  else  
  {  
  struct _stat st;  
  sprintf(name, argv[1], ffirst);  
  if (_stat(name, &st) != 0)  
  return -1;  
  size = st.st_size;  
  if (!(testsize( 176, 144, size, &width, &height)  
  || testsize( 352, 240, size, &width, &height)  
  || testsize( 352, 480, size, &width, &height)  
  || testsize( 704, 480, size, &width, &height)  
  || testsize( 720, 480, size, &width, &height)  
  || testsize( 352, 288, size, &width, &height)  
  || testsize( 352, 576, size, &width, &height)  
  || testsize( 704, 576, size, &width, &height)  
  || testsize( 720, 576, size, &width, &height)  
  || testsize( 8, 8, size, &width, &height)  
  || testsize( 16, 16, size, &width, &height)  
  || testsize( 32, 32, size, &width, &height)  
  || testsize( 64, 64, size, &width, &height)  
  || testsize( 128, 128, size, &width, &height)  
  || testsize( 256, 256, size, &width, &height)  
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: