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


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

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


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

示例1: GetCdInfo


//.........这里部分代码省略.........
      {
        xbmc_cdtext_t xcdt;
        GetCdTextInfo(xcdt, 0);
        info->SetDiscCDTextInformation( xcdt );
      }

      // Get this tracks info
      GetCdTextInfo(ti.cdtext, i);
    }
    else
    {
      m_nNumData++;
      if ( -1 == m_nFirstData)
        m_nFirstData = i;
    }
    ti.nfsInfo = 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, ti );
    /* skip to leadout? */
    if (i == m_nNumTracks)
      i = CDIO_CDROM_LEADOUT_TRACK;
  }

  info->SetCddbDiscId( CddbDiscId() );
  info->SetDiscLength( ::cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK) / CDIO_CD_FRAMES_PER_SEC );

  info->SetAudioTrackCount( m_nNumAudio );
  info->SetDataTrackCount( m_nNumData );
  info->SetFirstAudioTrack( m_nFirstAudio );
  info->SetFirstDataTrack( m_nFirstData );

  CLog::Log(LOGINFO, "CD Analysis Report");
  CLog::Log(LOGINFO, STRONG);

  /* Try to find out what sort of CD we have */
  if (0 == m_nNumData)
  {
    /* no data track, may be a "real" audio CD or hidden track CD */

    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) */
开发者ID:69thelememt,项目名称:xbmc,代码行数:67,代码来源:cdioSupport.cpp

示例2: GetCdInfo


//.........这里部分代码省略.........
      if ( -1 == m_nFirstAudio)
        m_nFirstAudio = i;

      // Make sure that we have the Disc related info available
      if (i == 1)
      {
        GetCdTextInfo(&ti_0, 0);
        info->SetDiscCDTextInformation( ti_0.cdtext );
      }

      // Get this tracks info
      GetCdTextInfo(&ti, i);
    }
    else
    {
      m_nNumData++;
      if ( -1 == m_nFirstData)
        m_nFirstData = i;
    }
    ti.ms_offset = 0;
    ti.isofs_size = 0;
    ti.nJolietLevel = 0;
    ti.nFrames = ::cdio_get_track_lba(cdio, i);
    info->SetTrackInformation( i, ti );
    /* skip to leadout? */
    if (i == m_nNumTracks)
      i = CDIO_CDROM_LEADOUT_TRACK;
  }

  info->SetCddbDiscId( CddbDiscId() );
  info->SetDiscLength( ::cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK) / CDIO_CD_FRAMES_PER_SEC );

  info->SetAudioTrackCount( m_nNumAudio );
  info->SetDataTrackCount( m_nNumData );
  info->SetFirstAudioTrack( m_nFirstAudio );
  info->SetFirstDataTrack( m_nFirstData );

  char buf[1024];
  CLog::Log(LOGINFO, "CD Analysis Report");
  CLog::Log(LOGINFO, STRONG);

  /* try to find out what sort of CD we have */
  if (0 == m_nNumData)
  {
    /* no data track, may be a "real" audio CD or hidden track CD */

    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 */
        sprintf(buf, "Oops: %i unused sectors at start, "
                "but hidden track check failed.\n",
                m_nStartTrack);
        OutputDebugString( buf );
      }
    }
    PrintAnalysis(m_nFs, m_nNumAudio);
开发者ID:derobert,项目名称:debianlink-xbmc,代码行数:67,代码来源:cdioSupport.cpp


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