blob: c4cf6ff0d089e955ed68d90925d52651e1b593e4 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "garnet/bin/mediaplayer/core/test/fake_demux.h"
#include "garnet/bin/mediaplayer/graph/types/audio_stream_type.h"
#include "garnet/bin/mediaplayer/graph/types/stream_type.h"
#include "garnet/bin/mediaplayer/graph/types/video_stream_type.h"
namespace media_player {
namespace test {
// static
std::shared_ptr<FakeDemux> FakeDemux::Create() {
return std::make_shared<FakeDemux>();
}
FakeDemux::FakeDemux() {
streams_.push_back(std::make_unique<DemuxStreamImpl>(
0,
AudioStreamType::Create(StreamType::kAudioEncodingVorbis, nullptr,
AudioStreamType::SampleFormat::kFloat, 2, 44100),
media::TimelineRate(1, 1)));
streams_.push_back(std::make_unique<DemuxStreamImpl>(
1,
VideoStreamType::Create(StreamType::kVideoEncodingTheora, nullptr,
VideoStreamType::PixelFormat::kYv12,
VideoStreamType::ColorSpace::kNotApplicable, 1920,
1080, 1920, 1080, 1, 1, 1920),
media::TimelineRate(1, 1)));
}
} // namespace test
} // namespace media_player