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

Commit 23c430ca authored by Gil Dobjanschi's avatar Gil Dobjanschi Committed by Android (Google) Code Review
Browse files

Merge "Added IOException to WaveformData constructor"

parents dd4e4603 b1fcb2ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ public class AudioTrack {
    /**
     * @return The waveform data
     */
    public WaveformData getWaveformData() {
    public WaveformData getWaveformData() throws IOException {
        if (mWaveformData == null) {
            return null;
        }
+1 −1
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ public class MediaVideoItem extends MediaItem {
    /**
     * @return The waveform data
     */
    public WaveformData getWaveformData() {
    public WaveformData getWaveformData() throws IOException {
        if (mWaveformData == null) {
            return null;
        }
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package android.media.videoeditor;

import java.io.File;



/**
 * This class allows to render an "alpha blending" transition according to a
@@ -71,6 +74,7 @@ public class TransitionAlpha extends Transition {
     *           projects folder (the parent folder for all projects).
     * @param blendingPercent The blending percent applied
     * @param invert true to invert the direction of the alpha blending
     *
     * @throws IllegalArgumentException if behavior is not supported, or if
     *             direction are not supported.
     */
@@ -79,6 +83,10 @@ public class TransitionAlpha extends Transition {
            int blendingPercent, boolean invert) {
        super(transitionId, afterMediaItem, beforeMediaItem, durationMs, behavior);

        if (!new File(maskFilename).exists()) {
            throw new IllegalArgumentException("Invalid mask file name: " + maskFilename);
        }

        mMaskFilename = maskFilename;
        mBlendingPercent = blendingPercent;
        mIsInvert = invert;
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class WaveformData {
     *
     * @param audioWaveformFilename The name of the audio waveform file
     */
    WaveformData(String audioWaveformFilename) {
    WaveformData(String audioWaveformFilename) throws IOException {
        // TODO: Read these values from the file
        mFrameDurationMs = 20;
        mFramesCount = 300000 / mFrameDurationMs;