2008年11月16日 星期日

Print Screen 被禁止

Print Screen在TV這邊被擋掉了,原因出在AvCtrl裡,可以改Code

STDMETHODIMP CIviAvControl::Open(IMoniker* pmVideo, IMoniker* pmAudio,long hNotifyWnd, long hVideoWnd, long notifyMsg, BSTR bstrRegName)
{
//Check anti-capture
iviTR_DISABLE_PRINT_SCREEN();
}

把這行拿掉就可以了..

d:\Projects\Release\AVControl\1.X\1.5B058.TV_CHIEF\DVR\Source\IviAvCtl\IviAvControl.cpp

2008年9月25日 星期四

SDK懶人包

Ben 做的懶人包在這裡,然後要build IHTX的話,會需要Microsoft Platform SDK for Windows Server 2003 R2 ,都可以一起參考

http://192.168.10.12/VC8/2003/index.html

2008年9月3日 星期三

IHTX 丟file URI 進GpiProxy 的前一站

看起來是先把URI 加進GpiProxy 的PlayList,然後再另外去Call Play。

d:\projects\release\eagle\1.x\1.0b042\dvd\source\ivivideowndx\playlistproxy.cpp

BOOL CPlaylistProxy::AddItemtoPlaylist(LPCTSTR lpstrItem)

{

HRESULT hr = m_pGPIPlaylist->Append(bstrItem);

}

再前一站則是

d:\projects\release\eagle\1.x\1.0b042\dvd\source\iviappiht\playbackcontrol.cpp

HRESULT CPlaybackControl::AddItemtoPlaylist(BSTR bstrPath)

{

m_pProxyPL->AddItemtoPlaylist(str);

}

 

2008年6月5日 星期四

Resize View Port refine process

  1. 我試著將VP 先推出畫面之外,後設一個Timer,再改變Style和放回該放的大小及位置,但是,縮放之後停止播放再去播放新的(可以是同一個),就會發生畫面一片黑,但是原來OSD的位置看得到播放內容的奇怪現象,Tommy 和Calvin認為不是OSD SetWindwRegion 的問題,看來應該是底層的問題。
  2. 將第一次的放大,就是剛剛開始播放時,的Timer設成0,可以改善問題,但是無法完全解決,而且,一開始會出現約一秒的殘破畫面。
  3. 目前只好暫時利用 AppSizeChange 和 SyncVideoWindowTimerElapsed,在前者把wfh縮一點點,在後者把它還原。而且,如果後者馬上做的話會無效,幸好,後者會來一只一次,就定在最後一次的時後做,暫時解決問題

2008年6月3日 星期二

IHTX OSD set window regine

D:\Projects\RELEASE\Eagle\1.X\1.0B042\DVD\Source\IviAppIHT\ViewPortCtrlImpl.cpp
void CViewPortCtrlImpl::ShowSkinWinRegion(BOOL bShow)

2008年5月21日 星期三

VisualTree Search

Check this:

http://blogs.msdn.com/wpfsdk/archive/2007/04/16/how-do-i-programmatically-interact-with-template-generated-elements-part-ii.aspx

1. Get a hold of the current list item:

// Note that the ListBox must have

// IsSynchronizedWithCurrentItem set to True for this to work

ListBoxItem myListBoxItem =

(ListBoxItem)(myListBox.ItemContainerGenerator.ContainerFromItem(myListBox.Items.CurrentItem));

2. Find the ContentPresenter of that list item by walking through its visual tree [1]:

ContentPresenter myContentPresenter = FindVisualChild<ContentPresenter>(myListBoxItem);

3. Now you can call FindName on the DataTemplate of that ContentPresenter:

DataTemplate myDataTemplate = myContentPresenter.ContentTemplate;

TextBlock myTextBlock = (TextBlock)myDataTemplate.FindName("textBlock", myContentPresenter);

[1] The FindVisualChild method called in step 2:

private childItem FindVisualChild<childItem>(DependencyObject obj)

where childItem : DependencyObject

{

for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)

{

DependencyObject child = VisualTreeHelper.GetChild(obj, i);

if (child != null && child is childItem)

return (childItem)child;

else

{

childItem childOfChild = FindVisualChild<childItem>(child);

if (childOfChild != null)

return childOfChild;

}

}

return null;

}