亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? listcodecpropsdlg.cpp

?? 這是一個基于對話框的MFC程序
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// ListCodecPropsDlg.cpp : implementation file
//
/**
 ** Copyright (C) 2005 EnjoyView Inc., all rights reserved.
 **           Your View, Our Passion. Just Enjoy It!
 **
 **            http://spaces.msn.com/members/jemylu
 **
 **/

/*************************************************************************/

#include "stdafx.h"
#include "ListCodecProps.h"
#include "ListCodecPropsDlg.h"

#include "safe_defs.h"

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

/////////////////////////////////////////////////////////////////////////////
// CListCodecPropsDlg dialog

CListCodecPropsDlg::CListCodecPropsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CListCodecPropsDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CListCodecPropsDlg)
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

	mProfileManager = NULL;
	mCodecInfo3     = NULL;
}

void CListCodecPropsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CListCodecPropsDlg)
	DDX_Control(pDX, IDC_EDIT_FORMAT_BUFFERWINDOW, mEditFormatBufferWindow);
	DDX_Control(pDX, IDC_EDIT_FORMAT_BITRATE, mEditFormatBitrate);
	DDX_Control(pDX, IDC_EDIT_CODEC_SUPPORT_VBR, mEditCodecVBRSupported);
	DDX_Control(pDX, IDC_EDIT_CODEC_COMPLEXITY_LIVE, mEditCodecComplexityLive);
	DDX_Control(pDX, IDC_EDIT_CODEC_COMPLEXITY_MAX, mEditCodecComplexityMax);
	DDX_Control(pDX, IDC_EDIT_CODEC_COMPLEXITY_OFFLINE, mEditCodecComplexityOffline);
	DDX_Control(pDX, IDC_EDIT_CODEC_PASSES, mEditCodecPasses);
	DDX_Control(pDX, IDC_EDIT_CODEC_ISVBR, mEditCodecIsVBR);
	DDX_Control(pDX, IDC_EDIT_FORMAT_SPEECHCAPS, mEditFormatSpeechCaps);
	DDX_Control(pDX, IDC_COMBO_FORMAT_DESC, mComboFormatDesc);
	DDX_Control(pDX, IDC_LIST_CODEC_NAME, mListBoxCodecName);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CListCodecPropsDlg, CDialog)
	//{{AFX_MSG_MAP(CListCodecPropsDlg)
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_WM_DESTROY()
	ON_LBN_SELCHANGE(IDC_LIST_CODEC_NAME, OnSelchangeListCodecName)
	ON_CBN_SELCHANGE(IDC_COMBO_FORMAT_DESC, OnSelchangeComboFormatDesc)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CListCodecPropsDlg message handlers

BOOL CListCodecPropsDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// Create a profile manager object
	HRESULT hr = WMCreateProfileManager(&mProfileManager);
	if (FAILED(hr))
	{
		AfxMessageBox("Failed to Create a Profile Manager.");
		return FALSE;
	}
	// Get the IWMCodecInfo3 interface
	hr = mProfileManager->QueryInterface(IID_IWMCodecInfo3,	(void**) &mCodecInfo3);
	if (FAILED(hr))
	{
		AfxMessageBox("Failed to Get the IWMCodecInfo3 Interface.");
		return FALSE;
	}
		
	FillCodecNames();
	ReflectCodecProperties();
	if (SUCCEEDED(FillFormatDescs()))
	{		
		ReflectCodecCurrentSettings();
		ReflectFormatProperties();
		ReflectFormatDetails();
	}

	return TRUE;  // return TRUE  unless you set the focus to a control
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CListCodecPropsDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CListCodecPropsDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CListCodecPropsDlg::OnDestroy() 
{	
	ReleaseAllStreamConfig();
	SAFE_RELEASE(mProfileManager);
	SAFE_RELEASE(mCodecInfo3);

	CDialog::OnDestroy();		
}

