示例#1
0
    def supported_aspect_ratios(self):
        """Fetches supported aspect ratios.

    Returns:
      A dict of strings and bools specifying supported aspect ratios.
    """
        return tools.DictFilter(self._aspect_ratios, self._block[14])
示例#2
0
  def colorimetry(self):
    """Fetches the colorimetry.

    Returns:
      A dict of strings and bools indicating the colorimetry.
    """
    return tools.DictFilter(_colors, self._block[2])
示例#3
0
  def allocation(self):
    """Fetches the speaker allocation.

    Returns:
      A dict of strings and bools indicating the speaker allocation.
    """
    alloc_bits = ((self._block[2] & 0x07) << 8) + self._block[1]
    return tools.DictFilter(_speakers, alloc_bits)
示例#4
0
  def bit_depth(self):
    """Fetches the supported bit depths.

    Returns:
      A dict of strings and bools that indicate bit depths and whether each one
      is supported.
    """
    return tools.DictFilter(_bits, self._block[2] & 0x07)
示例#5
0
    def supported_vertical_rates(self):
        """Fetches the list of supported refresh rates.

    Returns:
      A dict of strings and booleans, each representing a refresh rate and
      whether it is supported.
    """
        supp_code = self._block[2] & 0x1F
        return tools.DictFilter(self._ref_rates, supp_code)
    def supported_timings(self):
        """Creates the list of supported timings.

    Returns:
      The dict of strings and bools indicating supported timings.
    """
        # Bytes 35, 36, 37
        timing_byte = ((self._edid[0x23] << 16) + (self._edid[0x24] << 8) +
                       (self._edid[0x25]))
        return tools.DictFilter(_timings, timing_byte)
示例#7
0
    def established_timings(self):
        """Fetches the supported established timings.

    Returns:
      A dict of strings and bools denoting the supported established timings.
    """
        # Bytes 6-10 plus first half of 11
        timing_byte = ((self._block[6] << 36) + (self._block[7] << 28) +
                       (self._block[8] << 20) + (self._block[9] << 12) +
                       (self._block[10] << 4) + (self._block[11] >> 4))
        return tools.DictFilter(self._timings, timing_byte)
示例#8
0
  def supported_sampling_freqs(self):
    """Fetches a list of supported sampling frequencies.

    Note that extended SADs will never support 192 kHz or 176.4 kHz (see list
    of frequencies in __init__).
    However, those bits are set to 0 so will never translate as supported.

    Returns:
      A dict of string constants and bools that indicate sampling frequencies
      and whether each one is supported.
    """
    return tools.DictFilter(_freqs, self._block[1] & 0x7F)