Elecard
June 19, 2013, 08:10:49 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: SDK filter usage  (Read 5228 times)
carter
Newbie
*
Posts: 1


View Profile
« on: June 05, 2007, 10:26:05 am »

I'm currently evaluating the Application SDK. There is no source and I'm not sure the documentation is complete. However, I'm reasonably impressed with the MPEG2 filters so far.

I want to use the MPEG2 filters (and eventually others) for a project, but I need to be able to instance the filter objects directly from the file (perhaps using CoGetInstanceFromFile as opposed to CoCreateInstance). Is this possible? Are there any examples of doing this?

What I want to do is avoid registering (in the Windows Registry that is) the files and avoid all the associated issues.

Carter
Logged
Polyakov
Newbie
*
Posts: 77


View Profile WWW
« Reply #1 on: June 17, 2007, 01:36:04 am »

Hello, Carter.

You right, the evaluation version of SDK do not contain samples’ sources. All sources are included in the retail pack.
 
Yes, it is possible to create filters without registration in the system. More over, we recommend using filters in the graph without registration in the Windows (without using regsvr32).
The following code shows how you can create filter directly from the filter file path.

 // create filter-object directly from file m_fVideoEncoder=CFilterWrapper(VIDEO_ENCODER_CLSID, T2OLE(PATH_TO_ENCODER_FILE));
hr=((IBaseFilter*)m_fVideoEncoder)!=NULL ? S_OK: E_FAIL;
 
// Add video Encoder in to the filter graph
if( SUCCEEDED(hr))
       hr = AddFilter(m_fVideoEncoder, VIDEO_ENCODER_FILTER);

where PATH_TO_ENCODER_FILE defined as follows, and should be replaced by the actual path
#define PATH_TO_ENCODER_FILE "D:\\Program Files\\Common Files\\Elecard\\eh264ve.ax"

This method of filters creation ensures the use of the appropriate filers.

All sample codes are taken from file "SDK\C++\Encoder\Sources\SimpleEncoder\Encoder.cpp", function CEncoder::BuildToVideoEncoder().

CFilterWrapper – it is the helper class from the Elecard SDK “Base Classes”.
Base Classes are included in the SDK samples source code.


Regards,
Alexey
Logged

Regards,
Alexey Polyakov
http://www.elecard.com
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!