当前位置: 首页>>代码示例>>C++>>正文


C++ CCdInfo::SetDiscLabel方法代码示例

本文整理汇总了C++中CCdInfo::SetDiscLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ CCdInfo::SetDiscLabel方法的具体用法?C++ CCdInfo::SetDiscLabel怎么用?C++ CCdInfo::SetDiscLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCdInfo的用法示例。


在下文中一共展示了CCdInfo::SetDiscLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetCdInfo


//.........这里部分代码省略.........
    msf_t msf;
    ::cdio_get_track_msf(cdio, 1, &msf);
    m_nStartTrack = ::cdio_msf_to_lsn(&msf);

    /* CD-I/Ready says start_track <= 30*75 then CDDA */
    if (m_nStartTrack > 100 /* 100 is just a guess */)
    {
      m_nFs = GuessFilesystem(0, 1);
      if ((m_nFs & FS_MASK) != FS_UNKNOWN)
        m_nFs |= HIDDEN_TRACK;
      else
      {
        m_nFs &= ~FS_MASK; /* del filesystem info */
        CLog::Log(LOGDEBUG, "Oops: %i unused sectors at start, but hidden track check failed.", m_nStartTrack);
      }
    }
    PrintAnalysis(m_nFs, m_nNumAudio);
  }
  else
  {
    /* We have data track(s) */
    for (j = 2, i = m_nFirstData; i <= m_nNumTracks; i++)
    {
      msf_t msf;
      track_format_t track_format = ::cdio_get_track_format(cdio, i);

      ::cdio_get_track_msf(cdio, i, &msf);

      switch ( track_format )
      {
      case TRACK_FORMAT_AUDIO:
        {
          trackinfo ti;
          ti.nfsInfo = FS_NO_DATA;
          m_nFs = FS_NO_DATA;
          ti.ms_offset = 0;
          ti.isofs_size = 0;
          ti.nJolietLevel = 0;
          ti.nFrames = ::cdio_get_track_lba(cdio, i);
          ti.nMins = 0;
          ti.nSecs = 0;
          info->SetTrackInformation( i + 1, ti );
        }
      case TRACK_FORMAT_ERROR:
        break;
      case TRACK_FORMAT_CDI:
      case TRACK_FORMAT_XA:
      case TRACK_FORMAT_DATA:
      case TRACK_FORMAT_PSX:
        break;
      }

      m_nStartTrack = (i == 1) ? 0 : ::cdio_msf_to_lsn(&msf);

      /* Save the start of the data area */
      if (i == m_nFirstData)
        m_nDataStart = m_nStartTrack;

      /* Skip tracks which belong to the current walked session */
      if (m_nStartTrack < m_nDataStart + m_nIsofsSize)
        continue;

      m_nFs = GuessFilesystem(m_nStartTrack, i);
      trackinfo ti;
      ti.nfsInfo = m_nFs;
      ti.ms_offset = m_nMsOffset;
      ti.isofs_size = m_nIsofsSize;
      ti.nJolietLevel = m_nJolietLevel;
      ti.nFrames = ::cdio_get_track_lba(cdio, i);
      ti.nMins = 0;
      ti.nSecs = 0;
      info->SetDiscLabel(m_strDiscLabel);


      if (i > 1)
      {
        /* Track is beyond last session -> new session found */
        m_nMsOffset = m_nStartTrack;

        CLog::Log(LOGINFO, "Session #%d starts at track %2i, LSN: %6i,"
                  " ISO 9660 blocks: %6i",
                  j++, i, m_nStartTrack, m_nIsofsSize);

        CLog::Log(LOGINFO, "ISO 9660: %i blocks, label %s",
                  m_nIsofsSize, m_strDiscLabel.c_str());
        m_nFs |= MULTISESSION;
        ti.nfsInfo = m_nFs;
      }
      else
      {
        PrintAnalysis(m_nFs, m_nNumAudio);
      }

      info->SetTrackInformation( i, ti );

    }
  }
  ::cdio_destroy( cdio );
  return info;
}
开发者ID:69thelememt,项目名称:xbmc,代码行数:101,代码来源:cdioSupport.cpp

