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

Unified Diff: chromecast/media/cma/test/frame_segmenter_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: address damien's comments 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/test/frame_segmenter_for_test.h
diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.h b/chromecast/media/cma/test/frame_segmenter_for_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..740c1c4b2325d3407c40bc721e1a9e1db70741ba
--- /dev/null
+++ b/chromecast/media/cma/test/frame_segmenter_for_test.h
@@ -0,0 +1,47 @@
+// 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_TEST_FRAME_SEGMENTER_FOR_TEST_H_
+#define CHROMECAST_MEDIA_CMA_TEST_FRAME_SEGMENTER_FOR_TEST_H_
+
+#include <list>
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "media/base/audio_decoder_config.h"
+#include "media/base/video_decoder_config.h"
+
+namespace base {
+class FilePath;
+}
+
+namespace chromecast {
+namespace media {
+class DecoderBufferBase;
+
+// Implement some basic frame segmenters good enough for unit tests.
+std::list<scoped_refptr<DecoderBufferBase> > Mp3SegmenterForTest(
+ const uint8* data, size_t data_size);
+
+std::list<scoped_refptr<DecoderBufferBase> > H264SegmenterForTest(
+ const uint8* data, size_t data_size);
+
+typedef std::list< scoped_refptr<DecoderBufferBase> > BufferList;
damienv1 2014/10/03 16:48:50 nit1: Can you define it before and also use it for
gunsch 2014/10/03 16:52:53 Done.
+
+struct DemuxResult {
+ DemuxResult();
+ ~DemuxResult();
+
+ ::media::AudioDecoderConfig audio_config;
+ ::media::VideoDecoderConfig video_config;
+ BufferList frames;
+};
+
+DemuxResult FFmpegDemuxForTest(const base::FilePath& filepath,
+ bool audio);
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_TEST_FRAME_SEGMENTER_FOR_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698