Loading media/java/android/media/tv/tuner/Tuner.java +57 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,10 @@ public final class Tuner implements AutoCloseable { private native int nativeSetLnb(int lnbId); private native int nativeSetLna(boolean enable); private native FrontendStatus[] nativeGetFrontendStatus(int[] statusTypes); private native int nativeGetAvSyncHwId(Filter filter); private native long nativeGetAvSyncTime(int avSyncId); private native int nativeConnectCiCam(int ciCamId); private native int nativeDisconnectCiCam(); private native Filter nativeOpenFilter(int type, int subType, int bufferSize); private native List<Integer> nativeGetLnbIds(); Loading Loading @@ -351,6 +355,59 @@ public final class Tuner implements AutoCloseable { return nativeGetFrontendStatus(statusTypes); } /** * Gets hardware sync ID for audio and video. * * @param filter the filter instance for the hardware sync ID. * @return the id of hardware A/V sync. * @hide */ public int getAvSyncHwId(Filter filter) { return nativeGetAvSyncHwId(filter); } /** * Gets the current timestamp for A/V sync * * The timestamp is maintained by hardware. The timestamp based on 90KHz, and it's format is the * same as PTS (Presentation Time Stamp). * * @param avSyncHwId the hardware id of A/V sync. * @return the current timestamp of hardware A/V sync. * @hide */ public long getAvSyncTime(int avSyncHwId) { return nativeGetAvSyncTime(avSyncHwId); } /** * Connects Conditional Access Modules (CAM) through Common Interface (CI) * * The demux uses the output from the frontend as the input by default, and must change to use * the output from CI-CAM as the input after this call. * * @param ciCamId specify CI-CAM Id to connect. * @return result status of the operation. * @hide */ @Result public int connectCiCam(int ciCamId) { return nativeConnectCiCam(ciCamId); } /** * Disconnects Conditional Access Modules (CAM) * * The demux will use the output from the frontend as the input after this call. * * @return result status of the operation. * @hide */ @Result public int disconnectCiCam() { return nativeDisconnectCiCam(); } private List<Integer> getFrontendIds() { mFrontendIds = nativeGetFrontendIds(); return mFrontendIds; Loading media/jni/android_media_tv_Tuner.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -636,6 +636,22 @@ static jobjectArray android_media_tv_Tuner_get_frontend_status(JNIEnv, jobject, return NULL; } static int android_media_tv_Tuner_gat_av_sync_hw_id(JNIEnv*, jobject, jobject) { return 0; } static jlong android_media_tv_Tuner_gat_av_sync_time(JNIEnv*, jobject, jint) { return 0; } static int android_media_tv_Tuner_connect_cicam(JNIEnv*, jobject, jint) { return 0; } static int android_media_tv_Tuner_disconnect_cicam(JNIEnv*, jobject) { return 0; } static jobject android_media_tv_Tuner_get_lnb_ids(JNIEnv *env, jobject thiz) { sp<JTuner> tuner = getTuner(env, thiz); return tuner->getLnbIds(); Loading Loading @@ -944,6 +960,11 @@ static const JNINativeMethod gTunerMethods[] = { { "nativeSetLna", "(Z)I", (void *)android_media_tv_Tuner_set_lna }, { "nativeGetFrontendStatus", "([I)[Landroid/media/tv/tuner/FrontendStatus;", (void *)android_media_tv_Tuner_get_frontend_status }, { "nativeGetAvSyncHwId", "(Landroid/media/tv/tuner/Tuner$Filter;)I", (void *)android_media_tv_Tuner_gat_av_sync_hw_id }, { "nativeGetAvSyncTime", "(I)J", (void *)android_media_tv_Tuner_gat_av_sync_time }, { "nativeConnectCiCam", "(I)I", (void *)android_media_tv_Tuner_connect_cicam }, { "nativeDisconnectCiCam", "()I", (void *)android_media_tv_Tuner_disconnect_cicam }, { "nativeOpenFilter", "(III)Landroid/media/tv/tuner/Tuner$Filter;", (void *)android_media_tv_Tuner_open_filter }, { "nativeGetLnbIds", "()Ljava/util/List;", Loading Loading
media/java/android/media/tv/tuner/Tuner.java +57 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,10 @@ public final class Tuner implements AutoCloseable { private native int nativeSetLnb(int lnbId); private native int nativeSetLna(boolean enable); private native FrontendStatus[] nativeGetFrontendStatus(int[] statusTypes); private native int nativeGetAvSyncHwId(Filter filter); private native long nativeGetAvSyncTime(int avSyncId); private native int nativeConnectCiCam(int ciCamId); private native int nativeDisconnectCiCam(); private native Filter nativeOpenFilter(int type, int subType, int bufferSize); private native List<Integer> nativeGetLnbIds(); Loading Loading @@ -351,6 +355,59 @@ public final class Tuner implements AutoCloseable { return nativeGetFrontendStatus(statusTypes); } /** * Gets hardware sync ID for audio and video. * * @param filter the filter instance for the hardware sync ID. * @return the id of hardware A/V sync. * @hide */ public int getAvSyncHwId(Filter filter) { return nativeGetAvSyncHwId(filter); } /** * Gets the current timestamp for A/V sync * * The timestamp is maintained by hardware. The timestamp based on 90KHz, and it's format is the * same as PTS (Presentation Time Stamp). * * @param avSyncHwId the hardware id of A/V sync. * @return the current timestamp of hardware A/V sync. * @hide */ public long getAvSyncTime(int avSyncHwId) { return nativeGetAvSyncTime(avSyncHwId); } /** * Connects Conditional Access Modules (CAM) through Common Interface (CI) * * The demux uses the output from the frontend as the input by default, and must change to use * the output from CI-CAM as the input after this call. * * @param ciCamId specify CI-CAM Id to connect. * @return result status of the operation. * @hide */ @Result public int connectCiCam(int ciCamId) { return nativeConnectCiCam(ciCamId); } /** * Disconnects Conditional Access Modules (CAM) * * The demux will use the output from the frontend as the input after this call. * * @return result status of the operation. * @hide */ @Result public int disconnectCiCam() { return nativeDisconnectCiCam(); } private List<Integer> getFrontendIds() { mFrontendIds = nativeGetFrontendIds(); return mFrontendIds; Loading
media/jni/android_media_tv_Tuner.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -636,6 +636,22 @@ static jobjectArray android_media_tv_Tuner_get_frontend_status(JNIEnv, jobject, return NULL; } static int android_media_tv_Tuner_gat_av_sync_hw_id(JNIEnv*, jobject, jobject) { return 0; } static jlong android_media_tv_Tuner_gat_av_sync_time(JNIEnv*, jobject, jint) { return 0; } static int android_media_tv_Tuner_connect_cicam(JNIEnv*, jobject, jint) { return 0; } static int android_media_tv_Tuner_disconnect_cicam(JNIEnv*, jobject) { return 0; } static jobject android_media_tv_Tuner_get_lnb_ids(JNIEnv *env, jobject thiz) { sp<JTuner> tuner = getTuner(env, thiz); return tuner->getLnbIds(); Loading Loading @@ -944,6 +960,11 @@ static const JNINativeMethod gTunerMethods[] = { { "nativeSetLna", "(Z)I", (void *)android_media_tv_Tuner_set_lna }, { "nativeGetFrontendStatus", "([I)[Landroid/media/tv/tuner/FrontendStatus;", (void *)android_media_tv_Tuner_get_frontend_status }, { "nativeGetAvSyncHwId", "(Landroid/media/tv/tuner/Tuner$Filter;)I", (void *)android_media_tv_Tuner_gat_av_sync_hw_id }, { "nativeGetAvSyncTime", "(I)J", (void *)android_media_tv_Tuner_gat_av_sync_time }, { "nativeConnectCiCam", "(I)I", (void *)android_media_tv_Tuner_connect_cicam }, { "nativeDisconnectCiCam", "()I", (void *)android_media_tv_Tuner_disconnect_cicam }, { "nativeOpenFilter", "(III)Landroid/media/tv/tuner/Tuner$Filter;", (void *)android_media_tv_Tuner_open_filter }, { "nativeGetLnbIds", "()Ljava/util/List;", Loading