VideoEditorProfile.java revision 600acf14ff12eaf139f0ac644fb7e17849af65fa
1/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package android.media.videoeditor;
17
18/**
19 * The VideoEditorProfile class is used to retrieve the
20 * predefined videoeditor profile settings for videoeditor applications.
21 * These settings are read-only.
22 *
23 * <p>The videoeditor profile specifies the following set of parameters:
24 * <ul>
25 * <li> max input video frame width
26 * <li> max input video frame height
27 * <li> max output video frame width
28 * <li> max output video frame height
29 * </ul>
30 * {@hide}
31 */
32public class VideoEditorProfile
33{
34    /**
35     * The max input video frame width
36     */
37    public int maxInputVideoFrameWidth;
38
39    /**
40     * The max input video frame height
41     */
42    public int maxInputVideoFrameHeight;
43
44    /**
45     * The max ouput video frame width
46     */
47    public int maxOutputVideoFrameWidth;
48
49    /**
50     * The max ouput video frame height
51     */
52    public int maxOutputVideoFrameHeight;
53
54    /**
55     * Returns the videoeditor profile
56     */
57    public static VideoEditorProfile get() {
58        return native_get_videoeditor_profile();
59    }
60
61    static {
62        System.loadLibrary("media_jni");
63        native_init();
64    }
65
66    // Private constructor called by JNI
67    private VideoEditorProfile(int inputWidth,
68                             int inputHeight,
69                             int outputWidth,
70                             int outputHeight) {
71
72        this.maxInputVideoFrameWidth = inputWidth;
73        this.maxInputVideoFrameHeight = inputHeight;
74        this.maxOutputVideoFrameWidth = outputWidth;
75        this.maxOutputVideoFrameHeight = outputHeight;
76    }
77
78    // Methods implemented by JNI
79    private static native final void native_init();
80    private static native final VideoEditorProfile
81	    native_get_videoeditor_profile();
82}
83