Lines Matching refs:surface

83      * Invalid surface group ID.
85 *<p>An {@link OutputConfiguration} with this value indicates that the included surface
86 *doesn't belong to any surface group.</p>
93 * @param surface
96 * <p>This constructor creates a default configuration, with a surface group ID of
100 public OutputConfiguration(@NonNull Surface surface) {
101 this(SURFACE_GROUP_ID_NONE, surface, ROTATION_0);
105 * Unknown surface source type.
110 * The surface is obtained from {@link android.view.SurfaceView}.
115 * The surface is obtained from {@link android.graphics.SurfaceTexture}.
130 * with a surface group ID.
133 * A surface group ID is used to identify which surface group this output surface belongs to. A
134 * surface group is a group of output surfaces that are not intended to receive camera output
136 * by all the surfaces from the same surface group, therefore may reduce the overall memory
138 * simultaneously streaming. A negative ID indicates that this surface doesn't belong to any
139 * surface group. The default value is {@value #SURFACE_GROUP_ID_NONE}.</p>
150 * not in the same surface group to begin with, especially if the outputs have substantially
155 * @param surface
159 public OutputConfiguration(int surfaceGroupId, @NonNull Surface surface) {
160 this(surfaceGroupId, surface, ROTATION_0);
168 * @param surface
173 * application should make sure corresponding surface size has width and height
182 public OutputConfiguration(@NonNull Surface surface, int rotation) {
183 this(SURFACE_GROUP_ID_NONE, surface, rotation);
189 * <p>This constructor takes an argument for desired camera rotation and for the surface group
194 * @param surface
199 * application should make sure corresponding surface size has width and height
208 public OutputConfiguration(int surfaceGroupId, @NonNull Surface surface, int rotation) {
209 checkNotNull(surface, "Surface must not be null");
214 mSurfaces.add(surface);
216 mConfiguredSize = SurfaceUtils.getSurfaceSize(surface);
217 mConfiguredFormat = SurfaceUtils.getSurfaceFormat(surface);
218 mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(surface);
219 mConfiguredGenerationId = surface.getGenerationId();
243 * @param surfaceSize Size for the deferred surface.
245 * this surface. Only {@link android.view.SurfaceHolder SurfaceHolder.class} and
259 throw new IllegalArgumentException("Unknow surface source class type");
282 * compatible surface can be attached to an OutputConfiguration so that they map to one
300 * <p>To enable surface sharing, this function must be called before {@link
315 * <p>This will return true if the output configuration was constructed with surface deferred by
317 * the deferred surface is added later by {@link OutputConfiguration#addSurface}.</p>
319 * @return true if this configuration has deferred surface.
327 * Add a surface to this OutputConfiguration.
335 * <p> If the OutputConfiguration was constructed with a deferred surface by {@link
336 * OutputConfiguration#OutputConfiguration(Size, Class)}, the added surface must be obtained
342 * surface must be compatible with the existing surface. See {@link #enableSurfaceSharing} for
348 * @param surface The surface to be added.
353 * or if the OutputConfiguration is not shared and it already has a surface associated
356 public void addSurface(@NonNull Surface surface) {
357 checkNotNull(surface, "Surface must not be null");
358 if (mSurfaces.contains(surface)) {
368 // This will throw IAE is the surface was abandoned.
369 Size surfaceSize = SurfaceUtils.getSurfaceSize(surface);
371 Log.w(TAG, "Added surface size " + surfaceSize +
376 if (mConfiguredFormat != SurfaceUtils.getSurfaceFormat(surface)) {
377 throw new IllegalArgumentException("The format of added surface format doesn't match");
380 // If the surface format is PRIVATE, do not enforce dataSpace because camera device may
383 mConfiguredDataspace != SurfaceUtils.getSurfaceDataspace(surface)) {
384 throw new IllegalArgumentException("The dataspace of added surface doesn't match");
387 mSurfaces.add(surface);
452 * If more than one surface is associated with this {@link OutputConfiguration}, return the
488 * Get the surface group ID associated with this {@link OutputConfiguration}.
490 * @return the surface group ID associated with this {@link OutputConfiguration}.
539 * <p>Two output configurations are only equal if and only if the underlying surfaces, surface
581 // Need ensure that the hashcode remains unchanged after adding a deferred surface. Otherwise
583 // surface is set.
600 // Surface source type, this is only used by the deferred surface configuration objects.
603 // The size, format, and dataspace of the surface when OutputConfiguration is created.
609 // Flag indicating if this config has deferred surface.