OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/media/cma/base/demuxer_stream_for_test.h" | 5 #include "chromecast/media/cma/base/demuxer_stream_for_test.h" |
6 | 6 |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "media/base/media_util.h" | 8 #include "media/base/media_util.h" |
9 | 9 |
10 namespace chromecast { | 10 namespace chromecast { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 gfx::Rect visible_rect(640, 480); | 56 gfx::Rect visible_rect(640, 480); |
57 gfx::Size natural_size(640, 480); | 57 gfx::Size natural_size(640, 480); |
58 return ::media::VideoDecoderConfig(::media::kCodecH264, | 58 return ::media::VideoDecoderConfig(::media::kCodecH264, |
59 ::media::VIDEO_CODEC_PROFILE_UNKNOWN, | 59 ::media::VIDEO_CODEC_PROFILE_UNKNOWN, |
60 ::media::PIXEL_FORMAT_YV12, | 60 ::media::PIXEL_FORMAT_YV12, |
61 ::media::COLOR_SPACE_UNSPECIFIED, | 61 ::media::COLOR_SPACE_UNSPECIFIED, |
62 coded_size, | 62 coded_size, |
63 visible_rect, | 63 visible_rect, |
64 natural_size, | 64 natural_size, |
65 ::media::EmptyExtraData(), | 65 ::media::EmptyExtraData(), |
66 ::media::Unencrypted()); | 66 false); |
67 } | 67 } |
68 | 68 |
69 ::media::DemuxerStream::Type DemuxerStreamForTest::type() const { | 69 ::media::DemuxerStream::Type DemuxerStreamForTest::type() const { |
70 return VIDEO; | 70 return VIDEO; |
71 } | 71 } |
72 | 72 |
73 bool DemuxerStreamForTest::SupportsConfigChanges() { | 73 bool DemuxerStreamForTest::SupportsConfigChanges() { |
74 return true; | 74 return true; |
75 } | 75 } |
76 | 76 |
(...skipping 12 matching lines...) Expand all Loading... |
89 | 89 |
90 scoped_refptr<::media::DecoderBuffer> buffer(new ::media::DecoderBuffer(16)); | 90 scoped_refptr<::media::DecoderBuffer> buffer(new ::media::DecoderBuffer(16)); |
91 buffer->set_timestamp(frame_count_ * base::TimeDelta::FromMilliseconds( | 91 buffer->set_timestamp(frame_count_ * base::TimeDelta::FromMilliseconds( |
92 kDemuxerStreamForTestFrameDuration)); | 92 kDemuxerStreamForTestFrameDuration)); |
93 frame_count_++; | 93 frame_count_++; |
94 read_cb.Run(kOk, buffer); | 94 read_cb.Run(kOk, buffer); |
95 } | 95 } |
96 | 96 |
97 } // namespace media | 97 } // namespace media |
98 } // namespace chromecast | 98 } // namespace chromecast |
OLD | NEW |