/developers/samples/android/media/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio() 59 mRatioHeight = height; in setAspectRatio() 67 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 69 setMeasuredDimension(width, height); in onMeasure() 71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 74 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio() 59 mRatioHeight = height; in setAspectRatio() 67 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 69 setMeasuredDimension(width, height); in onMeasure() 71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 74 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure() 63 setMeasuredDimension((height * ratioWidth) / ratioHeight, height) in onMeasure()
|
D | Camera2VideoFragment.kt | 88 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 89 openCamera(width, height) in onSurfaceTextureAvailable() 92 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 93 configureTransform(width, height) in onSurfaceTextureSizeChanged() 172 configureTransform(textureView.width, textureView.height) in onSurfaceTextureDestroyed() 219 openCamera(textureView.width, textureView.height) in onResume() 322 private fun openCamera(width: Int, height: Int) { in openCamera() 345 width, height, videoSize) in openCamera() 348 textureView.setAspectRatio(previewSize.width, previewSize.height) in openCamera() 350 textureView.setAspectRatio(previewSize.height, previewSize.width) in openCamera() [all …]
|
D | CompareSizesByArea.kt | 29 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/developers/samples/android/media/Camera2Video/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure() 63 setMeasuredDimension((height * ratioWidth) / ratioHeight, height) in onMeasure()
|
D | Camera2VideoFragment.kt | 88 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 89 openCamera(width, height) in onSurfaceTextureAvailable() 92 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 93 configureTransform(width, height) in onSurfaceTextureSizeChanged() 172 configureTransform(textureView.width, textureView.height) in onSurfaceTextureDestroyed() 219 openCamera(textureView.width, textureView.height) in onResume() 322 private fun openCamera(width: Int, height: Int) { in openCamera() 345 width, height, videoSize) in openCamera() 348 textureView.setAspectRatio(previewSize.width, previewSize.height) in openCamera() 350 textureView.setAspectRatio(previewSize.height, previewSize.width) in openCamera() [all …]
|
D | CompareSizesByArea.kt | 29 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/developers/samples/android/media/Camera2Basic/kotlinApp/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < height * ratioWidth / ratioHeight) { in onMeasure() 63 setMeasuredDimension(height * ratioWidth / ratioHeight, height) in onMeasure()
|
D | Camera2BasicFragment.kt | 69 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 70 openCamera(width, height) in onSurfaceTextureAvailable() 73 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 74 configureTransform(width, height) in onSurfaceTextureSizeChanged() 277 openCamera(textureView.width, textureView.height) in onResume() 316 private fun setUpCameraOutputs(width: Int, height: Int) { in setUpCameraOutputs() 336 imageReader = ImageReader.newInstance(largest.width, largest.height, in setUpCameraOutputs() 350 val rotatedPreviewWidth = if (swappedDimensions) height else width in setUpCameraOutputs() 351 val rotatedPreviewHeight = if (swappedDimensions) width else height in setUpCameraOutputs() 368 textureView.setAspectRatio(previewSize.width, previewSize.height) in setUpCameraOutputs() [all …]
|
D | CompareSizesByArea.kt | 15 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/developers/build/prebuilts/gradle/Camera2Video/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/Camera2Basic/kotlinApp/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < height * ratioWidth / ratioHeight) { in onMeasure() 63 setMeasuredDimension(height * ratioWidth / ratioHeight, height) in onMeasure()
|
D | Camera2BasicFragment.kt | 69 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 70 openCamera(width, height) in onSurfaceTextureAvailable() 73 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 74 configureTransform(width, height) in onSurfaceTextureSizeChanged() 277 openCamera(textureView.width, textureView.height) in onResume() 316 private fun setUpCameraOutputs(width: Int, height: Int) { in setUpCameraOutputs() 336 imageReader = ImageReader.newInstance(largest.width, largest.height, in setUpCameraOutputs() 350 val rotatedPreviewWidth = if (swappedDimensions) height else width in setUpCameraOutputs() 351 val rotatedPreviewHeight = if (swappedDimensions) width else height in setUpCameraOutputs() 368 textureView.setAspectRatio(previewSize.width, previewSize.height) in setUpCameraOutputs() [all …]
|
D | CompareSizesByArea.kt | 15 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/developers/build/prebuilts/gradle/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 int width, int height, int gravity) { in OverlayDisplayWindow() argument 66 mHeight = height; in OverlayDisplayWindow() 71 int width, int height, int gravity) { in create() argument 73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create() 75 return new LegacyImpl(context, name, width, height, gravity); in create() 91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument 110 int width, int height, int gravity) { in LegacyImpl() argument 111 super(context, name, width, height, gravity); in LegacyImpl() 136 int height = (int)(display.getHeight() * INITIAL_SCALE); in show() local 138 height = mHeight * width / mWidth; in show() [all …]
|
D | LocalPlayer.java | 353 int height = mMediaPlayer.getVideoHeight(); in updateVideoRect() local 354 if (width > 0 && height > 0) { in updateVideoRect() 356 mVideoHeight = height; in updateVideoRect() 453 int width, int height) { in surfaceChanged() argument 455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged() 480 int height = getVideoHeight(); in updateSize() local 481 if (width > 0 && height > 0) { in updateSize() 489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize() 493 lp.height = surfaceWidth * height / width; in updateSize() 497 lp.width = surfaceHeight * width / height; in updateSize() [all …]
|
/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 int width, int height, int gravity) { in OverlayDisplayWindow() argument 66 mHeight = height; in OverlayDisplayWindow() 71 int width, int height, int gravity) { in create() argument 73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create() 75 return new LegacyImpl(context, name, width, height, gravity); in create() 91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument 110 int width, int height, int gravity) { in LegacyImpl() argument 111 super(context, name, width, height, gravity); in LegacyImpl() 136 int height = (int)(display.getHeight() * INITIAL_SCALE); in show() local 138 height = mHeight * width / mWidth; in show() [all …]
|
D | LocalPlayer.java | 353 int height = mMediaPlayer.getVideoHeight(); in updateVideoRect() local 354 if (width > 0 && height > 0) { in updateVideoRect() 356 mVideoHeight = height; in updateVideoRect() 453 int width, int height) { in surfaceChanged() argument 455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged() 480 int height = getVideoHeight(); in updateSize() local 481 if (width > 0 && height > 0) { in updateSize() 489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize() 493 lp.height = surfaceWidth * height / width; in updateSize() 497 lp.width = surfaceHeight * width / height; in updateSize() [all …]
|
/developers/build/prebuilts/gradle/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 88 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 112 float boxAspectRatio = width / (float) height; in onMeasure() 135 width = (int) (height * mAspectRatio); in onMeasure() 137 height = (int) (width / mAspectRatio); in onMeasure() 142 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 145 setMeasuredDimension(width, height); in onMeasure()
|
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 88 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 112 float boxAspectRatio = width / (float) height; in onMeasure() 135 width = (int) (height * mAspectRatio); in onMeasure() 137 height = (int) (width / mAspectRatio); in onMeasure() 142 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 145 setMeasuredDimension(width, height); in onMeasure()
|
/developers/build/prebuilts/gradle/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ |
D | ImageResizer.java | 70 public void setImageSize(int width, int height) { in setImageSize() argument 72 mImageHeight = height; in setImageSize() 235 final int height = options.outHeight; in calculateInSampleSize() local 239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize() 241 final int halfHeight = height / 2; in calculateInSampleSize() 257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
|