aboutsummaryrefslogtreecommitdiff
path: root/jni
diff options
context:
space:
mode:
Diffstat (limited to 'jni')
-rw-r--r--jni/Android.mk21
-rw-r--r--jni/DvbManager.cpp233
-rw-r--r--jni/DvbManager.h22
-rw-r--r--jni/minijail/Android.mk28
-rw-r--r--jni/minijail/minijail.cpp65
-rw-r--r--jni/minijail/minijail.h44
-rw-r--r--jni/tunertvinput_jni.cpp18
-rw-r--r--jni/tunertvinput_jni.h22
8 files changed, 415 insertions, 38 deletions
diff --git a/jni/Android.mk b/jni/Android.mk
index 684830c9..39923a15 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -1,12 +1,29 @@
+#
+# 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.
+#
+
LOCAL_PATH := $(call my-dir)
# --------------------------------------------------------------
include $(CLEAR_VARS)
-LOCAL_MODULE := libtunertvinput_jni
+LOCAL_MODULE := libtunertvinput_jni
LOCAL_SRC_FILES += tunertvinput_jni.cpp DvbManager.cpp
-LOCAL_SDK_VERSION := 21
+LOCAL_SDK_VERSION := 23
LOCAL_NDK_STL_VARIANT := stlport_static
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/jni/DvbManager.cpp b/jni/DvbManager.cpp
index aa4ed530..941a1fa7 100644
--- a/jni/DvbManager.cpp
+++ b/jni/DvbManager.cpp
@@ -42,6 +42,8 @@ DvbManager::DvbManager(JNIEnv *env, jobject)
mDemuxFd(-1),
mDvrFd(-1),
mPatFilterFd(-1),
+ mDvbApiVersion(DVB_API_VERSION_UNDEFINED),
+ mDeliverySystemType(-1),
mFeHasLock(false),
mHasPendingTune(false) {
jclass clazz = env->FindClass(
@@ -59,16 +61,26 @@ DvbManager::~DvbManager() {
}
bool DvbManager::isFeLocked() {
- struct pollfd pollFd;
- pollFd.fd = mFeFd;
- pollFd.events = POLLIN;
- pollFd.revents = 0;
- int poll_result = poll(&pollFd, NUM_POLLFDS, FE_POLL_TIMEOUT_MS);
- if (poll_result > 0 && (pollFd.revents & POLLIN)) {
- struct dvb_frontend_event kevent;
- memset(&kevent, 0, sizeof(kevent));
- if (ioctl(mFeFd, FE_GET_EVENT, &kevent) == 0) {
- return (kevent.status & FE_HAS_LOCK);
+ if (mDvbApiVersion == DVB_API_VERSION5) {
+ fe_status_t status;
+ if (ioctl(mFeFd, FE_READ_STATUS, &status) < 0) {
+ return false;
+ }
+ if (status & FE_HAS_LOCK) {
+ return true;
+ }
+ } else {
+ struct pollfd pollFd;
+ pollFd.fd = mFeFd;
+ pollFd.events = POLLIN;
+ pollFd.revents = 0;
+ int poll_result = poll(&pollFd, NUM_POLLFDS, FE_POLL_TIMEOUT_MS);
+ if (poll_result > 0 && (pollFd.revents & POLLIN)) {
+ struct dvb_frontend_event kevent;
+ memset(&kevent, 0, sizeof(kevent));
+ if (ioctl(mFeFd, FE_GET_EVENT, &kevent) == 0) {
+ return (kevent.status & FE_HAS_LOCK);
+ }
}
}
return false;
@@ -78,38 +90,111 @@ int DvbManager::tune(JNIEnv *env, jobject thiz,
const int frequency, const char *modulationStr, int timeout_ms) {
resetExceptFe();
- struct dvb_frontend_parameters feParams;
- memset(&feParams, 0, sizeof(struct dvb_frontend_parameters));
- feParams.frequency = frequency;
- if (strcmp(modulationStr, "8VSB") == 0) {
- feParams.u.vsb.modulation = VSB_8;
- } else if (strcmp(modulationStr, "QAM256") == 0) {
- feParams.u.vsb.modulation = QAM_256;
- } else {
- ALOGE("Unrecognized modulation mode : %s", modulationStr);
- return -1;
- }
-
- if (mHasPendingTune) {
- return -1;
- }
if (openDvbFe(env, thiz) != 0) {
return -1;
}
-
- feParams.inversion = INVERSION_AUTO;
- /* Check frontend capability */
- struct dvb_frontend_info feInfo;
- if (ioctl(mFeFd, FE_GET_INFO, &feInfo) != -1) {
- if (!(feInfo.caps & FE_CAN_INVERSION_AUTO)) {
- // FE can't do INVERSION_AUTO, trying INVERSION_OFF instead
- feParams.inversion = INVERSION_OFF;
+ if (mDvbApiVersion == DVB_API_VERSION_UNDEFINED) {
+ struct dtv_property testProps[1] = {
+ { .cmd = DTV_DELIVERY_SYSTEM }
+ };
+ struct dtv_properties feProp = {
+ .num = 1, .props = testProps
+ };
+ // On fugu, DVB_API_VERSION is 5 but it doesn't support FE_SET_PROPERTY. Checking the device
+ // support FE_GET_PROPERTY or not to determine the DVB API version is greater than 5 or not.
+ if (ioctl(mFeFd, FE_GET_PROPERTY, &feProp) == -1) {
+ ALOGD("FE_GET_PROPERTY failed, %s", strerror(errno));
+ mDvbApiVersion = DVB_API_VERSION3;
+ } else {
+ mDvbApiVersion = DVB_API_VERSION5;
}
}
- if (ioctl(mFeFd, FE_SET_FRONTEND, &feParams) != 0) {
- ALOGD("Can't set Frontend : %s", strerror(errno));
- return -1;
+ if (mDvbApiVersion == DVB_API_VERSION5) {
+ struct dtv_property deliverySystemProperty = {
+ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_ATSC
+ };
+ struct dtv_property frequencyProperty = {
+ .cmd = DTV_FREQUENCY, .u.data = frequency
+ };
+ struct dtv_property modulationProperty = { .cmd = DTV_MODULATION };
+ if (strncmp(modulationStr, "QAM", 3) == 0) {
+ modulationProperty.u.data = QAM_AUTO;
+ } else if (strcmp(modulationStr, "8VSB") == 0) {
+ modulationProperty.u.data = VSB_8;
+ } else {
+ ALOGE("Unrecognized modulation mode : %s", modulationStr);
+ return -1;
+ }
+ struct dtv_property tuneProperty = { .cmd = DTV_TUNE };
+
+ struct dtv_property props[] = {
+ deliverySystemProperty, frequencyProperty, modulationProperty, tuneProperty
+ };
+ struct dtv_properties dtvProperty = {
+ .num = 4, .props = props
+ };
+
+ if (mHasPendingTune) {
+ return -1;
+ }
+ if (ioctl(mFeFd, FE_SET_PROPERTY, &dtvProperty) != 0) {
+ ALOGD("Can't set Frontend : %s", strerror(errno));
+ return -1;
+ }
+ } else {
+ struct dvb_frontend_parameters feParams;
+ memset(&feParams, 0, sizeof(struct dvb_frontend_parameters));
+ feParams.frequency = frequency;
+ feParams.inversion = INVERSION_AUTO;
+ /* Check frontend capability */
+ struct dvb_frontend_info feInfo;
+ if (ioctl(mFeFd, FE_GET_INFO, &feInfo) != -1) {
+ if (!(feInfo.caps & FE_CAN_INVERSION_AUTO)) {
+ // FE can't do INVERSION_AUTO, trying INVERSION_OFF instead
+ feParams.inversion = INVERSION_OFF;
+ }
+ }
+ switch (feInfo.type) {
+ case FE_ATSC:
+ if (strcmp(modulationStr, "8VSB") == 0) {
+ feParams.u.vsb.modulation = VSB_8;
+ } else if (strncmp(modulationStr, "QAM", 3) == 0) {
+ feParams.u.vsb.modulation = QAM_AUTO;
+ } else {
+ ALOGE("Unrecognized modulation mode : %s", modulationStr);
+ return -1;
+ }
+ break;
+ case FE_OFDM:
+ if (strcmp(modulationStr, "8VSB") == 0) {
+ feParams.u.ofdm.constellation = VSB_8;
+ } else if (strcmp(modulationStr, "QAM16") == 0) {
+ feParams.u.ofdm.constellation = QAM_16;
+ } else if (strcmp(modulationStr, "QAM64") == 0) {
+ feParams.u.ofdm.constellation = QAM_64;
+ } else if (strcmp(modulationStr, "QAM256") == 0) {
+ feParams.u.ofdm.constellation = QAM_256;
+ } else if (strcmp(modulationStr, "QPSK") == 0) {
+ feParams.u.ofdm.constellation = QPSK;
+ } else {
+ ALOGE("Unrecognized modulation mode : %s", modulationStr);
+ return -1;
+ }
+ break;
+ default:
+ ALOGE("Unsupported delivery system.");
+ return -1;
+ }
+
+ if (mHasPendingTune) {
+ return -1;
+ }
+
+ if (ioctl(mFeFd, FE_SET_FRONTEND, &feParams) != 0) {
+ ALOGD("Can't set Frontend : %s", strerror(errno));
+ return -1;
+ }
}
int lockSuccessCount = 0;
@@ -238,6 +323,10 @@ int DvbManager::startTsPidFilter(JNIEnv *env, jobject thiz, int pid, int filterT
return -1;
}
+ if (mDvbApiVersion == DVB_API_VERSION5) {
+ ioctl(demuxFd, DMX_START, 0);
+ }
+
if (pid != PAT_PID) {
mPidFilters.insert(std::pair<int, int>(pid, demuxFd));
} else {
@@ -337,3 +426,75 @@ int DvbManager::readTsStream(JNIEnv *env, jobject thiz,
void DvbManager::setHasPendingTune(bool hasPendingTune) {
mHasPendingTune = hasPendingTune;
}
+
+int DvbManager::getDeliverySystemType(JNIEnv *env, jobject thiz) {
+ if (mDeliverySystemType != -1) {
+ return mDeliverySystemType;
+ }
+ if (mFeFd == -1) {
+ if ((mFeFd = openDvbFeFromSystemApi(env, thiz)) < 0) {
+ ALOGD("Can't open FE file : %s", strerror(errno));
+ return DELIVERY_SYSTEM_UNDEFINED;
+ }
+ }
+ struct dtv_property testProps[1] = {
+ { .cmd = DTV_DELIVERY_SYSTEM }
+ };
+ struct dtv_properties feProp = {
+ .num = 1, .props = testProps
+ };
+ mDeliverySystemType = DELIVERY_SYSTEM_UNDEFINED;
+ if (ioctl(mFeFd, FE_GET_PROPERTY, &feProp) == -1) {
+ mDvbApiVersion = DVB_API_VERSION3;
+ if (openDvbFe(env, thiz) == 0) {
+ struct dvb_frontend_info info;
+ if (ioctl(mFeFd, FE_GET_INFO, &info) == 0) {
+ switch (info.type) {
+ case FE_QPSK:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBS;
+ break;
+ case FE_QAM:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBC;
+ break;
+ case FE_OFDM:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBT;
+ break;
+ case FE_ATSC:
+ mDeliverySystemType = DELIVERY_SYSTEM_ATSC;
+ break;
+ default:
+ mDeliverySystemType = DELIVERY_SYSTEM_UNDEFINED;
+ break;
+ }
+ }
+ }
+ } else {
+ mDvbApiVersion = DVB_API_VERSION5;
+ switch (feProp.props[0].u.data) {
+ case SYS_DVBT:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBT;
+ break;
+ case SYS_DVBT2:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBT2;
+ break;
+ case SYS_DVBS:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBS;
+ break;
+ case SYS_DVBS2:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBS2;
+ break;
+ case SYS_DVBC_ANNEX_A:
+ case SYS_DVBC_ANNEX_B:
+ case SYS_DVBC_ANNEX_C:
+ mDeliverySystemType = DELIVERY_SYSTEM_DVBC;
+ break;
+ case SYS_ATSC:
+ mDeliverySystemType = DELIVERY_SYSTEM_ATSC;
+ break;
+ default:
+ mDeliverySystemType = DELIVERY_SYSTEM_UNDEFINED;
+ break;
+ }
+ }
+ return mDeliverySystemType;
+} \ No newline at end of file
diff --git a/jni/DvbManager.h b/jni/DvbManager.h
index 7475bd41..2252332c 100644
--- a/jni/DvbManager.h
+++ b/jni/DvbManager.h
@@ -31,6 +31,9 @@ class DvbManager {
static const int DVB_TUNE_STOP_DELAY_MS = 100 * 1000;
static const int FE_POLL_TIMEOUT_MS = 100;
static const int PAT_PID = 0;
+ static const int DVB_API_VERSION_UNDEFINED = -1;
+ static const int DVB_API_VERSION3 = 3;
+ static const int DVB_API_VERSION5 = 5;
static const int FILTER_TYPE_OTHER =
com_android_tv_tuner_TunerHal_FILTER_TYPE_OTHER;
@@ -41,10 +44,28 @@ class DvbManager {
static const int FILTER_TYPE_PCR =
com_android_tv_tuner_TunerHal_FILTER_TYPE_PCR;
+ static const int DELIVERY_SYSTEM_UNDEFINED =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_UNDEFINED;
+ static const int DELIVERY_SYSTEM_ATSC =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_ATSC;
+ static const int DELIVERY_SYSTEM_DVBC =
+ com_android_tv_tuner_TunerHal_DDELIVERY_SYSTEM_DVBC;
+ static const int DELIVERY_SYSTEM_DVBS =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS;
+ static const int DELIVERY_SYSTEM_DVBS2 =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS2;
+ static const int DELIVERY_SYSTEM_DVBT =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT;
+ static const int DELIVERY_SYSTEM_DVBT2 =
+ com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT2;
+
+
int mFeFd;
int mDemuxFd;
int mDvrFd;
int mPatFilterFd;
+ int mDvbApiVersion;
+ int mDeliverySystemType;
bool mFeHasLock;
// Flag for pending tune request. Used for canceling the current tune operation.
bool volatile mHasPendingTune;
@@ -65,6 +86,7 @@ public:
int startTsPidFilter(JNIEnv *env, jobject thiz, int pid, int filterType);
void closeAllDvbPidFilter();
void setHasPendingTune(bool hasPendingTune);
+ int getDeliverySystemType(JNIEnv *env, jobject thiz);
private:
int openDvbFe(JNIEnv *env, jobject thiz);
diff --git a/jni/minijail/Android.mk b/jni/minijail/Android.mk
new file mode 100644
index 00000000..940237db
--- /dev/null
+++ b/jni/minijail/Android.mk
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+# --------------------------------------------------------------
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libminijail_jni
+LOCAL_SRC_FILES := minijail.cpp
+LOCAL_CXX_STL := none
+LOCAL_STATIC_LIBRARIES := libc++_static libminijail
+LOCAL_LDLIBS := -llog
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/minijail/minijail.cpp b/jni/minijail/minijail.cpp
new file mode 100644
index 00000000..9eebc49b
--- /dev/null
+++ b/jni/minijail/minijail.cpp
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+#include "minijail.h"
+#include <unistd.h>
+#include <sys/types.h>
+#include <signal.h>
+
+#include <libminijail.h>
+#include <scoped_minijail.h>
+#include <android/log.h>
+
+#ifndef LOG_TAG
+#define LOG_TAG "minijail"
+#endif
+
+#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR , LOG_TAG, __VA_ARGS__)
+
+
+/*
+ * Class: com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+ * Method: nativeSetupMinijail
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL
+Java_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_nativeSetupMinijail
+(JNIEnv *, jobject, jint policyFd) {
+ ScopedMinijail jail{minijail_new()};
+ if (!jail) {
+ ALOGE("Failed to create minijail");
+ }
+
+ minijail_no_new_privs(jail.get());
+ minijail_log_seccomp_filter_failures(jail.get());
+ minijail_use_seccomp_filter(jail.get());
+ minijail_set_seccomp_filter_tsync(jail.get());
+ // Transfer ownership of |policy_fd|.
+ minijail_parse_seccomp_filters_from_fd(jail.get(), policyFd);
+ minijail_enter(jail.get());
+ close(policyFd);
+}
+
+/*
+ * Class: com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+ * Method: nativeTestMinijail
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL
+Java_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_nativeTestMinijail
+(JNIEnv *, jobject) {
+ kill(getpid(), SIGUSR1);
+} \ No newline at end of file
diff --git a/jni/minijail/minijail.h b/jni/minijail/minijail.h
new file mode 100644
index 00000000..cdf272c7
--- /dev/null
+++ b/jni/minijail/minijail.h
@@ -0,0 +1,44 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService */
+
+#ifndef _Included_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+#define _Included_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_DEBUG
+#define com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_DEBUG 0L
+#undef com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_MINIJAIL_SETUP_WAIT_TIMEOUT_MS
+#define com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_MINIJAIL_SETUP_WAIT_TIMEOUT_MS 5000LL
+/*
+ * Class: com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+ * Method: nativeSetupMinijail
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_nativeSetupMinijail
+ (JNIEnv *, jobject, jint);
+
+/*
+ * Class: com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService
+ * Method: nativeTestMinijail
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_nativeTestMinijail
+ (JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+/* Header for class com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_FfmpegDecoder */
+
+#ifndef _Included_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_FfmpegDecoder
+#define _Included_com_android_tv_tuner_exoplayer_ffmpeg_FfmpegDecoderService_FfmpegDecoder
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif \ No newline at end of file
diff --git a/jni/tunertvinput_jni.cpp b/jni/tunertvinput_jni.cpp
index bcbc4c29..5b1a1615 100644
--- a/jni/tunertvinput_jni.cpp
+++ b/jni/tunertvinput_jni.cpp
@@ -155,3 +155,21 @@ Java_com_android_tv_tuner_TunerHal_nativeSetHasPendingTune
it->second->setHasPendingTune(hasPendingTune);
}
}
+
+/*
+ * Class: com_android_tv_tuner_TunerHal
+ * Method: nativeGetDeliverySystemType
+ * Signature: (J)I
+ */
+JNIEXPORT int JNICALL
+Java_com_android_tv_tuner_TunerHal_nativeGetDeliverySystemType
+(JNIEnv *env, jobject thiz, jlong deviceId) {
+ std::map<jlong, DvbManager *>::iterator it = sDvbManagers.find(deviceId);
+ if (it != sDvbManagers.end()) {
+ return it->second->getDeliverySystemType(env, thiz);
+ } else {
+ DvbManager *dvbManager = new DvbManager(env, thiz);
+ sDvbManagers.insert(std::pair<jlong, DvbManager *>(deviceId, dvbManager));
+ return dvbManager->getDeliverySystemType(env, thiz);
+ }
+} \ No newline at end of file
diff --git a/jni/tunertvinput_jni.h b/jni/tunertvinput_jni.h
index 4ade29e4..fcd64d50 100644
--- a/jni/tunertvinput_jni.h
+++ b/jni/tunertvinput_jni.h
@@ -25,6 +25,20 @@ extern "C" {
#define com_android_tv_tuner_TunerHal_DEFAULT_VSB_TUNE_TIMEOUT_MS 2000L
#undef com_android_tv_tuner_TunerHal_DEFAULT_QAM_TUNE_TIMEOUT_MS
#define com_android_tv_tuner_TunerHal_DEFAULT_QAM_TUNE_TIMEOUT_MS 4000L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_UNDEFINED
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_UNDEFINED 0L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_ATSC
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_ATSC 1L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBC
+#define com_android_tv_tuner_TunerHal_DDELIVERY_SYSTEM_DVBC 2L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS 3L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS2
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBS2 4L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT 5L
+#undef com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT2
+#define com_android_tv_tuner_TunerHal_DELIVERY_SYSTEM_DVBT2 6L
/*
* Class: com_android_tv_tuner_TunerHal
* Method: nativeFinalize
@@ -81,6 +95,14 @@ JNIEXPORT jint JNICALL Java_com_android_tv_tuner_TunerHal_nativeWriteInBuffer
JNIEXPORT void JNICALL Java_com_android_tv_tuner_TunerHal_nativeSetHasPendingTune
(JNIEnv *, jobject, jlong, jboolean);
+/*
+ * Class: com_android_tv_tuner_TunerHal
+ * Method: nativeGetDeliverySystemType
+ * Signature: (J)I
+ */
+JNIEXPORT int JNICALL Java_com_android_tv_tuner_TunerHal_nativeGetDeliverySystemType
+ (JNIEnv *, jobject, jlong);
+
#ifdef __cplusplus
}
#endif