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

Unified Diff: chromecast/media/cma/base/frame_generator_for_test.h

Issue 609383004: Chromecast: adds test frame-segmenter code to support CMA unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cma-decrypt-context
Patch Set: style fixes Created 6 years, 2 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
Index: chromecast/media/cma/base/frame_generator_for_test.h
diff --git a/chromecast/media/cma/base/frame_generator_for_test.h b/chromecast/media/cma/base/frame_generator_for_test.h
deleted file mode 100644
index 1da3fa851844bed80476e3c55c2e23d23422c146..0000000000000000000000000000000000000000
--- a/chromecast/media/cma/base/frame_generator_for_test.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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 CHROMECAST_MEDIA_CMA_BASE_FRAME_GENERATOR_FOR_TEST_H_
-#define CHROMECAST_MEDIA_CMA_BASE_FRAME_GENERATOR_FOR_TEST_H_
-
-#include <vector>
-
-#include "base/memory/ref_counted.h"
-#include "base/time/time.h"
-
-namespace chromecast {
-namespace media {
-class DecoderBufferBase;
-
-class FrameGeneratorForTest {
- public:
- // Parameters used to generate frames.
- struct FrameSpec {
- FrameSpec();
- ~FrameSpec();
-
- // Indicates whether the frame comes with a new decoder configuration.
- bool has_config;
-
- bool is_eos;
- base::TimeDelta timestamp;
- bool has_decrypt_config;
- size_t size;
- };
-
- explicit FrameGeneratorForTest(const std::vector<FrameSpec> frame_specs);
- ~FrameGeneratorForTest();
-
- // Indicates whether the next frame should come with a new decoder config.
- bool HasDecoderConfig() const;
-
- // Generates a frame.
- // Returns NULL is there is no frame left to generate.
- scoped_refptr<DecoderBufferBase> Generate();
-
- // Number of frames not generated yet.
- size_t RemainingFrameCount() const;
-
- private:
- std::vector<FrameSpec> frame_specs_;
- size_t frame_idx_;
-
- // Total size of A/V buffers generated so far.
- size_t total_buffer_size_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameGeneratorForTest);
-};
-
-} // namespace media
-} // namespace chromecast
-
-#endif // CHROMECAST_MEDIA_CMA_BASE_TEST_FRAME_GENERATOR_H_
« no previous file with comments | « chromecast/media/cma/base/buffering_frame_provider_unittest.cc ('k') | chromecast/media/cma/base/frame_generator_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698