• 大小: 12.51MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-29
  • 语言: 其他
  • 标签: YUV  播放  

资源简介

YUV播放器源代码。VC的工程,可以播放YUV数据。

资源截图

代码片段和文件信息

/************************************************************************
 *
 *  Ye-Kui Wang       wyk@ieee.org
 *  Juan-Juan Jiang   juanjuan_j@hotmail.com
 *  
 *  March 14 2002
 *
 ************************************************************************/

/*
 * Disclaimer of Warranty
 *
 * These software programs are available to the user without any
 * license fee or royalty on an “as is“ basis.  The developers disclaim 
 * any and all warranties whether express implied or statuary including 
 * any implied warranties or merchantability or of fitness for a particular 
 * purpose.  In no event shall the copyright-holder be liable for any incidental
 * punitive or consequential damages of any kind whatsoever arising from 
 * the use of these programs.
 *
 * This disclaimer of warranty extends to the user of these programs
 * and user‘s customers employees agents transferees successors
 * and assigns.
 *
 * The developers does not represent or warrant that the programs furnished 
 * hereunder are free of infringement of any third-party patents.
 *
 * */


// ChildWindow.cpp : implementation file
//

#include “stdafx.h“
#include “YUVviewer.h“
#include “ChildWindow.h“
#include “YUVviewerDlg.h“


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CChildWindow

IMPLEMENT_DYNCREATE(CChildWindow CframeWnd)

CChildWindow::CChildWindow()
{
}
CChildWindow::~CChildWindow()
{
GlobalUnlock(hloc);
GlobalFree(hloc);  

free(RGBbuf);
free(Y);
free(Cb);
free(Cr);
}

CChildWindow::CChildWindow( CframeWnd *pParentWndint Widthint Height BOOL bColor)
{    
iWidth=Width;iHeight=Height;bColorImage=bColor;

  m_iCount = ((CYUVviewerDlg *)pParentWnd)->m_iCount;
  inSeqName = ((CYUVviewerDlg *)pParentWnd)->inSeqName[m_iCount];

if(((CYUVviewerDlg *)pParentWnd)->m_nZoom == -1)
m_nzoom = 1;
else if(((CYUVviewerDlg *)pParentWnd)->m_nZoom == 0)
m_nzoom = 2;

nPicShowOrder=0;

if (NULL== (Y = (unsigned char *)malloc(iWidth*iHeight) ) ) 
{
AfxMessageBox(“Couldn‘t allocate memory for RGBbuf\n“);
return;
}
if (NULL== (Cb = (unsigned char *)malloc(iWidth*iHeight/4) ) ) 
{
AfxMessageBox(“Couldn‘t allocate memory for RGBbuf\n“);
return;
}
if (NULL== (Cr = (unsigned char *)malloc(iWidth*iHeight/4) ) ) 
{
AfxMessageBox(“Couldn‘t allocate memory for RGBbuf\n“);
return;
}
if (NULL== (RGBbuf = (unsigned char *)malloc(iWidth*iHeight*3) ) ) 
{
AfxMessageBox(“Couldn‘t allocate memory for RGBbuf\n“);
return;
}

DWORD Attrstyle;
    
hloc = GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE
    sizeof(BITMAPINFOHEADER) + (sizeof(RGBQUAD) * 256));
BmpInfo = (LPBITMAPINFO) GlobalLock(hloc);


Attrstyle = //WS_OVERLAPPEDWINDOW;
WS_OVERLAPPED|WS_CAPTION|WS_THICKframe|WS_MAXIMIZEBOX|WS_MINIMIZEBOX;
    C

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7157  2003-02-28 22:49  YUV_Player\YUV_Player\ChildWindow.cpp

     文件       2757  2002-03-14 13:49  YUV_Player\YUV_Player\ChildWindow.h

     文件       1379  2001-07-28 11:41  YUV_Player\YUV_Player\Convert.h

     文件       6142  2001-07-28 11:41  YUV_Player\YUV_Player\cscc.lib

     文件       7062  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\BuildLog.htm

     文件      37414  2010-12-27 15:45  YUV_Player\YUV_Player\Debug\ChildWindow.obj

     文件         67  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\mt.dep

     文件     464025  2010-12-27 15:33  YUV_Player\YUV_Player\Debug\StdAfx.obj

     文件     904192  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\vc90.idb

     文件    1978368  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\vc90.pdb

     文件    1792000  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\YUVviewer.exe

     文件        406  2010-12-27 15:46  YUV_Player\YUV_Player\Debug\YUVviewer.exe.embed.manifest

     文件        472  2010-12-27 15:46  YUV_Player\YUV_Player\Debug\YUVviewer.exe.embed.manifest.res

     文件        381  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\YUVviewer.exe.intermediate.manifest

     文件    5699008  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\YUVviewer.ilk

     文件      25459  2010-12-27 15:45  YUV_Player\YUV_Player\Debug\YUVviewer.obj

     文件   24772608  2010-12-27 15:33  YUV_Player\YUV_Player\Debug\YUVviewer.pch

     文件   11193344  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\YUVviewer.pdb

     文件      16968  2010-12-27 15:46  YUV_Player\YUV_Player\Debug\YUVviewer.res

     文件     116280  2010-12-27 16:05  YUV_Player\YUV_Player\Debug\YUVviewerDlg.obj

     文件       1761  2002-03-14 13:45  YUV_Player\YUV_Player\ReadMe.txt

     文件       1078  2001-08-20 23:44  YUV_Player\YUV_Player\res\YUVviewer.ico

     文件        401  2001-08-20 23:44  YUV_Player\YUV_Player\res\YUVviewer.rc2

     文件       1647  2003-04-08 23:41  YUV_Player\YUV_Player\resource.h

     文件        211  2001-08-20 23:44  YUV_Player\YUV_Player\StdAfx.cpp

     文件        999  2001-08-20 23:44  YUV_Player\YUV_Player\StdAfx.h

     文件      23992  2010-12-27 15:33  YUV_Player\YUV_Player\YUVviewer.aps

     文件       2560  2003-04-08 23:49  YUV_Player\YUV_Player\YUVviewer.clw

     文件       3042  2002-03-14 13:49  YUV_Player\YUV_Player\YUVviewer.cpp

     文件       4465  2002-01-09 21:42  YUV_Player\YUV_Player\YUVviewer.dsp

............此处省略20个文件信息

评论

共有 条评论