示例2: GetCdInfo


//.........这里部分代码省略.........

      switch ( track_format )
      {
      case TRACK_FORMAT_AUDIO:
        trackinfo ti;
        ti.nfsInfo = FS_NO_DATA;
        m_nFs = FS_NO_DATA;
        ti.ms_offset = 0;
        ti.isofs_size = 0;
        ti.nJolietLevel = 0;
        ti.nFrames = ::cdio_get_track_lba(cdio, i);
        cdtext_init(&ti.cdtext);
        info->SetTrackInformation( i + 1, ti );
      case TRACK_FORMAT_ERROR:
        break;
      case TRACK_FORMAT_CDI:
      case TRACK_FORMAT_XA:
      case TRACK_FORMAT_DATA:
      case TRACK_FORMAT_PSX:
        break;
      }

      m_nStartTrack = (i == 1) ? 0 : ::cdio_msf_to_lsn(&msf);

      /* save the start of the data area */
      if (i == m_nFirstData)
        m_nDataStart = m_nStartTrack;

      /* skip tracks which belong to the current walked session */
      if (m_nStartTrack < m_nDataStart + m_nIsofsSize)
        continue;

      m_nFs = GuessFilesystem(m_nStartTrack, i);
      trackinfo ti;
      cdtext_init(&ti.cdtext);
      ti.nfsInfo = m_nFs;
      // valid UDF version for xbox
      if ((m_nFs & FS_MASK) == FS_UDF)
      {
        // Is UDF 1.02
        if (m_nUDFVerMajor > 0x1)
        {
          ti.nfsInfo = FS_UNKNOWN;
          m_strDiscLabel.Empty();
        }
        else if (m_nUDFVerMinor > 0x2)
        {
          ti.nfsInfo = FS_UNKNOWN;
          m_strDiscLabel.Empty();
        }
      }

      if ((m_nFs & FS_MASK) == FS_ISO_UDF)
      {
        // fallback to iso9660 if not udf 1.02
        if (m_nUDFVerMajor > 0x1)
          ti.nfsInfo = FS_ISO_9660;
        else if (m_nUDFVerMinor > 0x2)
          ti.nfsInfo = FS_ISO_9660;
      }

      ti.ms_offset = m_nMsOffset;
      ti.isofs_size = m_nIsofsSize;
      ti.nJolietLevel = m_nJolietLevel;
      ti.nFrames = ::cdio_get_track_lba(cdio, i);
      info->SetDiscLabel(m_strDiscLabel);


      if (i > 1)
      {
        /* track is beyond last session -> new session found */
        m_nMsOffset = m_nStartTrack;

        CLog::Log(LOGINFO, "Session #%d starts at track %2i, LSN: %6i,"
                  " ISO 9660 blocks: %6i",
                  j++, i, m_nStartTrack, m_nIsofsSize);

        CLog::Log(LOGINFO, "ISO 9660: %i blocks, label '%.32s'\n",
                  m_nIsofsSize, buffer[0] + 40);
        m_nFs |= MULTISESSION;
        ti.nfsInfo = m_nFs;
      }
      else
      {
        PrintAnalysis(m_nFs, m_nNumAudio);
      }

      info->SetTrackInformation( i, ti );

      // xbox does not support multisession cd's
      if (!(((m_nFs & FS_MASK) == FS_ISO_9660 ||
             (m_nFs & FS_MASK) == FS_ISO_HFS ||
             /* (fs & FS_MASK) == FS_ISO_9660_INTERACTIVE) && (fs & XA))) */
             (m_nFs & FS_MASK) == FS_ISO_9660_INTERACTIVE)))
        break; /* no method for non-iso9660 multisessions */
    }
  }
  ::cdio_destroy( cdio );
  return info;
}
开发者ID:derobert,项目名称:debianlink-xbmc,代码行数:101,代码来源:cdioSupport.cpp


注:本文中的CCdInfo::SetDiscLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。