Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: services/media/framework/stages/lpcm_stage_input.h

Issue 1678433002: Motown: Remove LPCM optimizations, fix prepare, add flush, add ActiveMultistreamSink model/stage (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/media/framework/stages/input.cc ('k') | services/media/framework/stages/lpcm_stage_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/framework/stages/lpcm_stage_input.h
diff --git a/services/media/framework/stages/lpcm_stage_input.h b/services/media/framework/stages/lpcm_stage_input.h
deleted file mode 100644
index b5ce1548d13bc1dd52f7f8b06b9420a1705c4525..0000000000000000000000000000000000000000
--- a/services/media/framework/stages/lpcm_stage_input.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_MEDIA_FRAMEWORK_ENGINE_LPCM_STAGE_INPUT_H_
-#define SERVICES_MEDIA_FRAMEWORK_ENGINE_LPCM_STAGE_INPUT_H_
-
-#include <vector>
-
-#include "services/media/framework/lpcm_util.h"
-#include "services/media/framework/models/demand.h"
-#include "services/media/framework/models/lpcm_frame_buffer.h"
-#include "services/media/framework/stages/stage_input.h"
-
-namespace mojo {
-namespace media {
-
-class LpcmStageOutput;
-
-// Represents a stage's connector to an adjacent upstream stage, with LPCM
-// optmizations.
-class LpcmStageInput : public StageInput {
- public:
- LpcmStageInput();
-
- ~LpcmStageInput();
-
- // Sets the stream type.
- void set_stream_type(const LpcmStreamType& stream_type);
-
- // Suggests possible demand frame count, useful when !connected_to_lpcm().
- void SuggestDemand(uint64_t frame_count, Engine* engine);
-
- // Updates the demand signalled to the connected upstream output.
- void SetLpcmDemand(
- void* buffer,
- uint64_t frame_count,
- bool mix,
- bool synchronous,
- Engine* engine);
-
- // Indicates whether demand is pending.
- bool demand_pending() const {
- return demand_pending_;
- }
-
- // Returns supplied frames.
- LpcmFrameBuffer& lpcm_supply() {
- return lpcm_supply_;
- }
-
- // Indicates whether we've hit end-of-stream.
- bool end_of_stream() const {
- return end_of_stream_;
- }
-
- // Indicates the frame count originally demanded.
- uint64_t demand_frame_count() const {
- return frame_count_;
- }
-
- // StageInput overrides.
- bool SupplyPacketFromOutput(PacketPtr packet) override;
-
- LpcmStageInput* get_lpcm() override;
-
- private:
- static const uint64_t kDefaultFrameCount = 512;
-
- bool connected_to_lpcm();
-
- // Copies or mixes frames from packet_frames_ to demand_frames_. This is only
- // used when !connected_to_lpcm() and the stage has supplied a buffer. The
- // return value indicates whether the demand was met.
- bool CopyOrMixFrames();
-
- // Ensures demand_buffer_ can accommodate frame_count frames and returns it.
- void* GetDemandBuffer(uint64_t frame_count);
-
- bool demand_pending_;
-
- void* buffer_;
- uint64_t frame_count_;
- bool mix_;
- bool synchronous_;
-
- LpcmFrameBuffer lpcm_supply_; // Frames supplied to this stage.
- LpcmFrameBuffer packet_frames_; // Source for packet payload copy/mix.
- LpcmFrameBuffer demand_frames_; // Destination for packet payload copy/mix.
-
- bool end_of_stream_;
-
- std::unique_ptr<LpcmUtil> lpcm_util_;
- std::vector<uint8_t> demand_buffer_;
-
- LpcmFrameBuffer::ExhaustedCallback packet_exhausted_function_;
-};
-
-} // namespace media
-} // namespace mojo
-
-#endif // SERVICES_MEDIA_FRAMEWORK_ENGINE_LPCM_STAGE_INPUT_H_
« no previous file with comments | « services/media/framework/stages/input.cc ('k') | services/media/framework/stages/lpcm_stage_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698