Mac OSX snow Leopard 10.6.8 - Processing 1.5.1, 2.0.3
Dear P5 team and fans!
i have a lot of questions about video and video package from processing:
1°) in the reference doc about movie class i cannot understand why, sometimes, the method " void movieEvent(Movie m) { m.read()} is present and sometimes is not present, depends of examples (jump, available, read, play....) - Furthermore i have tried with it and without it and the result seems to be the same...What is for example the difference between this method and someting like ::
void draw(){
if (video.available(){
video.read();}
} ???
2°) Trying to read .mov videos in 1.5.1 i have often the OutofBoundsArray exception and finally understood that this error happens when the width and height for the video is read like 0 (or1!!!) I have tried a lot of solutions:
- putting video = new Movie("monfilm.mov") at the very beginning of setUp(), and before "size(1024, 768,P2D)"
- putting in the same setup()
video.play();
video.jump(0);
video.pause();
and calling the play() method in draw()
::::: Results are better... Yet sometimes (with the same video & the same code) i got the ArrayException. How is it possible that it happens AFTER play() jump() and pause()???
3°) i am now working with big videos (.mov, PAL, 500MO); with 1.5.1 i got the ArrayException 1/10. So i decided to try with 2.0.3. The videos are the same. But they are loaded and read very very slowly...I had the same result with 1.5.1 when i used the GSvideo library with GStreamer....
4°) i have tried to export .app: it fails, memory error, probably because the videos are too big...
---- And using exactly the same videos but in director and lingo everything works perfectly, not any error and export as .app. Strange! --- But i cannot use director because in the same work i need the Capture class which is now impossible (the myron Xtra was never updated...)
excuse me but i have destroyed the topic !!! -
thanks for your answer but it seems to me that you only confirm what i said: the word in front is the
secondly displayed, despite of its Z....
i am using 1.5.1
as for 1.5.1 the result with p3D and opengl is not the same.
here below your code but i changed the displaying order and left the same z value and add a third text that i want to put in front of the sphere using its z value: as you can see itis NOT in front; in order to do that i must firstly display the sphere and THEN add the text....
if ( mousePressed ){
// behind
//behind!!! // if i want to change that, i have to display
//this word AFTER the other, but changing the z value has no effect, except to change the size, as normal.
fill(0, 102, 153, 204);
text("blueeeeeee", 12, 65, 30);//blue :not forwards despite the z value
fill(255,0,0);//the red one
text("reddd-behind", 12, 75,10); //red :: not behind despite the z value
}
else{
fill(0, 102, 153, 204);
text("blueeeeeee", 12, 65, 30);//blue : behind despite the z value
fill(255,0,0);//the red one
text("reddd-infront", 12,75,10); // in front despite the z value
fill(255,0,0);//the red one
text("word", 12, 75,10); //behind!!! // if i want to change that, i have to display
//this word AFTER the other, but changing the z value has no effect, except to change the size, as normal.
fill(0, 102, 153, 204);
text("word", 12, 45, -30);//blue : forwards
pushMatrix();
translate(width/2, height/2, 100);
fill(0,255,0);// the green sphere: forwards
sphere(40);
popMatrix();
i have tried to download and run the 2.0b8 for OSX with 2 computers (imac, macbookpro) running 0SX 10.6.8; as for the macbookpro the app launches but the work window is very very strange, with only 1 line on the top. If i try to open some sketch it fails with a lot of errors which seem to be relative to java security exceptions. On the other mac (imac) processing launches normally and if i open some sketch from myself they run well. Yet, if i try to open a lot of the " java examples" the display window flickers or shows inconsistent lines or shapes (picture below): but there is not any error message. Sometimes also, but not often, the examples run normally...
till now i have not got any problem of this kind, using either 1.5.1 or 2.0b7.
I have tried either 32 bts mode or 64: same issue.
typing "while" in a program
then click "find in reference"= javaexception::
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at processing.app.macosx.Platform.openURL(Platform.java:141)
at processing.app.Base.openURL(Base.java:1711)
at processing.app.Editor.showReference(Editor.java:1041)
at processing.app.Editor.handleFindReference(Editor.java:1629)
at processing.mode.java.JavaEditor.access$2(JavaEditor.java:1)
at processing.mode.java.JavaEditor$9.actionPerformed(JavaEditor.java:132)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
at java.awt.MenuItem.processActionEvent(MenuItem.java:650)
at java.awt.MenuItem.processEvent(MenuItem.java:609)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:663)
at java.awt.EventQueue$2.run(EventQueue.java:661)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:677)
at java.awt.EventQueue$3.run(EventQueue.java:675)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:674)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException: The file: /Applications/Processing 2.app/Contents/Resources/Java/modes/java/reference/while_.html doesn't exist.
at java.awt.Desktop.checkFileValidation(Desktop.java:191)
at java.awt.Desktop.open(Desktop.java:252)
... 38 more