Commit 43499f6f authored by Otto Länd's avatar Otto Länd
Browse files

Bug 1703812, 18179974, 1821362: apply code formatting via Lando

# ignore-this-changeset
parent 0c5dc594
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ TimeRanges::TimeRanges(const media::TimeIntervals& aTimeIntervals)
TimeRanges::TimeRanges(const media::TimeRanges& aTimeRanges)
    : TimeRanges(nullptr, aTimeRanges) {}


media::TimeIntervals TimeRanges::ToTimeIntervals() const {
  media::TimeIntervals t;
  for (uint32_t i = 0; i < Length(); i++) {
+6 −4
Original line number Diff line number Diff line
@@ -668,12 +668,14 @@ already_AddRefed<MediaRawData> ADTSTrackDemuxer::GetNextFrame(
  // part of preroll.
  MOZ_ASSERT(frame->mDuration.IsPositiveOrZero());

  ADTSLOG("ADTS packet demuxed: pts [%lf, %lf] (duration: %lf)", frame->mTime.ToSeconds(),
          frame->GetEndTime().ToSeconds(), frame->mDuration.ToSeconds());
  ADTSLOG("ADTS packet demuxed: pts [%lf, %lf] (duration: %lf)",
          frame->mTime.ToSeconds(), frame->GetEndTime().ToSeconds(),
          frame->mDuration.ToSeconds());

  // Indicate original packet information to trim after decoding.
  if (frame->mDuration != rawDuration) {
    frame->mOriginalPresentationWindow = Some(media::TimeInterval{rawpts, rawend});
    frame->mOriginalPresentationWindow =
        Some(media::TimeInterval{rawpts, rawend});
    ADTSLOG("Total packet time excluding trimming: [%lf, %lf]",
            rawpts.ToSeconds(), rawend.ToSeconds());
  }
+3 −3
Original line number Diff line number Diff line
@@ -89,8 +89,7 @@ bool AudioData::SetTrimWindow(const media::TimeInterval& aTrim) {
    return false;
  }
  const size_t originalFrames = mAudioData.Length() / mChannels;
  if (aTrim.mStart < mOriginalTime ||
      aTrim.mEnd > GetEndTime()) {
  if (aTrim.mStart < mOriginalTime || aTrim.mEnd > GetEndTime()) {
    return false;
  }

@@ -482,7 +481,8 @@ already_AddRefed<VideoData> VideoData::CreateAndCopyData(
  // The naming convention in the gfx stack is byte-order.
  ConvertI420AlphaToARGB(aBuffer.mPlanes[0].mData, aBuffer.mPlanes[1].mData,
                         aBuffer.mPlanes[2].mData, aAlphaPlane.mData,
                         AssertedCast<int>(aBuffer.mPlanes[0].mStride), AssertedCast<int>(aBuffer.mPlanes[1].mStride),
                         AssertedCast<int>(aBuffer.mPlanes[0].mStride),
                         AssertedCast<int>(aBuffer.mPlanes[1].mStride),
                         buffer.data, buffer.stride, buffer.size.width,
                         buffer.size.height);

+3 −3
Original line number Diff line number Diff line
@@ -1307,7 +1307,8 @@ IntervalType MediaDecoder::GetSeekableImpl() {
    return IntervalType(GetBuffered());
  }
  // Return [0, duration] -- When dealing with doubles, use ::GetDuration to
  // avoid rounding the value differently. When dealing with TimeUnit, it's returned directly.
  // avoid rounding the value differently. When dealing with TimeUnit, it's
  // returned directly.
  typename IntervalType::InnerType duration;
  if constexpr (std::is_same<typename IntervalType::InnerType, double>::value) {
    duration = GetDuration();
@@ -1317,8 +1318,7 @@ IntervalType MediaDecoder::GetSeekableImpl() {

  return IntervalType(typename IntervalType::ElemType(
      Zero<typename IntervalType::InnerType>(),
      IsInfinite() ? Infinity<typename IntervalType::InnerType>()
                   : duration));
      IsInfinite() ? Infinity<typename IntervalType::InnerType>() : duration));
}

media::TimeIntervals MediaDecoder::GetSeekable() {
+3 −4
Original line number Diff line number Diff line
@@ -440,8 +440,7 @@ TimeRanges TimeRanges::ToMicrosecondResolution() const {
  TimeRanges output;

  for (const auto& interval : mIntervals) {
    TimeRange reducedPrecision{
        RoundToMicrosecondResolution(interval.mStart),
    TimeRange reducedPrecision{RoundToMicrosecondResolution(interval.mStart),
                               RoundToMicrosecondResolution(interval.mEnd),
                               RoundToMicrosecondResolution(interval.mFuzz)};
    output += reducedPrecision;
Loading