Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
4e4e6a12
Commit
4e4e6a12
authored
5 years ago
by
Beth Thibodeau
Committed by
Android (Google) Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Get accurate display metrics, increase bit rate"
parents
d493125d
bc0929fb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java
+5
-3
5 additions, 3 deletions
...c/com/android/systemui/screenrecord/RecordingService.java
with
5 additions
and
3 deletions
packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java
+
5
−
3
View file @
4e4e6a12
...
...
@@ -27,7 +27,6 @@ import android.content.ContentValues;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.graphics.Point
;
import
android.graphics.drawable.Icon
;
import
android.hardware.display.DisplayManager
;
import
android.hardware.display.VirtualDisplay
;
...
...
@@ -42,6 +41,7 @@ import android.util.DisplayMetrics;
import
android.util.Log
;
import
android.util.Size
;
import
android.view.Surface
;
import
android.view.WindowManager
;
import
android.widget.Toast
;
import
com.android.systemui.R
;
...
...
@@ -76,7 +76,7 @@ public class RecordingService extends Service {
private
static
final
String
ACTION_DELETE
=
"com.android.systemui.screenrecord.DELETE"
;
private
static
final
int
TOTAL_NUM_TRACKS
=
1
;
private
static
final
int
VIDEO_BIT_RATE
=
6
000000
;
private
static
final
int
VIDEO_BIT_RATE
=
10
000000
;
private
static
final
int
VIDEO_FRAME_RATE
=
30
;
private
static
final
int
AUDIO_BIT_RATE
=
16
;
private
static
final
int
AUDIO_SAMPLE_RATE
=
44100
;
...
...
@@ -238,7 +238,9 @@ public class RecordingService extends Service {
mMediaRecorder
.
setOutputFormat
(
MediaRecorder
.
OutputFormat
.
MPEG_4
);
// Set up video
DisplayMetrics
metrics
=
getResources
().
getDisplayMetrics
();
DisplayMetrics
metrics
=
new
DisplayMetrics
();
WindowManager
wm
=
(
WindowManager
)
getSystemService
(
Context
.
WINDOW_SERVICE
);
wm
.
getDefaultDisplay
().
getRealMetrics
(
metrics
);
int
screenWidth
=
metrics
.
widthPixels
;
int
screenHeight
=
metrics
.
heightPixels
;
mMediaRecorder
.
setVideoEncoder
(
MediaRecorder
.
VideoEncoder
.
H264
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment