Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  unique_timestamp_counter.h   Sprache: C

 
/*
 *  Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
#define VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_

#include <cstdint>
#include <memory>
#include <set>

namespace webrtc {

// Counts number of uniquely seen frames (aka pictures, aka temporal units)
// identified by their rtp timestamp.
class UniqueTimestampCounter {
 public:
  UniqueTimestampCounter();
  UniqueTimestampCounter(const UniqueTimestampCounter&) = delete;
  UniqueTimestampCounter& operator=(const UniqueTimestampCounter&) = delete;
  ~UniqueTimestampCounter() = default;

  void Add(uint32_t timestamp);
  // Returns number of different `timestamp` passed to the UniqueCounter.
  int GetUniqueSeen() const { return unique_seen_; }

 private:
  int unique_seen_ = 0;
  // Stores several last seen unique values for quick search.
  std::set<uint32_t> search_index_;
  // The same unique values in the circular buffer in the insertion order.
  std::unique_ptr<uint32_t[]> latest_;
  // Last inserted value for optimization purpose.
  int64_t last_ = -1;
};

}  // namespace webrtc

#endif  // VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_

Messung V0.5
C=93 H=90 G=91

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge