LCOV - code coverage report
Current view: top level - media/webrtc/signaling/src/jsep - JsepTrackEncoding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
       5             :  * You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef _JESPTRACKENCODING_H_
       8             : #define _JESPTRACKENCODING_H_
       9             : 
      10             : #include "signaling/src/jsep/JsepCodecDescription.h"
      11             : #include "signaling/src/common/EncodingConstraints.h"
      12             : #include "signaling/src/common/PtrVector.h"
      13             : 
      14             : namespace mozilla {
      15             : // Represents a single encoding of a media track. When simulcast is used, there
      16             : // may be multiple. Each encoding may have some constraints (imposed by JS), and
      17             : // may be able to use any one of multiple codecs (JsepCodecDescription) at any
      18             : // given time.
      19           0 : class JsepTrackEncoding
      20             : {
      21             : public:
      22           0 :   const std::vector<JsepCodecDescription*>& GetCodecs() const
      23             :   {
      24           0 :     return mCodecs.values;
      25             :   }
      26             : 
      27           0 :   void AddCodec(const JsepCodecDescription& codec)
      28             :   {
      29           0 :     mCodecs.values.push_back(codec.Clone());
      30           0 :   }
      31             : 
      32           0 :   bool HasFormat(const std::string& format) const
      33             :   {
      34           0 :     for (const JsepCodecDescription* codec : mCodecs.values) {
      35           0 :       if (codec->mDefaultPt == format) {
      36           0 :         return true;
      37             :       }
      38             :     }
      39           0 :     return false;
      40             :   }
      41             : 
      42             :   EncodingConstraints mConstraints;
      43             :   std::string mRid;
      44             : 
      45             : private:
      46             :   PtrVector<JsepCodecDescription> mCodecs;
      47             : };
      48             : }
      49             : 
      50             : #endif // _JESPTRACKENCODING_H_

Generated by: LCOV version 1.13