shaka-packager/packager/mpd/base/mock_mpd_builder.cc

41 lines
1.3 KiB
C++
Raw Normal View History

// Copyright 2023 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#include <packager/mpd/base/mock_mpd_builder.h>
#include <packager/mpd/base/media_info.pb.h>
namespace shaka {
namespace {
const char kEmptyLang[] = "";
const MpdOptions kDefaultMpdOptions;
} // namespace
// Doesn't matter what values get passed to the super class' constructor.
// All methods used for testing should be mocked.
MockMpdBuilder::MockMpdBuilder() : MpdBuilder(kDefaultMpdOptions) {}
MockMpdBuilder::~MockMpdBuilder() {}
MockPeriod::MockPeriod(uint32_t period_id, double start_time_in_seconds)
: Period(period_id,
start_time_in_seconds,
kDefaultMpdOptions,
&sequence_counter_) {}
MockAdaptationSet::MockAdaptationSet()
: AdaptationSet(kEmptyLang, kDefaultMpdOptions, &sequence_counter_) {}
MockAdaptationSet::~MockAdaptationSet() {}
MockRepresentation::MockRepresentation(uint32_t representation_id)
: Representation(MediaInfo(),
kDefaultMpdOptions,
representation_id,
std::unique_ptr<RepresentationStateChangeListener>()) {}
MockRepresentation::~MockRepresentation() {}
} // namespace shaka