Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ef7fe43 authored by Hangyu Kuang's avatar Hangyu Kuang
Browse files

media: unhide mediarecorder's setVideoEncodingProfileLevel api.

Test: GoogleCmaera app.
bug: 35151543
Change-Id: I37dee948298a14d338bca670af0bc01450c83529
parent 20959b2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22997,6 +22997,7 @@ package android.media {
    method public void setProfile(android.media.CamcorderProfile);
    method public void setVideoEncoder(int) throws java.lang.IllegalStateException;
    method public void setVideoEncodingBitRate(int);
    method public void setVideoEncodingProfileLevel(int, int);
    method public void setVideoFrameRate(int) throws java.lang.IllegalStateException;
    method public void setVideoSize(int, int) throws java.lang.IllegalStateException;
    method public void setVideoSource(int) throws java.lang.IllegalStateException;
+1 −0
Original line number Diff line number Diff line
@@ -24787,6 +24787,7 @@ package android.media {
    method public void setProfile(android.media.CamcorderProfile);
    method public void setVideoEncoder(int) throws java.lang.IllegalStateException;
    method public void setVideoEncodingBitRate(int);
    method public void setVideoEncodingProfileLevel(int, int);
    method public void setVideoFrameRate(int) throws java.lang.IllegalStateException;
    method public void setVideoSize(int, int) throws java.lang.IllegalStateException;
    method public void setVideoSource(int) throws java.lang.IllegalStateException;
+1 −0
Original line number Diff line number Diff line
@@ -23110,6 +23110,7 @@ package android.media {
    method public void setProfile(android.media.CamcorderProfile);
    method public void setVideoEncoder(int) throws java.lang.IllegalStateException;
    method public void setVideoEncodingBitRate(int);
    method public void setVideoEncodingProfileLevel(int, int);
    method public void setVideoFrameRate(int) throws java.lang.IllegalStateException;
    method public void setVideoSize(int, int) throws java.lang.IllegalStateException;
    method public void setVideoSource(int) throws java.lang.IllegalStateException;
+12 −6
Original line number Diff line number Diff line
@@ -746,14 +746,19 @@ public class MediaRecorder
    }

    /**
     * Sets the video encoding profile for recording. Call this method before prepare().
     * Prepare() may perform additional checks on the parameter to make sure whether the
     * specified profile and level are applicable, and sometimes the passed profile or
     * level will be discarded due to codec capablity or to ensure the video recording
     * can proceed smoothly based on the capabilities of the platform.
     * @hide
     * Sets the desired video encoding profile and level for recording. The profile and level
     * must be valid for the video encoder set by {@link #setVideoEncoder}. This method can
     * called before or after {@link #setVideoEncoder} but it must be called before {@link #prepare}.
     * {@code prepare()} may perform additional checks on the parameter to make sure that the specified
     * profile and level are applicable, and sometimes the passed profile or level will be
     * discarded due to codec capablity or to ensure the video recording can proceed smoothly
     * based on the capabilities of the platform. <br>Application can also use the
     * {@link MediaCodecInfo.CodecCapabilities#profileLevels} to query applicable combination of profile
     * and level for the corresponding format. Note that the requested profile/level may not be supported by
     * the codec that is actually being used by this MediaRecorder instance.
     * @param profile declared in {@link MediaCodecInfo.CodecProfileLevel}.
     * @param level declared in {@link MediaCodecInfo.CodecProfileLevel}.
     * @throws IllegalArgumentException when an invalid profile or level value is used.
     */
    public void setVideoEncodingProfileLevel(int profile, int level) {
        if (profile <= 0)  {
@@ -1281,3 +1286,4 @@ public class MediaRecorder
    @Override
    protected void finalize() { native_finalize(); }
}