aboutsummaryrefslogtreecommitdiff
path: root/jni
diff options
context:
space:
mode:
authorLive Channels Team <no-reply@google.com>2018-01-11 20:42:01 -0800
committerNick Chalko <nchalko@google.com>2018-01-16 11:04:29 -0800
commit4a5144ac8c51c4d89d1359e13e37fcd7f928ed9a (patch)
tree9137148fbca9b8cb1b35c4553efc921e5027ffda /jni
parente0fd52bbc36ec38397cdac345e42dd23ab093899 (diff)
downloadTV-4a5144ac8c51c4d89d1359e13e37fcd7f928ed9a.tar.gz
Project import generated by Copybara.
PiperOrigin-RevId: 181700159 Change-Id: I7bae213f26b690c0d76189c08abd85d7f7b304a3
Diffstat (limited to 'jni')
-rw-r--r--jni/DvbManager.cpp10
-rw-r--r--jni/DvbManager.h1
-rwxr-xr-xjni/gen_jni.sh15
-rw-r--r--jni/tunertvinput_jni.cpp2
4 files changed, 21 insertions, 7 deletions
diff --git a/jni/DvbManager.cpp b/jni/DvbManager.cpp
index b344f803..e55d07c5 100644
--- a/jni/DvbManager.cpp
+++ b/jni/DvbManager.cpp
@@ -39,14 +39,12 @@ static double currentTimeMillis() {
DvbManager::DvbManager(JNIEnv *env, jobject)
: mFeFd(-1),
- mDemuxFd(-1),
mDvrFd(-1),
mPatFilterFd(-1),
mDvbApiVersion(DVB_API_VERSION_UNDEFINED),
mDeliverySystemType(-1),
mFeHasLock(false),
mHasPendingTune(false) {
- (void) mDemuxFd; // suppress unused warning
jclass clazz = env->FindClass(
"com/android/tv/tuner/TunerHal");
mOpenDvbFrontEndMethodID = env->GetMethodID(
@@ -118,11 +116,13 @@ int DvbManager::tune(JNIEnv *env, jobject thiz,
if (mDvbApiVersion == DVB_API_VERSION5) {
struct dtv_property deliverySystemProperty = {
- .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_ATSC
+ .cmd = DTV_DELIVERY_SYSTEM
};
+ deliverySystemProperty.u.data = SYS_ATSC;
struct dtv_property frequencyProperty = {
- .cmd = DTV_FREQUENCY, .u.data = static_cast<__u32>(frequency)
+ .cmd = DTV_FREQUENCY
};
+ frequencyProperty.u.data = static_cast<__u32>(frequency);
struct dtv_property modulationProperty = { .cmd = DTV_MODULATION };
if (strncmp(modulationStr, "QAM", 3) == 0) {
modulationProperty.u.data = QAM_AUTO;
@@ -503,4 +503,4 @@ int DvbManager::getDeliverySystemType(JNIEnv *env, jobject thiz) {
}
}
return mDeliverySystemType;
-}
+} \ No newline at end of file
diff --git a/jni/DvbManager.h b/jni/DvbManager.h
index 2252332c..6289d645 100644
--- a/jni/DvbManager.h
+++ b/jni/DvbManager.h
@@ -61,7 +61,6 @@ class DvbManager {
int mFeFd;
- int mDemuxFd;
int mDvrFd;
int mPatFilterFd;
int mDvbApiVersion;
diff --git a/jni/gen_jni.sh b/jni/gen_jni.sh
index aa52b248..2c246189 100755
--- a/jni/gen_jni.sh
+++ b/jni/gen_jni.sh
@@ -1,3 +1,18 @@
#!/bin/bash
+#
+# Copyright (C) 2017 The Android Open Source 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.
+
javah -jni -classpath ../../bin/classes:../../../../../../prebuilts/sdk/current/android.jar -o tunertvinput_jni.h com.android.tv.tuner.TunerHal
diff --git a/jni/tunertvinput_jni.cpp b/jni/tunertvinput_jni.cpp
index 9ad15141..40091779 100644
--- a/jni/tunertvinput_jni.cpp
+++ b/jni/tunertvinput_jni.cpp
@@ -172,4 +172,4 @@ Java_com_android_tv_tuner_TunerHal_nativeGetDeliverySystemType
sDvbManagers.insert(std::pair<jlong, DvbManager *>(deviceId, dvbManager));
return dvbManager->getDeliverySystemType(env, thiz);
}
-}
+} \ No newline at end of file