Interface IDvrManifest


public interface IDvrManifest
Interface for a DVR Store manifest. A DVR manifest collects type-specific manifest info, including:
  • Audio manifest
  • Video manifest
  • data manifest
  • time map manifest, to map DVR, packet and real time
  • codec manifest to track codec information
  • onMetadata manifest

The difference between retrieving 'recorded entries' and 'live entries' is an important one. Recorded Entries means every current manifest entry. Live Entries refers to a subset of these because a playlist will not include the very last entries, as some chunks must be available for buffering.

  • Field Details

  • Method Details

    • initialize

      void initialize()
      Initialize the manifest. Called after the previous storage has been loaded but before any chunks are added.
    • refreshManifest

      void refreshManifest()
      Refresh the mainfest.
    • addToManifest

      void addToManifest(List<DvrManifestEntry> entries)
      Add manifest entries to the manifest
      Parameters:
      entries - list of entries.
    • getRecordedEntries

      List<DvrManifestEntry> getRecordedEntries(int type)
      Get a copy of all manifest entries of a given type. Valid types include: IVHost.CONTENTTYPE_AUDIO, IVHost.CONTENTTYPE_VIDEO, IVHost.CONTENTTYPE_DATA, ON_METADATA_TYPE, CODEC_TYPE, or TIME_MAP_TYPE
      Parameters:
      type - The manifest type.
      Returns:
      list of entries
    • getRecordedEntriesMap

      Map<Long,DvrManifestEntry> getRecordedEntriesMap(int type)
      Get a copy of all manifest entries of a given type as a Map of indices. Valid types include: IVHost.CONTENTTYPE_AUDIO, IVHost.CONTENTTYPE_VIDEO, IVHost.CONTENTTYPE_DATA, ON_METADATA_TYPE, CODEC_TYPE, or TIME_MAP_TYPE
      Parameters:
      type - the manifest type.
      Returns:
      map of entries
    • getRecordedEntriesInRange

      List<DvrManifestEntry> getRecordedEntriesInRange(DvrManifestEntryRange range)
      Given a DvrManifestEntryRange, get a list of recorded entries in this range.
      Parameters:
      range - a range (which consists of a manifest type and a start and end index)
      Returns:
      list of entries
    • getLastRecordedEntry

      DvrManifestEntry getLastRecordedEntry(int type)
      Given manifest type and DVR time, get last entry.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      Returns:
      manifest entry
    • getRecordedEntryByTimeKey

      DvrManifestEntry getRecordedEntryByTimeKey(int type, long dvrTime)
      Get the manifest entry given a manifest type and a time (in DVR units)
      Parameters:
      type - the manifest type.
      dvrTime - DVR time
      Returns:
      manifest entry
    • getRecordedEntryByIndex

      DvrManifestEntry getRecordedEntryByIndex(int type, long index)
      Get the manifest entry given a manifest type and an index.
      Parameters:
      type - the manifest type.
      index - the index into the manifest
      Returns:
      manifest entry
    • getEntriesToPurge

      DvrManifestEntryRangeGroup getEntriesToPurge(long purgeTime)
      Given a purge time, return a group of manifest ranges to purge. This method ensures that the purge entries are aligned by index so that audio and video always remain index aligned.
      Parameters:
      purgeTime - The DVR time to purge
      Returns:
      a group of ranges.
    • purgeEntries

      Given a group of ranges, purge the manifest entries.
      Parameters:
      ranges - Group of ranges
      Returns:
      A list of the purged items.
    • getMetadataEntryForTime

      DvrManifestOnMetadataEntry getMetadataEntryForTime(long dvrTime)
      Return most recent metadataEntry for a given DVR time. The manifest for metadata entries is sparse-- it only stores items periodically. So for a given time t, the returned entry will exist at or before time t.
      Parameters:
      dvrTime - DVR time
      Returns:
      onMetadata Entry
    • getCodecEntryForTime

      DvrManifestCodecEntry getCodecEntryForTime(long dvrTime)
      Return most recent codec entry for a given DVR time. The manifest for codec entries is sparse-- it only stores items periodically. So for a given time t, the returned entry will exist at or before time t.
      Parameters:
      dvrTime - DVR time
      Returns:
      Codec Entry
    • getNumberLiveEntries

      int getNumberLiveEntries(int type, long dvrStart)
      Given manifest type and DVR time, get the number of live entries at the given time.

      "Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.

      Parameters:
      type - the manifest type.
      dvrStart - DVR time
      Returns:
      number of entries.
    • getNumberLiveEntries

      int getNumberLiveEntries(int type, long dvrStart, long dvrEnd)
      Given manifest type and DVR time, get the number of live entries at the given time.

      "Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.

      Parameters:
      type - the manifest type.
      dvrStart - DVR time
      dvrEnd - end DVR time
      Returns:
      number of entries.
    • getNumberRecordedEntries

      int getNumberRecordedEntries(int type, long dvrStart)
      Given manifest type and DVR time, get the number of entries at the given time.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      dvrStart - DVR time
      Returns:
      number of entries.
    • getNumberRecordedEntries

      int getNumberRecordedEntries(int type, long dvrStart, long dvrEnd)
      Given manifest type and DVR time, get the number of live entries at the given time.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      dvrStart - DVR time
      dvrEnd - end DVR time
      Returns:
      number of entries.
    • getFirstEntry

      DvrManifestEntry getFirstEntry(int type)
      Given manifest type, get the first playlist manifest entry.
      Parameters:
      type - the manifest type.
      Returns:
      manifest entry
    • getLastLiveEntry

      DvrManifestEntry getLastLiveEntry(int type)
      Given manifest type, get the last playlist manifest entry.

      "Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.

      Parameters:
      type - the manifest type.
      Returns:
      manifest entry
    • getLiveEntries

      List<DvrManifestEntry> getLiveEntries(int type, long dvrStart)
      Given manifest type and DVR time, get a list of the live entries.

      "Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.

      Parameters:
      type - the manifest type.
      dvrStart - DVR time
      Returns:
      list of entries.
    • getLiveEntriesWithLimit

      List<DvrManifestEntry> getLiveEntriesWithLimit(int type, long dvrTime, int limit)
      Given manifest type and DVR time, get a list of the live entries limiting number of returned items.

      "Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.

      Parameters:
      type - the manifest type.
      dvrTime - DVR time
      limit - maximum number of returned items
      Returns:
      list of entries.
    • getRecordedEntriesWithLimit

      List<DvrManifestEntry> getRecordedEntriesWithLimit(int type, long dvrTime, int limit)
      Given manifest type and DVR time, get a list of recorded entries limiting number of returned items.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      dvrTime - DVR time
      limit - maximum number of returned items
      Returns:
      list of entries.
    • getRecordedEntries

      List<DvrManifestEntry> getRecordedEntries(int type, long dvrStartTime)
      Given manifest type and DVR time, get a list of recorded entries.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      dvrStartTime - DVR time
      Returns:
      list of entries.
    • getRecordedEntries

      List<DvrManifestEntry> getRecordedEntries(int type, long dvrStartTime, long dvrEndTime)
      Given manifest type and DVR time, get a list of recorded entries.

      "Recorded Entries" includes those entries after the end of the playlist.

      Parameters:
      type - the manifest type.
      dvrStartTime - DVR time
      dvrEndTime - DVR end time
      Returns:
      list of entries.
    • getRecordedDuration

      long getRecordedDuration(int type)
      Given manifest type, return DVR recorded duration in seconds

      "Recorded Entries" includes those entries after the end of the "live" playlist.

      Parameters:
      type - the manifest type.
      Returns:
      duration in seconds
    • getLiveDuration

      long getLiveDuration(int type)
      Given manifest type, return DVR live duration in seconds

      "Recorded Entries" includes those entries after the end of the "live" playlist.

      Parameters:
      type - the manifest type.
      Returns:
      duration in seconds
    • getDvrTime

      long getDvrTime(int type)
    • getLastRecordedIndex

      long getLastRecordedIndex(int type)
      Return last index of DVR entry for given type.
      Parameters:
      type -
      Returns:
      index, or -1 if type does not exist
    • getNextChunkIndex

      long getNextChunkIndex(String streamName, com.wowza.wms.dvr.DvrPacketHolder vPackets, com.wowza.wms.dvr.DvrPacketHolder aPackets)
    • getNextMetadataIndex

      long getNextMetadataIndex()
    • getNextCodecIndex

      long getNextCodecIndex()
    • getNextTimeMapIndex

      long getNextTimeMapIndex()
    • getManifestChannel

      com.wowza.wms.dvr.DvrChannelManifest getManifestChannel(int type)
      For a given manifest type, return the channel manifest.
      Parameters:
      type -
      Returns:
      channel manifest
    • importManifest

      void importManifest(IDvrManifest manifest, boolean persist)
      Import the specified manifest into this manifest
      Parameters:
      manifest -
      persist -
    • getClosestStartTime

      long getClosestStartTime(int type, long dvrTime)
      Given a dvrTime and a manifest type, find the closest chunk starting time.
      Parameters:
      type - manifest type
      dvrTime - DVR time
      Returns:
      time that corresponds to the closest start time of the given manifest type
    • expandEndTime

      long expandEndTime(int type, long dvrEndTime)
    • expandStartTime

      long expandStartTime(int type, long dvrStartTime)
    • hasVideo

      boolean hasVideo()
      Does manifest contain video.
      Returns:
      true if it contains video.
    • hasAudio

      boolean hasAudio()
      Does manifest contain audio.
      Returns:
      true if it contains audio.
    • hasData

      boolean hasData()
      Does manifest contain data.
      Returns:
      true if it contains data.
    • hasOnMetadata

      boolean hasOnMetadata()
      Does manifest contain onMetadata.
      Returns:
      true if it contains onMetadata.
    • hasCodecData

      boolean hasCodecData()
      Does manifest contain codec data.
      Returns:
      true if it contains codec data
    • hasTimeMapData

      boolean hasTimeMapData()
      Does manifest contain time map info.
      Returns:
      true if it contains time map info.
    • serialize

      byte[] serialize(boolean ignoreEntries)
      Serialize the manifest.
      Parameters:
      ignoreEntries - If true, the individual manifest entries are not serialized.
      Returns:
      byte array of serialized data
    • deserialize

      void deserialize(byte[] bytes)
      Deserialize the manifest. Should be called after default constructor for manifest has been called.
      Parameters:
      bytes - buffer of bytes to deserialize
    • getTimeMap

      IDvrTimeMap getTimeMap()
    • getChunkIDHandler

      IDvrChunkIDHandler3 getChunkIDHandler()