void CListCodecPropsDlg::ReleaseAllStreamConfig(void)
{
	IWMStreamConfig * pConfig = NULL;
	POSITION pos = mStreamConfigList.GetHeadPosition();
	while (pos)
	{
		pConfig = (IWMStreamConfig*) mStreamConfigList.GetNext(pos);
		SAFE_RELEASE(pConfig);
	}
	mStreamConfigList.RemoveAll();
}

void CListCodecPropsDlg::FillCodecNames(void)
{
	mListBoxCodecName.ResetContent();

	GetCodecNames(WMMEDIATYPE_Audio);
	GetCodecNames(WMMEDIATYPE_Video);

	// Select the first item
	if (mListBoxCodecName.GetCount() > 0)
	{
		mListBoxCodecName.SetCurSel(0);
	}
}

HRESULT CListCodecPropsDlg::GetCodecNames(REFGUID inType)
{
	if (mCodecInfo3 == NULL)
	{
		return E_FAIL;
	}

	DWORD   cCodecs  = 0;
	WCHAR*  pwszCodecName  = NULL;
	DWORD   cchCodecName   = 0;
	DWORD   codecType = (inType == WMMEDIATYPE_Audio) ? AudioCodecMask : VideoCodecMask;
    // Retrieve the number of supported codecs on the system.
    HRESULT hr = mCodecInfo3->GetCodecInfoCount(inType, &cCodecs);

	// Loop through all the audio codecs.
	for (DWORD i = 0; i < cCodecs; i++)
	{
		// Get the codec name:
		// First, get the size of the name.
		hr = mCodecInfo3->GetCodecName(inType, i, NULL, &cchCodecName);
		if (FAILED(hr))
		{
			TRACE("Could not get the size of the codec name.\n");
			return hr;
		}

		// Allocate a string of the appropriate size.
		pwszCodecName = new WCHAR[cchCodecName];
		if (pwszCodecName == NULL)
		{
			TRACE("Could not allocate memory.\n");
			return E_OUTOFMEMORY;
		}
		// Retrieve the codec name.
		hr = mCodecInfo3->GetCodecName(inType, i, pwszCodecName, &cchCodecName);
		if (FAILED(hr))
		{
			delete[] pwszCodecName;
			TRACE("Could not get the codec name.\n");
			return hr;
		}

		// Add codec name to the list box
		char szName[100];
		WideCharToMultiByte(CP_ACP, 0, pwszCodecName, -1, szName, 100, NULL, NULL);
		int itemIndex  = mListBoxCodecName.AddString(szName);
		DWORD itemData = codecType | i;
		mListBoxCodecName.SetItemData(itemIndex, itemData);

		// Clean up for the next iteration.
		delete[] pwszCodecName;
		pwszCodecName = NULL;
		cchCodecName  = 0;
	}

	return S_OK;
}

void CListCodecPropsDlg::OnSelchangeListCodecName() 
{
	ReflectCodecProperties();
	if (SUCCEEDED(FillFormatDescs()))
	{		
		ReflectCodecCurrentSettings();
		ReflectFormatProperties();
		ReflectFormatDetails();
	}
}

void CListCodecPropsDlg::OnSelchangeComboFormatDesc() 
{
	if (mCodecInfo3)
	{
		ReflectFormatProperties();
		ReflectFormatDetails(); 
	}	
}

// Retrieves the formats supported by the specified codec. 
// Each codec format is a stream configuration that is valid 
// for use with the codec.
HRESULT CListCodecPropsDlg::FillFormatDescs(void)
{
	if (mCodecInfo3 == NULL)
	{
		return E_FAIL;
	}

	ReleaseAllStreamConfig();
	mComboFormatDesc.ResetContent();
	// Get the selected codec name
	int index = mListBoxCodecName.GetCurSel();
	if (LB_ERR != index)
	{	
		DWORD itemData   = mListBoxCodecName.GetItemData(index);
		DWORD codecIndex = itemData & CodecIndexMask;
		if (itemData & AudioCodecMask)
		{
			// This is an audio codec
			FillAudioFormatDescs(FALSE, 0, codecIndex);
			FillAudioFormatDescs(TRUE, 1, codecIndex);
			FillAudioFormatDescs(TRUE, 2, codecIndex);
		}
		else if (itemData & VideoCodecMask)
		{
			// This is an video codec, then do nothing here!
			// Video codecs provide only a single format. 
			// This is because video streams have variables, 
			// like frame size, that are more flexible 
			// than the settings of an audio stream.
		}
	}

	// Select the first item
	if (mComboFormatDesc.GetCount() > 0)
	{
		mComboFormatDesc.SetCurSel(0);
		mComboFormatDesc.EnableWindow(TRUE);
	}
	else
	{
		mComboFormatDesc.EnableWindow(FALSE);
	}

	return S_OK;
}

