Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/mediasource/MediaSourceUtils.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=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
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
#include "MediaSourceUtils.h"
7
8
#include "mozilla/Logging.h"
9
#include "nsPrintfCString.h"
10
11
namespace mozilla {
12
13
nsCString
14
DumpTimeRanges(const media::TimeIntervals& aRanges)
15
0
{
16
0
  nsCString dump;
17
0
18
0
  dump = "[";
19
0
20
0
  for (uint32_t i = 0; i < aRanges.Length(); ++i) {
21
0
    if (i > 0) {
22
0
      dump += ", ";
23
0
    }
24
0
    dump += nsPrintfCString("(%f, %f)",
25
0
                            aRanges.Start(i).ToSeconds(),
26
0
                            aRanges.End(i).ToSeconds());
27
0
  }
28
0
29
0
  dump += "]";
30
0
31
0
  return dump;
32
0
}
33
34
} // namespace mozilla