Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Adding a first version of GPUImage binding #136

Merged
merged 16 commits into from Mar 9, 2015

Conversation

Projects
None yet
8 participants
Contributor

valryon commented May 9, 2013

Adding the MonoTouch binding and an iPhone sample project of the GPUImage lib.

The sample is not that great but it's a start.
The lib seems to be working, it justs miss some binding (some filters are missing but are
easy to implements).

GPUImage Monotouch binding
Adding the binding and an iPhone sample project of the GPUImage lib.

The sample is not that great but it's a start: the lib seems to be
working, it justs miss some binding (some filters are missing but are
easy to implements).

Why this is not GPUImage.Filters?

Owner

valryon replied May 9, 2013

Good point. The idea was: one file for data structure, one for the whole binding, but it makes quite a big file. Could be a simple and nice improvements to do.

I think we could prettify this enums names in a more C# way i.e.

GPUPixelFormat.BGRA

I think we could prettify this enums names in a more C# way i.e.

GPUPixelType.Byte

Owner

valryon commented on c276923 May 9, 2013

I should have said it before: I'm not the original author of the code (it's in the README).

See this Stack Overflow thread.

I downloaded the code and made it work in a sample, but I made no major changes to the binding. The major issue is that I am not able to tell you the version of the lib.

So this is a basis, it needs some work in refactoring and documentation.

Oh I see the README its a the bottom, have you tested this on a real device?

Owner

valryon replied May 9, 2013

It hasn't been tested outside the simulator.
I saw that some filters requires images too, so this and the dependencies may be a flaw.

(I must say I'm sorry, it's my first PR and I'm missing a lot of points)

Owner

valryon replied May 10, 2013

Ok I will inform you as soon as I can test on a device :) (next week probably, on an iPad mini)

Owner

valryon replied May 10, 2013

Okay I managed to test on a real device (iPad mini 6.1) and it's not working, I got a "Native linking failed." error.

I'll try to fix it as soon as possible, but I don't know what will happend to this PR.

Have you tried this on a Real Device?? Are you sure this Library does not need any Additional frameworks?? I'm asking because on the samples here there are some additional frameworks added i.e. CoreGraphics AVFoundation etc.

Changing sample iOS Build linking to "None"
And it's working on my iPad mini
Contributor

valryon commented May 14, 2013

Finally got it working! :)
On my iPad mini.

On the sample project, Options -> iOS Build -> Link assemblies was set to "SDK" for iPhone configuration, but for "None" for Simulator.

I set it for "None" for iPhone and the sample runs on my device.

I may be missing something but I can now assure that there is a working basis.

Contributor

Clancey commented May 14, 2013

Your missing the required libraries from the link with a attributes. Most likely it requires CoreImage.

Sent from my iPhone

On May 14, 2013, at 6:21 AM, Damien Mayance notifications@github.com wrote:

Finally got it working! :)
On my iPad mini.

On the sample project, Options -> iOS Build -> Link assemblies was set to "SDK" for iPhone configuration, but for "None" for Simulator.

I set it for "None" for iPhone and the sample runs on my device.

I may be missing something but I can now assure that there is a working basis.


Reply to this email directly or view it on GitHub.

Contributor

valryon commented May 14, 2013

I'm not surprised, but now I have 2 questions :)

  1. Could it be working for basics filter and crash for more advanced ones (requiring missing libs?). I don't know if libraries are dynamically loaded.
  2. How can I add thoses dependencies? I tried to add a gcc_flag with -framework options for lib listed by the author on GPUImage repository but it didn't work.

Anyway, I will need help to fix it, I hope this first version will be corrected by more experimented users.

Contributor

Clancey commented May 14, 2013

The missing libraries happens when the linker runs, so you will be fine once you get it to build.
It still may crash due to an incorrect binding.
See how there is the libraries property on the link with attribute: https://github.com/mono/monotouch-bindings/blob/master/FlurryAnalytics/binding/AssemblyInfo.cs

The library you bound should tell you the libraries you need.
If you can't find them change it back to link sdk only. Then when the build fails go to error output area. Click the build output button. If you read towards the end of the output it tells you the missing class.
You can google to see what framework that class is in.

Sent from my iPhone

On May 14, 2013, at 9:56 AM, Damien Mayance notifications@github.com wrote:

I'm not surprised, but now I have 2 questions :)

Could it be working for basics filter and crash for more advanced ones (requiring missing libs?). I don't know if libraries are dynamically loaded.

How can I add thoses dependencies? I tried to add a gcc_flag with -framework options for lib listed by the author on GPUImage repository but it didn't work.

Anyway, I will need help to fix it, I hope this first version will be corrected by more experimented users.


Reply to this email directly or view it on GitHub.

Contributor

valryon commented May 15, 2013

Thanks Clancey, this was exactly what I needed!

Now the linking works fine, even in "SDK assemblies only" mode.
And it still runs on my iPad mini.

ytn3rd commented Sep 30, 2013

Been using this on a real device + in released AppStore App for a little while now. Working fine, except iOS7 iPhone 4 the filters stuff makes images tinted yellow :|

Also tried forking this and adding extra filter stuff I added but it seems to want to fork the original MT-bindings repo, which I already have forked... What am I doing wrong with this? [github noob]

ytn3rd commented Dec 22, 2013

Yellow filters was fixed in a GPUImage update.

lipka commented Feb 17, 2014

Would be nice to get this merged so other people can improve on it. Is there anything outstanding?

migueldeicaza added a commit that referenced this pull request Mar 9, 2015

Merge pull request #136 from pixelnest/master
Adding a first version of GPUImage binding

@migueldeicaza migueldeicaza merged commit b3af4d8 into mono:master Mar 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment