Skip to content

Commit

Permalink
add shims and cleanup
Browse files Browse the repository at this point in the history
Change-Id: Id4915f0c32c67fd5d65b8f0392d3a6a492711ef0
  • Loading branch information
Stricted committed Dec 31, 2017
1 parent edfb8be commit 711ec0a
Show file tree
Hide file tree
Showing 18 changed files with 282 additions and 120 deletions.
2 changes: 1 addition & 1 deletion board/audio.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TARGET_AUDIOHAL_VARIANT := samsung
#TARGET_AUDIOHAL_VARIANT := samsung
92 changes: 51 additions & 41 deletions configs/media/media_profiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (low|high|qvga|720p|1080p|timelapselow|timelapsehigh|timelapseqvga|timelapse720p|timelapse1080p) #REQUIRED>
<!ATTLIST EncoderProfile quality (low|high|qcif|480p|720p|1080p|timelapselow|timelapsehigh|timelapseqcif|timelapse480p|timelapse720p|timelapse1080p) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
Expand Down Expand Up @@ -71,6 +71,16 @@
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT VideoEditorCap EMPTY>
<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
Expand All @@ -83,9 +93,9 @@

<EncoderProfile quality="low" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<Audio codec="aac"
Expand All @@ -107,11 +117,11 @@
channels="2" />
</EncoderProfile>

<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
<EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<Audio codec="aac"
Expand All @@ -122,8 +132,8 @@

<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3078000"
width="640"
bitRate="3449000"
width="720"
height="480"
frameRate="30" />

Expand Down Expand Up @@ -161,9 +171,9 @@

<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<!--
Expand Down Expand Up @@ -193,11 +203,11 @@
channels="2" />
</EncoderProfile>

<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<!--
Expand All @@ -212,8 +222,8 @@

<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3078000"
width="640"
bitRate="3449000"
width="720"
height="480"
frameRate="30" />

Expand Down Expand Up @@ -273,9 +283,9 @@

<EncoderProfile quality="low" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<Audio codec="aac"
Expand All @@ -297,11 +307,11 @@
channels="2" />
</EncoderProfile>

<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
<EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<Audio codec="aac"
Expand All @@ -312,8 +322,8 @@

<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3078000"
width="640"
bitRate="3449000"
width="720"
height="480"
frameRate="30" />

Expand Down Expand Up @@ -351,9 +361,9 @@

<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<!--
Expand Down Expand Up @@ -383,14 +393,14 @@
channels="2" />
</EncoderProfile>

<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="767000"
width="320"
height="240"
bitRate="384000"
width="176"
height="144"
frameRate="30" />

<!--
<!--
The Audio part of the profile will not be used since time lapse mode
does not capture audio
-->
Expand All @@ -402,8 +412,8 @@

<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3078000"
width="640"
bitRate="3449000"
width="720"
height="480"
frameRate="30" />

Expand Down Expand Up @@ -472,9 +482,9 @@
codec cap
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="20000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minBitRate="64000" maxBitRate="50000000"
minFrameWidth="176" maxFrameWidth="3840"
minFrameHeight="144" maxFrameHeight="2160"
minFrameRate="1" maxFrameRate="30" />

<VideoEncoderCap name="h263" enabled="true"
Expand Down
15 changes: 1 addition & 14 deletions configs/wifi/p2p_supplicant_overlay.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
disable_scan_offload=1
p2p_listen_reg_class=81
p2p_listen_channel=1
p2p_oper_reg_class=124
p2p_oper_channel=149
manufacturer=SAMSUNG_ELECTRONICS
model_name=SAMSUNG_MOBILE
model_number=2014
serial_number=19691101
update_config=1
p2p_add_cli_chan=1
ip_addr_go=192.168.49.1
ip_addr_mask=255.255.255.0
ip_addr_start=192.168.49.200
ip_addr_end=192.168.49.254
p2p_search_delay=100
3 changes: 2 additions & 1 deletion configs/wifi/wpa_supplicant_overlay.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
disable_scan_offload=1
p2p_disabled=1
update_config=1
tdls_external_control=1
28 changes: 28 additions & 0 deletions libshims/libexynoscamera/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
libexynoscamera.cpp

LOCAL_SHARED_LIBRARIES := liblog

LOCAL_MODULE := libexynoscamera_shim
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_PROPRIETARY_MODULE := true

include $(BUILD_SHARED_LIBRARY)
53 changes: 53 additions & 0 deletions libshims/libexynoscamera/libexynoscamera.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (C) 2017 TeamNexus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "libexynoscamera.h"

namespace android
{

const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21";
const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize";
const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow";
const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green";
const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue";
const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold";
const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm";
const char CameraParameters::EFFECT_WASHED[] = "washed";
const char CameraParameters::ISO_AUTO[] = "auto";
const char CameraParameters::ISO_NIGHT[] = "night";
const char CameraParameters::ISO_SPORTS[] = "sports";
const char CameraParameters::ISO_6400[] = "6400";
const char CameraParameters::ISO_3200[] = "3200";
const char CameraParameters::ISO_1600[] = "1600";
const char CameraParameters::ISO_800[] = "800";
const char CameraParameters::ISO_400[] = "400";
const char CameraParameters::ISO_200[] = "200";
const char CameraParameters::ISO_100[] = "100";
const char CameraParameters::ISO_80[] = "80";
const char CameraParameters::ISO_50[] = "50";
const char CameraParameters::KEY_SUPPORTED_METERING_MODE[] = "metering-values";
const char CameraParameters::METERING_CENTER[] = "center";
const char CameraParameters::METERING_MATRIX[] = "matrix";
const char CameraParameters::METERING_SPOT[] = "spot";
const char CameraParameters::METERING_OFF[] = "off";
const char CameraParameters::KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control";
const char CameraParameters::KEY_SUPPORTED_PHASE_AF[] = "phase-af-values";
const char CameraParameters::KEY_PHASE_AF[] = "phase-af";
const char CameraParameters::KEY_SUPPORTED_RT_HDR[] = "rt-hdr-values";
const char CameraParameters::KEY_RT_HDR[] = "rt-hdr";

};
55 changes: 55 additions & 0 deletions libshims/libexynoscamera/libexynoscamera.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2017 TeamNexus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

namespace android
{

class CameraParameters
{
public:
static const char PIXEL_FORMAT_YUV420SP_NV21[];
static const char EFFECT_CARTOONIZE[];
static const char EFFECT_POINT_RED_YELLOW[];
static const char EFFECT_POINT_GREEN[];
static const char EFFECT_POINT_BLUE[];
static const char EFFECT_VINTAGE_COLD[];
static const char EFFECT_VINTAGE_WARM[];
static const char EFFECT_WASHED[];
static const char ISO_AUTO[];
static const char ISO_NIGHT[];
static const char ISO_SPORTS[];
static const char ISO_6400[];
static const char ISO_3200[];
static const char ISO_1600[];
static const char ISO_800[];
static const char ISO_400[];
static const char ISO_200[];
static const char ISO_100[];
static const char ISO_80[];
static const char ISO_50[];
static const char KEY_SUPPORTED_METERING_MODE[];
static const char METERING_CENTER[];
static const char METERING_MATRIX[];
static const char METERING_SPOT[];
static const char METERING_OFF[];
static const char KEY_DYNAMIC_RANGE_CONTROL[];
static const char KEY_SUPPORTED_PHASE_AF[];
static const char KEY_PHASE_AF[];
static const char KEY_SUPPORTED_RT_HDR[];
static const char KEY_RT_HDR[];
};

};
8 changes: 8 additions & 0 deletions libshims/libshim_camera/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := libshim_camera.cpp
LOCAL_SHARED_LIBRARIES := libui
LOCAL_MODULE := libshim_camera
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
Loading

0 comments on commit 711ec0a

Please sign in to comment.