Shaka Packager SDK
Loading...
Searching...
No Matches
mock_mpd_builder.cc
1// Copyright 2023 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#include <packager/mpd/base/mock_mpd_builder.h>
8
9#include <packager/mpd/base/media_info.pb.h>
10
11namespace shaka {
12namespace {
13const char kEmptyLang[] = "";
14const MpdOptions kDefaultMpdOptions;
15} // namespace
16
17// Doesn't matter what values get passed to the super class' constructor.
18// All methods used for testing should be mocked.
19MockMpdBuilder::MockMpdBuilder() : MpdBuilder(kDefaultMpdOptions) {}
20MockMpdBuilder::~MockMpdBuilder() {}
21
22MockPeriod::MockPeriod(uint32_t period_id, double start_time_in_seconds)
23 : Period(period_id,
24 start_time_in_seconds,
25 kDefaultMpdOptions,
26 &sequence_counter_) {}
27
28MockAdaptationSet::MockAdaptationSet()
29 : AdaptationSet(kEmptyLang, kDefaultMpdOptions, &sequence_counter_) {}
30
31MockAdaptationSet::~MockAdaptationSet() {}
32
33MockRepresentation::MockRepresentation(uint32_t representation_id)
34 : Representation(MediaInfo(),
35 kDefaultMpdOptions,
36 representation_id,
37 std::unique_ptr<RepresentationStateChangeListener>()) {}
38MockRepresentation::~MockRepresentation() {}
39
40} // namespace shaka
All the methods that are virtual are virtual for mocking.