📄 videocodecmanage_dlg1.cpp
字号:
/*
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2006-2008 Beijing, pengzhen (pengzhenxp@yahoo.com.cn) //
// //
///////////////////////////////////////////////////////////////////////////////
*/
CString CVideoCodecManage_Dlg::m_pColumnTitle[] =
{
TEXT("type") , /* codec */
TEXT("bps") , /* bits/second */
TEXT("fps") , /* frames/second */
TEXT("GOP") , /* group of picture */
TEXT("HAVE_B") , /* have picture 'B' */
TEXT("ABR") , /* adaptive bit rate */
TEXT("ME_C") , /* chroma join motion_estimate (ME) */
TEXT("MS_T") , /* motion_search type */
TEXT("PRP") , /* previous process */
TEXT("POP") /* post process */
};
WORD CVideoCodecManage_Dlg::m_iItemValue[VideoCodecManage_Items+1][VideoCodecManage_SubItems] ;
CString CVideoCodecManage_Dlg::m_pColumnTitleText[] =
{
TEXT("type") , /* codec */
TEXT("bits/second (kb/s)") , /* bits/second */
TEXT("frames/second") , /* frames/second */
TEXT("group of picture") , /* group of picture */
TEXT("have 'B' picture") , /* have 'B' picture */
TEXT("adaptive bit_rate") , /* bit rate type */
TEXT("chroma join ME") , /* chroma join motion_estimate (ME) */
TEXT("motion_search type") , /* motion_search type */
TEXT("previous process") , /* previous process */
TEXT("post process") /* post process */
};
CString CVideoCodecManage_Dlg::m_pVideoCodecName[] =
{
TEXT("H265+V0"),
TEXT("H265+V6"),
TEXT("H265+V8"),
TEXT("H265+V9")
};
#define GetVideoCodecRegItemValue() \
GetRegBinaryValue( (TCHAR*)(m_iItemValue), sizeof(m_iItemValue) , \
REG_APPLICATION_SECTION , TEXT("m_iItemVideoCodec") )
#define SetVideoCodecRegItemValue() \
SetRegBinaryValue( (TCHAR*)(m_iItemValue), sizeof(m_iItemValue) , \
REG_APPLICATION_SECTION , TEXT("m_iItemVideoCodec") )
#define LoadSubItemValue( nItem, nSubItem, lpText, iValue ) \
m_pListCtrl.ListAddString( lpText, nItem, nSubItem ); \
m_iItemValue[ nItem ][ nSubItem ] = iValue ;
void CVideoCodecManage_Dlg::DefaultItemValue()
{
memset(m_iItemValue, 0x00, sizeof(m_iItemValue) );
for( int nItem=0 ; nItem < VideoCodecManage_Items +1 ; nItem++)
{
m_video_codec_id(nItem) = nItem ; /* V0, V6, V8, V9 */
m_video_bps(nItem) = 300 ; /* bits/second */ /* <300*1000> */
m_video_fps(nItem) = 25 ; /* frames/second */ /* <25,30> */
m_video_gop(nItem) = 512 ; /* group of picture */ /* if gop = 0, none P (POT_P) */
m_video_have_b(nItem) = 1 ; /* group of picture B (POT_B) */ /* 0 : 2 (B) 1 : 4 (B) */
m_video_abr(nItem) = 1 ; /* adaptive bit rate */ /* 0 : CBR, 1 : ABR */
m_video_me_c(nItem) = 1 ; /* chroma join motion_estimate (ME) */ /* 0 : no, 1 : yes */
m_video_ms_t(nItem) = 0 ; /* motion_search type */ /* 0 : diamond, 1 : advance diamond, 2 : small diamond, 3 : square,*/
m_video_prp(nItem) = 0 ; /* previous process */ /* <0,1,2,3> */
m_video_pop(nItem) = 3 ; /* post process */ /* <0,1,2,3> */
}
}
void CVideoCodecManage_Dlg::LoadItemValue( BOOL iDefault )
{
BOOL ret0 ;
if( iDefault ) DefaultItemValue();
ret0 = GetVideoCodecRegItemValue();
if( ! ret0 ) SetVideoCodecRegItemValue();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -