Home | History | Annotate | Download | only in filterfw

Lines Matching refs:Frame

27  * There are two ways to obtain new Frame instances. You can call
28 * {@link OutputPort#fetchAvailableFrame(int[])} on an OutputPort to obtain a Frame to pass to an
30 * a detached Frame instance that you may hold onto in your filter. If you need to hold on to a
31 * Frame that is owned by an input or output queue, you must call
34 * When you are done using a detached Frame, you must release it yourself.
36 * To access frame data, call any of the {@code lock}-methods. This will give you access to the
37 * frame data in the desired format. You must pass in a {@code mode} indicating whether you wish
38 * to read or write to the data. Writing to a read-locked Frame may produce unexpected results and
40 * {@link #unlock()}. Note, that a Frame must be unlocked before you push it into an output queue.
42 * Generally, any type of access format to a Frame's data will be granted. However, it is strongly
44 * in the access flags passed to {@code newFrame()}. This will allow the Frame to allocate
47 * A frame can be be pushed to an OutputPort by calling the {@link OutputPort#pushFrame(Frame)}
50 * On the other end, a Filter can pull in an input Frame by calling {@link InputPort#pullFrame()}
53 public class Frame {
58 /** Frame data access mode: Read */
60 /** Frame data access mode: Write */
68 * Returns the frame's type.
69 * @return A FrameType instance describing the frame data-type.
80 * Set the frame's timestamp in nanoseconds.
82 * @param timestamp the timestamp of this frame in nanoseconds.
89 * @return the frame's timestamp in nanoseconds.
96 * @return the frame's timestamp in milliseconds.
128 return "Frame[" + getType().toString() + "]: " + mBackingStore;
133 return object instanceof Frame && ((Frame)object).mBackingStore == mBackingStore;
136 public static Frame create(FrameType type, int[] dimensions) {
139 throw new IllegalStateException("Attempting to create new Frame outside of "
142 return new Frame(type, dimensions, manager);
145 public final Frame release() {
150 public final Frame retain() {
157 throw new RuntimeException("Attempting to unlock frame that is not locked!");
166 Frame(FrameType type, int[] dimensions, FrameManager manager) {
170 Frame(BackingStore backingStore) {
175 // Make sure frame is in write-mode
177 throw new RuntimeException("Attempting to write to read-only frame " + this + "!");
191 + "Frame to " + newCount + "-dimensional Frame!");
197 Frame makeCpuCopy(FrameManager frameManager) {
198 Frame frame = new Frame(getType(), getDimensions(), frameManager);
199 frame.mBackingStore.importStore(mBackingStore);
200 return frame;