summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-05-10 16:59:33 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-25 21:55:20 -0700
commit9cd5721ea88d24549a2946e1aaaef04993bc94d6 (patch)
tree5cace1ebb46725b06e76340b2e902ffc682d8903 /res
parent56881f01e46cd33506b7d8a9ee1a7e66165c4519 (diff)
downloadandroid_packages_apps_Snap-9cd5721ea88d24549a2946e1aaaef04993bc94d6.zip
android_packages_apps_Snap-9cd5721ea88d24549a2946e1aaaef04993bc94d6.tar.gz
android_packages_apps_Snap-9cd5721ea88d24549a2946e1aaaef04993bc94d6.tar.bz2
SnapdragonCamera: Add video to Camera2 module
Add video to Camera2 module and combine the UI Change-Id: I0bcd86eb6b95fe2180856780ddd794682259e799
Diffstat (limited to 'res')
-rw-r--r--res/layout/camera_controls.xml13
-rw-r--r--res/layout/capture_module.xml25
-rw-r--r--res/values/camera2arrays.xml214
-rw-r--r--res/values/qcomstrings.xml14
-rw-r--r--res/xml/capture_preferences.xml68
5 files changed, 333 insertions, 1 deletions
diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml
index 77ff076..6c40f1b 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -45,6 +45,19 @@
android:scaleType="fitCenter"
android:src="@drawable/btn_new_shutter" />
+ <ImageView
+ android:id="@+id/video_button"
+ android:visibility="invisible"
+ android:layout_width="@dimen/shutter_size"
+ android:layout_height="@dimen/shutter_size"
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/shutter_offset"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/btn_new_shutter_video" />
+
<com.android.camera.ui.RotateImageView
android:id="@+id/preview_thumb"
android:layout_width="@dimen/capture_size"
diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml
index d91b49a..3b4f025 100644
--- a/res/layout/capture_module.xml
+++ b/res/layout/capture_module.xml
@@ -56,6 +56,31 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
+ <com.android.camera.ui.RotateLayout
+ android:id="@+id/recording_time_rect"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+
+ <com.android.camera.PauseButton
+ android:id="@+id/video_pause"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="70dp"
+ android:padding="23dp"
+ android:src="@drawable/btn_pause_recording"/>
+
+ <include
+ android:id="@+id/labels"
+ layout="@layout/viewfinder_labels_video"/>
+ </LinearLayout>
+ </com.android.camera.ui.RotateLayout>
+
<include
style="@style/CameraControls"
layout="@layout/camera_controls"
diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml
index 49f37e1..b2cb979 100644
--- a/res/values/camera2arrays.xml
+++ b/res/values/camera2arrays.xml
@@ -571,4 +571,218 @@
<item>@drawable/ic_settings_filter_on</item>
</string-array>
+ <string-array name="pref_camera2_video_quality_entries" translatable="false">
+ <item>@string/pref_video_quality_entry_4kdci</item>
+ <item>@string/pref_video_quality_entry_2160p</item>
+ <item>@string/pref_video_quality_entry_qHD</item>
+ <item>@string/pref_video_quality_entry_2k</item>
+ <item>@string/pref_video_quality_entry_1080p</item>
+ <item>@string/pref_video_quality_entry_720p</item>
+ <item>@string/pref_video_quality_entry_480p</item>
+ <item>@string/pref_video_quality_entry_vga</item>
+ <item>@string/pref_video_quality_entry_cif</item>
+ <item>@string/pref_video_quality_entry_qvga</item>
+ <item>@string/pref_video_quality_entry_qcif</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_quality_entryvalues" translatable="false">
+ <item>4096x2160</item>
+ <item>3840x2160</item>
+ <item>2560x1440</item>
+ <item>2048x1080</item>
+ <item>1920x1080</item>
+ <item>1280x720</item>
+ <item>720x480</item>
+ <item>640x480</item>
+ <item>352x288</item>
+ <item>320x240</item>
+ <item>176x144</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_duration_entries" translatable="false">
+ <item>@string/pref_camera_video_duration_entry_mms</item>
+ <item>@string/pref_camera_video_duration_entry_10</item>
+ <item>@string/pref_camera_video_duration_entry_30</item>
+ <item>@string/pref_camera_video_duration_entry_nolimit</item>
+ </string-array>
+
+ <!-- The numbers are in minutes, except -1 means the duration suitable for mms. -->
+ <string-array name="pref_camera2_video_duration_entryvalues" translatable="false">
+ <item>-1</item>
+ <item>10</item>
+ <item>30</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="pref_camera2_videoencoder_entries" translatable="false">
+ <item>@string/pref_camera_videoencoder_entry_0</item>
+ <item>@string/pref_camera_videoencoder_entry_1</item>
+ <item>@string/pref_camera_videoencoder_entry_2</item>
+ <item>@string/pref_camera_videoencoder_entry_3</item>
+ </string-array>
+
+ <string-array name="pref_camera2_videoencoder_entryvalues" translatable="false">
+ <item>mpeg-4-sp</item>
+ <item>h263</item>
+ <item>h264</item>
+ <item>h265</item>
+ </string-array>
+
+ <string-array name="pref_camera2_audioencoder_entries" translatable="false">
+ <item>@string/pref_camera_audioencoder_entry_0</item>
+ <item>@string/pref_camera_audioencoder_entry_1</item>
+ </string-array>
+
+ <string-array name="pref_camera2_audioencoder_entryvalues" translatable="false">
+ <item>amr-nb</item>
+ <item>aac</item>
+ </string-array>
+
+ <string-array name="pref_camera2_dis_entries" translatable="false">
+ <item>@string/pref_camera_dis_entry_off</item>
+ <item>@string/pref_camera_dis_entry_on</item>
+ </string-array>
+
+ <string-array name="pref_camera2_dis_entryvalues" translatable="false">
+ <item>@string/pref_camera_dis_value_disable</item>
+ <item>@string/pref_camera_dis_value_enable</item>
+ </string-array>
+
+ <string-array name="pref_camera2_noise_reduction_entries" translatable="false">
+ <item>@string/pref_camera2_noise_reduction_entry_off</item>
+ <item>@string/pref_camera2_noise_reduction_entry_fast</item>
+ <item>@string/pref_camera2_noise_reduction_entry_high_quality</item>
+ </string-array>
+
+ <string-array name="pref_camera2_noise_reduction_entryvalues" translatable="false">
+ <item>@string/pref_camera2_noise_reduction_value_off</item>
+ <item>@string/pref_camera2_noise_reduction_value_fast</item>
+ <item>@string/pref_camera2_noise_reduction_value_high_quality</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_flashmode_entries" translatable="false">
+ <item>@string/pref_camera_flashmode_entry_off</item>
+ <item>@string/pref_camera_flashmode_entry_on</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_flashmode_labels" translatable="false">
+ <item>@string/pref_camera_flashmode_label_off</item>
+ <item>@string/pref_camera_flashmode_label_on</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_flashmode_entryvalues" translatable="false">
+ <item>off</item>
+ <item>torch</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_rotation_entries" translatable="false">
+ <item>@string/pref_camera_video_rotation_entry_0</item>
+ <item>@string/pref_camera_video_rotation_entry_90</item>
+ <item>@string/pref_camera_video_rotation_entry_180</item>
+ <item>@string/pref_camera_video_rotation_entry_270</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_rotation_labels" translatable="false">
+ <item>@string/pref_camera_video_rotation_label_0</item>
+ <item>@string/pref_camera_video_rotation_label_90</item>
+ <item>@string/pref_camera_video_rotation_label_180</item>
+ <item>@string/pref_camera_video_rotation_label_270</item>
+ </string-array>
+
+ <string-array name="pref_camera2_video_rotation_entryvalues" translatable="false">
+ <item>0</item>
+ <item>90</item>
+ <item>180</item>
+ <item>270</item>
+ </string-array>
+
+ <!-- These values correspond to the time interval between frame capture in millseconds
+for time lapse recording -->
+ <string-array name="pref_camera2_video_time_lapse_frame_interval_entryvalues" translatable="false">
+ <item>0</item>
+ <item>500</item>
+ <item>1000</item>
+ <item>1500</item>
+ <item>2000</item>
+ <item>2500</item>
+ <item>3000</item>
+ <item>4000</item>
+ <item>5000</item>
+ <item>6000</item>
+ <item>10000</item>
+ <item>12000</item>
+ <item>15000</item>
+ <item>24000</item>
+ <item>30000</item>
+ <item>60000</item>
+ <item>90000</item>
+ <item>120000</item>
+ <item>150000</item>
+ <item>180000</item>
+ <item>240000</item>
+ <item>300000</item>
+ <item>360000</item>
+ <item>600000</item>
+ <item>720000</item>
+ <item>900000</item>
+ <item>1440000</item>
+ <item>1800000</item>
+ <item>3600000</item>
+ <item>5400000</item>
+ <item>7200000</item>
+ <item>9000000</item>
+ <item>10800000</item>
+ <item>14400000</item>
+ <item>18000000</item>
+ <item>21600000</item>
+ <item>36000000</item>
+ <item>43200000</item>
+ <item>54000000</item>
+ <item>86400000</item>
+ </string-array>
+
+ <!-- These values correspond to the time interval between frame capture in
+ different units (i.e. seconds, minutes, hours) for time lapse recording -->
+ <string-array name="pref_camera2_video_time_lapse_frame_interval_entries" translatable="true">
+ <item>@string/pref_video_time_lapse_frame_interval_off</item>
+ <item>@string/pref_video_time_lapse_frame_interval_500</item>
+ <item>@string/pref_video_time_lapse_frame_interval_1000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_1500</item>
+ <item>@string/pref_video_time_lapse_frame_interval_2000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_2500</item>
+ <item>@string/pref_video_time_lapse_frame_interval_3000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_4000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_5000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_6000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_10000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_12000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_15000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_24000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_30000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_60000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_90000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_120000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_150000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_180000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_240000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_300000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_360000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_600000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_720000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_900000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_1440000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_1800000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_3600000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_5400000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_7200000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_9000000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_10800000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_14400000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_18000000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_21600000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_36000000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_43200000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_54000000</item>
+ <item>@string/pref_video_time_lapse_frame_interval_86400000</item>
+ </string-array>
</resources>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 8273210..6710a95 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+ Copyright (c) 2012-2014, 2016, The Linux Foundation. All rights reserved.
Copyright (C) 2014-2016 The CyanogenMod Project
Not a Contribution.
@@ -564,6 +564,18 @@
<string name="pref_camera2_whitebalance_default" translatable="false">1</string>
<string name="pref_camera2_coloreffect_default" translatable="false">0</string>
<string name="pref_camera2_flashmode_default" translatable="false">2</string>
+
<string name="pref_camera2_makeup_title" translatable="true">Makeup</string>
+ <string name="pref_camera2_noise_reduction_default" translatable="false">off</string>
+ <string name="pref_camera2_noise_reduction_title" translatable="true">Noise Reduction</string>
+
+ <string name="pref_camera2_noise_reduction_entry_off" translatable="true">Off</string>
+ <string name="pref_camera2_noise_reduction_entry_fast" translatable="true">Fast</string>
+ <string name="pref_camera2_noise_reduction_entry_high_quality" translatable="true">High Quality</string>
+
+ <string name="pref_camera2_noise_reduction_value_off" translatable="false">off</string>
+ <string name="pref_camera2_noise_reduction_value_fast" translatable="false">fast</string>
+ <string name="pref_camera2_noise_reduction_value_high_quality" translatable="false">high-quality</string>
+
</resources>
diff --git a/res/xml/capture_preferences.xml b/res/xml/capture_preferences.xml
index 5e9235e..697770b 100644
--- a/res/xml/capture_preferences.xml
+++ b/res/xml/capture_preferences.xml
@@ -190,4 +190,72 @@
camera:entries="@array/pref_camera2_makeup_entries"
camera:entryValues="@array/pref_camera2_makeup_entryvalues"
camera:title="@string/pref_camera2_makeup_title"/>
+
+ <IconListPreference
+ camera:entries="@array/pref_camera2_video_quality_entries"
+ camera:entryValues="@array/pref_camera2_video_quality_entryvalues"
+ camera:key="pref_camera2_video_quality_key"
+ camera:singleIcon="@drawable/ic_settings_quality"
+ camera:title="@string/pref_video_quality_title"/>
+
+ <IconListPreference
+ camera:defaultValue="@string/pref_camera_video_duration_default"
+ camera:entries="@array/pref_camera2_video_duration_entries"
+ camera:entryValues="@array/pref_camera2_video_duration_entryvalues"
+ camera:key="pref_camera2_video_duration_key"
+ camera:singleIcon="@drawable/ic_settings_duration"
+ camera:title="@string/pref_camera_video_duration_title"/>
+
+ <ListPreference
+ camera:defaultValue="@string/pref_camera_videoencoder_default"
+ camera:entries="@array/pref_camera2_videoencoder_entries"
+ camera:entryValues="@array/pref_camera2_videoencoder_entryvalues"
+ camera:key="pref_camera2_videoencoder_key"
+ camera:title="@string/pref_camera_videoencoder_title"/>
+ <ListPreference
+ camera:defaultValue="@string/pref_camera_audioencoder_default"
+ camera:entries="@array/pref_camera2_audioencoder_entries"
+ camera:entryValues="@array/pref_camera2_audioencoder_entryvalues"
+ camera:key="pref_camera2_audioencoder_key"
+ camera:title="@string/pref_camera_audioencoder_title"/>
+
+ <IconListPreference
+ camera:defaultValue="@string/pref_camera_dis_default"
+ camera:entries="@array/pref_camera2_dis_entries"
+ camera:entryValues="@array/pref_camera2_dis_entryvalues"
+ camera:key="pref_camera2_dis_key"
+ camera:singleIcon="@drawable/ic_eis_menu"
+ camera:title="@string/pref_camera_dis_title"/>
+
+ <ListPreference
+ camera:defaultValue="@string/pref_camera_noise_reduction_default"
+ camera:entries="@array/pref_camera2_noise_reduction_entries"
+ camera:entryValues="@array/pref_camera2_noise_reduction_entryvalues"
+ camera:key="pref_camera2_noise_reduction_key"
+ camera:title="@string/pref_camera_noise_reduction_title"/>
+
+ <IconListPreference
+ camera:defaultValue="@string/pref_camera_video_flashmode_default"
+ camera:entries="@array/pref_camera2_video_flashmode_entries"
+ camera:entryValues="@array/pref_camera2_video_flashmode_entryvalues"
+ camera:icons="@array/video_flashmode_icons"
+ camera:key="pref_camera2_video_flashmode_key"
+ camera:labelList="@array/pref_camera2_video_flashmode_labels"
+ camera:largeIcons="@array/video_flashmode_largeicons"
+ camera:singleIcon="@drawable/ic_settings_flash"
+ camera:title="@string/pref_camera_flashmode_title"/>
+
+ <ListPreference
+ camera:defaultValue="@string/pref_camera_video_rotation_default"
+ camera:entries="@array/pref_camera2_video_rotation_entries"
+ camera:entryValues="@array/pref_camera2_video_rotation_entryvalues"
+ camera:key="pref_camera2_video_rotation_key"
+ camera:title="@string/pref_camera_video_rotation_title"/>
+
+ <IconListPreference
+ camera:defaultValue="@string/pref_video_time_lapse_frame_interval_default"
+ camera:entries="@array/pref_camera2_video_time_lapse_frame_interval_entries"
+ camera:entryValues="@array/pref_camera2_video_time_lapse_frame_interval_entryvalues"
+ camera:key="pref_camera2_video_time_lapse_frame_interval_key"
+ camera:title="@string/pref_video_time_lapse_frame_interval_title"/>
</PreferenceGroup>