Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Mac Plugin Development - Help - Page: 1

This part of topic is old and might contain outdated or incorrect information

VOG_PRO InfinityMember since 2006
Hi guys,

Currently off work sick with a back injury so I decided rather than moaning about plugins etc for Mac I would have a go and build some of my own.

Its a tall order I know but a nice project I am hoping that will get me back into a little development. Normally I never have the time.

I have not done any development on a Mac before and its been a few years since ive done any PC development. So I said I would get a reading before posting.

After reading some intro to XCode development and building some small projects, no VDJ related and Carbon type stuff.

I downloaded the Xcode examples and I just cant get them to compile is there any resources or fully working example that maybe someone would could point me in the direction.

I specifically was trying to compile the video effect xcode example.

What I am finding is that the header files dont seem to be linked in the xcode project. Could someone confirm as my understanding is limited.

Also if someone has even a basic complete example of an video effect for me to have a look at in xcode that would be really helpful.

Thanks in advance to any Mac developers out there to could help me get the started
 

Posted Sun 18 Jan 09 @ 3:12 pm
SBDJPRO Infinity Member since 2006
I don't have the code to hand I'm afraid, but if you post up in here what you've got, I'll have a look for you :)
 

Posted Sun 18 Jan 09 @ 3:41 pm
djcelPRO InfinityModeratorMember since 2004
Can you copy paste the errors showed by XCode

Anyway I will check again the XCode package I have uploaded.
 

Posted Sun 18 Jan 09 @ 4:15 pm
VOG_PRO InfinityMember since 2006
I know im jumping ahead a bit but i take it the effects are done in Open GL for mac and not direct 3d.

Have not gotten the examples that are given in the xcode section to compile yet.

If I could get over that hurdle first I could get going. :)

it seems in the example that the .h files needed are not included or linked in the project

when u compile the project the first error u get is:

at first line of the code

#include "vdjVideo_mac"

error vdjVideo_mac no such file or directory
 

Posted Sun 18 Jan 09 @ 4:23 pm
VOG_PRO InfinityMember since 2006
hi i added the two .h files to the project by, by going to the project menu and using add to project

i added

vdjPlugin.h
vdjVideo_mac.h

i also amended the above to add the .h

so in the code it now reads

#include "vdjVideo_mac.h"

the project now has four errors all relating to the

AGLContext Context; "does not name a type"




 

Posted Sun 18 Jan 09 @ 4:31 pm
VOG_PRO InfinityMember since 2006
this is the video effect project by the way
 

Posted Sun 18 Jan 09 @ 4:32 pm
VOG_PRO InfinityMember since 2006
hi guys,

i think i noticed the issue within the vdjvideo_mac.h file

the line

typedef void* AGLContext;

was commented out, i take it that was in error but im pretty green to this mac development maybe it was supposed to be

any thoughts?
 

Posted Sun 18 Jan 09 @ 4:42 pm
VOG_PRO InfinityMember since 2006
it seems to build correctly now, i dont think this example actually does anything beyond putting two sliders in the effects page.

IS that correct?

sorry loads of questions i know :)
 

Posted Sun 18 Jan 09 @ 4:55 pm
djcelPRO InfinityModeratorMember since 2004
About your problem, remove "typedef void* AGLContext;" and use :

#include <opengl/opengl.h>
#include <AGL/agl.h>

 

Posted Mon 19 Jan 09 @ 2:00 pm
VOG_PRO InfinityMember since 2006
I tried what you recommended and that does not solve the problem as elsewhere within the vdjvideo_mac.h there are places where the "AGLContext" context is used

within the classes:

class IVdjPluginVideoFx : public IVdjPlugin

near the end

and within the class

class IVdjPluginVideoTransition : public IVdjPlugin

in both cases its the same line of code:

AGLContext Context;

As i mentioned above if i uncomment the line that defines the AGLContext then the project will compile once I have amended the .h and added the h files to the project.

Which is the solution I am a little confused more confused now?

Would it be possible to mail me a completed mac plugin, even if it meerely displays an image of some text so I could see how a working mac plugin would work so I could learn from there. The video effects plugin example does not seem to work
 

Posted Wed 21 Jan 09 @ 2:46 pm
djcelPRO InfinityModeratorMember since 2004

#include <opengl/opengl.h>
#include <AGL/agl.h>
#include "vdjvideo_mac.h"


or directly modify the header "vdjvideo_mac.h":


#ifndef VdjVideoH
#define VdjVideoH

#include "VdjPlugin.h"
#include <opengl/opengl.h>
#include <AGL/agl.h>
//typedef void* AGLContext;

 

Posted Wed 21 Jan 09 @ 3:50 pm
VOG_PRO InfinityMember since 2006
Should the comments be removed from the definition of AGLContext? so that it is not commented out?
 

Posted Wed 21 Jan 09 @ 3:55 pm
djcelPRO InfinityModeratorMember since 2004
AGLContext is defined in agl.h

typdef struct __AGLContextRec   *AGLContext;


In fact, it depends if you intend to use "AGLContext" or not.
 

Posted Wed 21 Jan 09 @ 4:01 pm
VOG_PRO InfinityMember since 2006
ok I added the code as you described and ot compiles now with now errors, should this example actually do anything when it is activated in VDJ.

Just to help me understand the code some more.

Thanks for your help
 

Posted Wed 21 Jan 09 @ 4:43 pm
VOG_PRO InfinityMember since 2006
Sorry one more thing is it possible to get a list of the send commands?
 

Posted Wed 21 Jan 09 @ 5:34 pm
VOG_PRO InfinityMember since 2006
sorry guys found the answer to send command question
 

Posted Wed 21 Jan 09 @ 5:36 pm
VOG_PRO InfinityMember since 2006
Hi guys,

Thanks for the help so far, I have the plug in successfully compiling and building I have tested the bundle in VDJ just using a send comannd to stop/ play each deck. wahooo that was actually alot of fun. I just did that to confirm the plugin actually worked.

My goal is to write a video effect.

If there are no examples of a mac plugin that actually draws something on the screen would it be possible to point me to a good resource for getting started in OpenGL
 

Posted Thu 22 Jan 09 @ 7:21 am
djcelPRO InfinityModeratorMember since 2004
Do you already know OpenGL or is it your first time? Maybe direct3D?
 

Posted Thu 22 Jan 09 @ 12:18 pm
VOG_PRO InfinityMember since 2006
Nope it my first time doing any graphical programming and I am interested to learn
 

Posted Thu 22 Jan 09 @ 12:24 pm
djcelPRO InfinityModeratorMember since 2004
 

Posted Thu 22 Jan 09 @ 2:13 pm
38%