Method Init

From AVObjects Knowledge Base
(Difference between revisions)
Jump to: navigation, search
()
Line 27: Line 27:
  
 
   //---------------------------------
 
   //---------------------------------
   // Init source/splitter
+
   // Init Object
   hr = spSource->Init();
+
   hr = spReder->Init();
 
   if(hr != S_OK)
 
   if(hr != S_OK)
 
     return hr;
 
     return hr;
 
</source>
 
</source>

Revision as of 12:47, 8 July 2014

This page is a copy of the original page on the AVObjects' web site and can also be viewed here.

Производит инициализацию данных объекта, для объектов - сплитеров или ридеров производит открытие файлов и начальный парсинг.

HRESULT Init()

Sample

  //---------------------------------
  // Create MXF Reader object
  CComPtr<IAVObject>	spReader;
 
  HRESULT hr = Create_MXFReader(&spReader); 
  if (hr != S_OK)
     return hr;
 
  //---------------------------------
  // Set filename
  CComQIPtr<IAVProperties> spProps(spReader);
  ATLASSERT(spProps != NULL);
 
  hr = spProps->PropsSet(L"source", L"file.mxf");
  if(hr != S_OK)
    return hr;
 
  //---------------------------------
  // Init Object
  hr = spReder->Init();
  if(hr != S_OK)
    return hr;
Personal tools