HRESULT CListCodecPropsDlg::FillAudioFormatDescs(BOOL inIsVBR, DWORD inPasses, DWORD inCodecIndex)
{
	// Set the VBR settings appropriately
	SetCodecVBRSettings(WMMEDIATYPE_Audio, inCodecIndex, inIsVBR, inPasses);
	DWORD   vbrSettings = inIsVBR ? CodecIsVBRMask : 0;
	vbrSettings |= (inPasses << 16);

	DWORD   cFormats  = 0;
	WCHAR*  pwszFormatDesc = NULL;
	DWORD   cchForamtDesc  = 0;
	// Retrieve the number of supported formats
	HRESULT hr = mCodecInfo3->GetCodecFormatCount(WMMEDIATYPE_Audio, inCodecIndex, &cFormats);

	// Loop through all the audio codecs.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级视频在线看| 亚洲成人激情自拍| 亚洲精品高清视频在线观看| 午夜影院久久久| 国产成人自拍网| 欧美日韩国产天堂| 欧美不卡视频一区| 亚洲情趣在线观看| 国产在线播精品第三| 欧美日韩国产影片| 欧美国产综合色视频| 视频在线观看91| av网站免费线看精品| 久久伊99综合婷婷久久伊| 亚洲国产欧美在线| 色综合中文综合网| 欧美日韩一区二区在线观看视频| 日韩欧美一级精品久久| 亚洲小少妇裸体bbw| 91麻豆国产福利在线观看| 亚洲日本青草视频在线怡红院| 狂野欧美性猛交blacked| 欧美主播一区二区三区| 自拍偷在线精品自拍偷无码专区| 国产综合一区二区| 欧美一区二区免费| 日韩福利视频网| 欧美日韩激情一区二区三区| 亚洲毛片av在线| 粗大黑人巨茎大战欧美成人| 久久久精品天堂| 韩国成人福利片在线播放| 日韩一区二区三区免费看 | 性做久久久久久| 在线日韩一区二区| 亚洲黄一区二区三区| 99re这里只有精品首页| 亚洲天堂久久久久久久| av中文字幕一区| 国产精品美女久久久久久| 国产91在线观看| 国产清纯白嫩初高生在线观看91 | 不卡电影一区二区三区| 久久精品一区二区三区不卡牛牛| 狠狠色丁香久久婷婷综合_中| 日韩精品一区二区三区三区免费| 免费久久99精品国产| 日韩美女一区二区三区| 国产一区二三区| 国产精品无人区| 91网页版在线| 亚洲不卡av一区二区三区| 欧美一区二区三区免费视频| 久久成人精品无人区| 久久精品一区二区三区av| www.综合网.com| 一区二区三区不卡视频在线观看 | 久久亚洲综合色一区二区三区| 国产自产高清不卡| 亚洲欧洲无码一区二区三区| 日本高清不卡视频| 欧美aa在线视频| 国产精品免费网站在线观看| 色综合久久中文字幕| 香蕉久久夜色精品国产使用方法| 欧美国产欧美综合| 色婷婷av一区二区三区gif| 91丝袜美腿高跟国产极品老师 | 国产欧美1区2区3区| 色哟哟国产精品| 日本中文字幕一区二区视频| 久久久亚洲高清| 在线观看日韩毛片| 精品综合免费视频观看| 日韩一区在线看| 欧美日韩国产美女| 国产成人av自拍| 亚洲成人av免费| 国产欧美在线观看一区| 欧美日韩国产在线播放网站| 国产精品123区| 亚洲一区二区三区四区在线免费观看| 日韩欧美的一区| 91免费视频大全| 国产麻豆精品久久一二三| 亚洲一区二区在线免费观看视频| 欧美精品一区二区久久久| 91视频在线观看| 精品一二三四在线| 亚洲高清在线视频| 国产精品传媒在线| 欧美电影精品一区二区| 欧洲人成人精品| 波多野结衣精品在线| 久久精品国产秦先生| 亚洲综合无码一区二区| 中文字幕在线一区免费| 26uuu另类欧美亚洲曰本| 欧美午夜一区二区三区| 丁香六月综合激情| 国产一区二区在线电影| 麻豆精品在线看| 亚洲大片在线观看| 亚洲精品国产精华液| 亚洲欧洲日韩在线| 亚洲国产精品99久久久久久久久| 精品久久久久av影院| 91精品国产高清一区二区三区| 91福利资源站| 在线视频亚洲一区| 一本大道av一区二区在线播放| 国产成人av电影在线播放| 国产一区美女在线| 国产在线播放一区二区三区 | 91麻豆swag| 日韩毛片视频在线看| 中文字幕精品—区二区四季| 国产女主播视频一区二区| 26uuu久久天堂性欧美| 精品欧美一区二区在线观看| 日韩三级视频在线观看| 日韩女同互慰一区二区| 欧美乱妇15p| 欧美日韩黄色一区二区| 欧美一区二区免费| 欧美一级一区二区| 精品国产乱子伦一区| 国产网站一区二区| 国产精品久久午夜夜伦鲁鲁| 18成人在线观看| 亚洲最大色网站| 日韩av在线发布| 久久国产日韩欧美精品| 国产乱码精品一区二区三| 成人免费观看av| 成人a级免费电影| youjizz国产精品| 欧美中文字幕一区| 777亚洲妇女| 久久只精品国产| 18欧美乱大交hd1984| 亚洲v日本v欧美v久久精品| 蜜臀av性久久久久蜜臀aⅴ四虎 | 6080亚洲精品一区二区| 激情小说亚洲一区| 91丨九色丨蝌蚪丨老版| 91日韩精品一区| 欧美日韩免费高清一区色橹橹 | 色婷婷狠狠综合| 欧美优质美女网站| 制服丝袜亚洲色图| 国产亚洲欧美日韩在线一区| 日韩美女视频一区二区| 亚洲综合激情另类小说区| 日本欧美一区二区三区| 欧美手机在线视频| 日韩欧美成人午夜| 中文字幕中文在线不卡住| 日韩中文字幕av电影| 成人黄色av电影| 9191久久久久久久久久久| 久久看人人爽人人| 成人免费在线观看入口| 麻豆一区二区99久久久久| av中文字幕一区| 欧美电影免费提供在线观看| 亚洲欧美另类久久久精品2019| 午夜不卡在线视频| 不卡一区二区三区四区| 欧美一二三四在线| 亚洲在线观看免费视频| 高清久久久久久| 4438x亚洲最大成人网| 亚洲色欲色欲www在线观看| 久久精品国产一区二区三区免费看| 97成人超碰视| 久久亚洲精精品中文字幕早川悠里| 亚洲第一综合色| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美视频自拍偷拍| 亚洲国产激情av| 久久99精品国产91久久来源| 欧美日韩一区二区三区在线看| 国产精品国产馆在线真实露脸 | 国产成人精品1024| 欧美一区午夜视频在线观看| 亚洲一区国产视频| 91网站黄www| 国产精品毛片无遮挡高清| 国产高清在线精品| 日韩天堂在线观看| 天天爽夜夜爽夜夜爽精品视频| 色婷婷综合久久久久中文一区二区| 中文字幕乱码日本亚洲一区二区| 精品一二三四区| 亚洲精品欧美激情| 色天使色偷偷av一区二区| 亚洲视频一区二区在线| 91一区二区在线| 日韩毛片高清在线播放|