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; |
+ |
+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_ |