28.11.2012 Views

Procesamiento digital de video en tiempo real y - Maestría en ...

Procesamiento digital de video en tiempo real y - Maestría en ...

Procesamiento digital de video en tiempo real y - Maestría en ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Procesami<strong>en</strong>to</strong> <strong>digital</strong> <strong>de</strong> vi<strong>de</strong>o <strong>en</strong> <strong>tiempo</strong> <strong>real</strong> y “vi<strong>de</strong>o wall” con la PC 119<br />

}<br />

hr = PlayMovieInWindow(g_szFileName);<br />

// Si no po<strong>de</strong>mos ejecutar el clip, limpiamos.<br />

if (FAILED(hr))<br />

CloseClip();<br />

BOOL GetClipFileName(LPTSTR szName)<br />

{<br />

static OPENFILENAME ofn={0};<br />

static BOOL bSetInitialDir = FALSE;<br />

}<br />

*szName = 0;<br />

ofn.lStructSize = sizeof(OPENFILENAME);<br />

ofn.hwndOwner = ghApp;<br />

ofn.lpstrFilter = NULL;<br />

ofn.lpstrFilter = FILE_FILTER_TEXT;<br />

ofn.lpstrCustomFilter = NULL;<br />

ofn.nFilterIn<strong>de</strong>x = 1;<br />

ofn.lpstrFile = szName;<br />

ofn.nMaxFile = MAX_PATH;<br />

ofn.lpstrTitle = TEXT("Op<strong>en</strong> Media File...\0");<br />

ofn.lpstrFileTitle = NULL;<br />

ofn.lpstrDefExt = TEXT("*\0");<br />

ofn.Flags = OFN_FILEMUSTEXIST | OFN_READONLY | OFN_PATHMUSTEXIST;<br />

// Recordamos el path <strong>de</strong>l primer archivo seleccionado<br />

if (bSetInitialDir == FALSE)<br />

{<br />

ofn.lpstrInitialDir = DEFAULT_MEDIA_PATH;<br />

bSetInitialDir = TRUE;<br />

}<br />

else<br />

ofn.lpstrInitialDir = NULL;<br />

return GetOp<strong>en</strong>FileName((LPOPENFILENAME)&ofn);<br />

// Función que cierra el clip actual<br />

void CloseClip()<br />

{<br />

HRESULT hr;<br />

}<br />

if(pMC)<br />

hr = pMC->Stop();<br />

g_psCurr<strong>en</strong>t = Stopped;<br />

g_bAudioOnly = TRUE;<br />

CloseInterfaces();<br />

// Limpia <strong>de</strong>l arreglo el nombre <strong>de</strong> archivo para permitir una nueva eleccion<br />

g_szFileName[0] = L'\0';<br />

// Borramos el estado actual <strong>de</strong> ejecucion multimedia<br />

g_psCurr<strong>en</strong>t = Init;<br />

RECT rect;<br />

GetCli<strong>en</strong>tRect(ghApp, &rect);<br />

InvalidateRect(ghApp, &rect, TRUE);<br />

UpdateMainTitle();<br />

InitPlayerWindow();<br />

//Funcion que busca un filtro <strong>en</strong> el grafico, y su pin input o output

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!