Ejemplo n.º 1
0
 public void scanStop() {
   mScan.stop();
 }
Ejemplo n.º 2
0
  public void scanStart(int ri_ScanMode, DtvTunerInfo fre[]) {
    int m_FreqCnt = 0;

    Log.i(TAG, "scanStart(" + ri_ScanMode + ")");

    if (fre != null) {
      m_FreqCnt = fre.length;
    }

    if (m_FreqCnt != 0) {
      if (this.getDemodType() == ConstDemodType.DVB_C) {

        DVBCCarrier[] FreqArr = null;
        FreqArr = new DVBCCarrier[m_FreqCnt];
        int iLoop = 0;
        for (iLoop = 0; iLoop < m_FreqCnt; iLoop++) {
          FreqArr[iLoop] = new DVBCCarrier(5, 6875);
          FreqArr[iLoop].miDemodType = this.getDemodType();
          FreqArr[iLoop].miFrequencyK = fre[iLoop].getFrequency();
          FreqArr[iLoop].miQamMode = fre[iLoop].getQamMode();
          FreqArr[iLoop].miSymbolRateK = fre[iLoop].getSymbolRate();
          String str =
              String.format(
                  "LL FreqArr[%d].miFrequencyK = %d,FreqArr[%d].miSymbolRateK = %d,FreqArr[%d].miQamMode = %d",
                  iLoop,
                  FreqArr[iLoop].miFrequencyK,
                  iLoop,
                  FreqArr[iLoop].miSymbolRateK,
                  iLoop,
                  FreqArr[iLoop].miQamMode);
        }

        mScan.setParam(ri_ScanMode, FreqArr);
        mScan.start();

      } else if (this.getDemodType() == ConstDemodType.DMB_TH) {
        DMBTHCarrier[] FreqArr = null;
        FreqArr = new DMBTHCarrier[m_FreqCnt];
        for (int iLoop = 0; iLoop < m_FreqCnt; iLoop++) {
          FreqArr[iLoop] = new DMBTHCarrier(0, 0, 0, 0, 0, 0);
          FreqArr[iLoop].miDemodType = this.getDemodType();
          FreqArr[iLoop].miCarrierMode = fre[iLoop].getMi_CarrierMode();
          FreqArr[iLoop].miDTMBTHQamMode = fre[iLoop].getQamMode();
          FreqArr[iLoop].miFrameHeader = fre[iLoop].getMi_FrameHeader();
          FreqArr[iLoop].miFrequencyK = fre[iLoop].getMi_FreqKHz();
          FreqArr[iLoop].miInterleaverMode = fre[iLoop].getMi_InterleaverMod();
          FreqArr[iLoop].miNCOFrequencyKhz = fre[iLoop].getMi_NCOFreqKHz();
          FreqArr[iLoop].miLDPCRate = fre[iLoop].getMi_LDPCRate();
          String str =
              String.format(
                  "LL FreqArr[%d].miCarrierMode = %d, "
                      + "FreqArr[%d].miDTMBTHQamMode = %d, "
                      + "FreqArr[%d].miFrameHeader = %d "
                      + "FreqArr[%d].miFrequencyK = %d,"
                      + "FreqArr[%d].miInterleaverMode = %d, "
                      + "FreqArr[%d].miNCOFrequencyKhz = %d "
                      + "FreqArr[iLoop].miLDPCRate = %d",
                  iLoop,
                  FreqArr[iLoop].miCarrierMode,
                  iLoop,
                  FreqArr[iLoop].miDTMBTHQamMode,
                  iLoop,
                  FreqArr[iLoop].miFrameHeader,
                  iLoop,
                  FreqArr[iLoop].miFrequencyK,
                  iLoop,
                  FreqArr[iLoop].miInterleaverMode,
                  iLoop,
                  FreqArr[iLoop].miNCOFrequencyKhz,
                  iLoop,
                  FreqArr[iLoop].miLDPCRate);
          Log.i(TAG, str);
        }

        mScan.setParam(ri_ScanMode, FreqArr);
        mScan.start();
      }
    }
  }