|
|
| rudi |
| Posted: Mar 7 2003, 10:42 AM |
 |
|
Unregistered

|
Hi,
Can someone please help me to get a bare minumum of code needed to use virtual dub filters from other programs and please explain to me how to use it... I have tried with borland but with no success. I can load the filter and I can retrieve its description but I can't use it... Please help!!! |
 |
| fccHandler |
| Posted: Mar 7 2003, 04:48 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
You can't use VirtualDub plugins in other programs. See this topic: Calling Filters
-------------------- May the FOURCC be with you... |
 |
| rudi |
| Posted: Mar 9 2003, 11:36 AM |
 |
|
Unregistered

|
Thank you for your reply but I am still lost...
I've taken some code from virtualdub which loads the dll, I then get the pointer to the start, run, config, etc functions... My main problem now is it requires something like a FilterActivation structure for every function... I try to create my own by filling the current and last frame with 'n char buffer of 320 * 240 * 3 filled with 0's. It still gives me a access voilation. I need to find out how this FilterActivation (or something like this) works???? I will post the code on monday, I dont have it with me, the other problem I have is that I use Borland C++ Builder ;-)... Is this the problem??? The filter loads ok and I can read the description from, i think its called something like Filterdefinition structure that is created by the Add function... I will check my refrences on monday and correct what I might have wrong here... Will post soon, pleeeeeease help...
Rudi |
 |
| fccHandler |
| Posted: Mar 9 2003, 04:25 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
A good source of information is the official Filter SDK. Even better, try writing your own filter and you'll have a better understanding of how they work.
The FilterActivation structure is created and managed by VirtualDub internally. The only way to create one yourself is to somehow emulate the code in VirtualDub that initializes the structure (including the function pointers).
It's not entirely impossible, but I think you've got a lot of work ahead.
-------------------- May the FOURCC be with you... |
 |
| ChristianHJW |
| Posted: Mar 9 2003, 10:59 PM |
 |
|
Advanced Member
  
Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02

|
Maybe Avisynth is better for what you are trying to do ?
-------------------- Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !! Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform .... |
 |
| phaeron |
| Posted: Mar 10 2003, 12:43 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
VirtualDub filters use XRGB32, not RGB24. You have to allocate 320*240*4 bytes. The buffer also needs to be dword-aligned, but new/malloc does this for you.
You don't need to support the full API in order to load 99% of the plugin filters out there -- Avisynth only supports the core and mostly works. Warpsharp is one of the few exceptions (oops), and DGraft already patched it to work in Avisynth. I'm probably going to drop a few of the more unused functions, most notably DC support, in a future version anyway. |
 |
| rudi |
| Posted: Mar 12 2003, 02:05 PM |
 |
|
Unregistered

|
Thankyou,
I am looking at avisynth at the moment and I looks very intresting... I will have a play and see if I can get more info and see if I can use it.
Can someone please explain to me how XRGB32 works???
Byte 0 - R Byte 1 - G Byte 2 - B Byte 3 - ????
I will then try this too to see if it makes a difference. |
 |
| phaeron |
| Posted: Mar 13 2003, 08:23 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
XRGB32 on Windows is ordered so that when you access the array as (DWORD *), you have 0xXXRRGGBB in hex for each pixel. That means the byte ordering in memory is:
byte 0: blue byte 1: green byte 2: red byte 3: garbage |
 |