Clip mediaIn = new Clip();
/** * Used to create a new instance of the node. This routine is called * by <code>cloneTree</code> to duplicate the current node. * @param forceDuplicate when set to <code>true</code>, causes the * <code>duplicateOnCloneTree</code> flag to be ignored. When * <code>false</code>, the value of each node's * <code>duplicateOnCloneTree</code> variable determines whether * NodeComponent data is duplicated or copied. * * @see Node#cloneTree * @see Node#cloneNode * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ @Override public Node cloneNode(boolean forceDuplicate) { Clip c = new Clip(); c.duplicateNode(this, forceDuplicate); return c; }
@Test public void testClipArray() throws Exception { // Lets assume our array contains 2 elements Clip[] clipArray = new Clip[2]; clipArray[0] = new Clip("First", "Clip"); clipArray[1] = new Clip("Second", "Clip"); // Lets retrieve 2nd object (with index: 1) Clip secondObject = clipArray[1]; System.out.println(secondObject.getAuthor()); System.out.println(secondObject.getTitle()); }
/** * Set the Clip's application region to the specified bounds. * This is used when the application bounding leaf is set to null. * @param region the bounds that contains the Clip's new application * region. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setApplicationBounds(Bounds region) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip2")); if (isLive()) ((ClipRetained)this.retained).setApplicationBounds(region); else ((ClipRetained)this.retained).initApplicationBounds(region); }
/** * Retrieves the Clip node's application bounding leaf. * @return this Clip's application bounding leaf information * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public BoundingLeaf getApplicationBoundingLeaf() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip3")); return ((ClipRetained)this.retained).getApplicationBoundingLeaf(); }
@Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( boundingLeaf ); control.writeBounds( out, ((Clip)node).getApplicationBounds() ); out.writeDouble( ((Clip)node).getBackDistance() ); }
public ClipState(SymbolTableData symbol,Controller control) { super( symbol, control ); if (node!=null) boundingLeaf = control.getSymbolTable().addReference( ((Clip)node).getApplicationBoundingLeaf() ); }
/** * Set the Clip's application region to the specified bounding leaf. * When set to a value other than null, this overrides the application * bounds object. * @param region the bounding leaf node used to specify the Clip * node's new application region. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setApplicationBoundingLeaf(BoundingLeaf region) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip2")); if (isLive()) ((ClipRetained)this.retained).setApplicationBoundingLeaf(region); else ((ClipRetained)this.retained).initApplicationBoundingLeaf(region); }
/** * Retrieves the back clip distance. * @return the current back clip distance, in meters */ public double getBackDistance() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BACK_DISTANCE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip1")); return ((ClipRetained)this.retained).getBackDistance(); }
/** * Sets the back clip distance to the specified value. * There are several considerations that need to be taken into * account when choosing values for the front and back clip * distances. These are enumerated in the description of * <a href=View.html#setFrontClipDistance(double)> * View.setFrontClipDistance</a>. * @param backDistance the new back clip distance in meters * @see View#setFrontClipDistance * @see View#setBackClipDistance */ public void setBackDistance(double backDistance) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BACK_DISTANCE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip0")); if (isLive()) ((ClipRetained)this.retained).setBackDistance(backDistance); else ((ClipRetained)this.retained).initBackDistance(backDistance); }
/** * Retrieves the Clip node's application bounds. * @return this Clip's application bounds information * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public Bounds getApplicationBounds() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip3")); return ((ClipRetained)this.retained).getApplicationBounds(); }
int numberOfClips = 10; List<Clip> clips = new ArrayList<Clip>(); for (int i = 0; i < numberOfClips; i++) { Clip clip = new Clip(); clips.add(clip); }
FfmpegController fc = new FfmpegController(fileTmp, fileAppRoot); final Clip out = new Clip("compiled.mp4");
Clip clipIn= new Clip(); FfmpegController ffmpegController = new FfmpegController(getApplicationContext(), getApplicationContext().getCacheDir()); clipIn.path = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES)+"/Video/cvplay.avi").getCanonicalPath();
public Clip convert(Clip mediaIn, String outPath, ShellCallback sc) throws Exception { ArrayList<String> cmd = new ArrayList<String>(); Clip mediaOut = new Clip(); String mediaPath = mediaIn.path; cmd = new ArrayList<String>(); cmd.add(mFfmpegBin); cmd.add("-i"); cmd.add(mediaPath); cmd.add("-b:a"); cmd.add("128k"); mediaOut.path = outPath; cmd.add(mediaOut.path); execFFMPEG(cmd, sc); return mediaOut; // this is not importatnt because file will be put in outPath }
Clip clip = new Clip(); clip.path = new File(videoSrcPath).getCanonicalPath(); ffmpegController.getInfo(clip); listVideos.add(clip); Clip clip2 = new Clip(); clip2.path = new File(videoSrcPath2).getCanonicalPath(); ffmpegController.getInfo(clip2); listVideos.add(clip2); Clip clip3 = new Clip(); clip3.path = new File(videoSrcPath3).getCanonicalPath(); ffmpegController.getInfo(clip3); listVideos.add(clip3); Clip clipOut = new Clip(); clipOut.path = new File(outputFilePath).getCanonicalPath();
public Clip convert (Clip mediaIn, String outPath, ShellCallback sc) throws Exception { ArrayList<String> cmd = new ArrayList<String>(); cmd.add(mFfmpegBin); cmd.add("-y"); cmd.add("-i"); cmd.add(new File(mediaIn.path).getCanonicalPath()); if (mediaIn.startTime != null) { cmd.add("-ss"); cmd.add(mediaIn.startTime); } if (mediaIn.duration != -1) { cmd.add("-t"); cmd.add(String.format(Locale.US,"%f",mediaIn.duration)); } Clip mediaOut = new Clip(); File fileOut = new File(outPath); mediaOut.path = fileOut.getCanonicalPath(); cmd.add(mediaOut.path); execFFMPEG(cmd, sc); return mediaOut; }