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

Side by Side Diff: media/filters/test_video_decoder.h

Issue 146068: Switching decoders to use the injected message loop. (Closed)
Patch Set: More fixes Created 11 years, 5 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 unified diff | Download patch
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 // 4 //
5 5
6 #ifndef MEDIA_FILTERS_TEST_VIDEO_DECODER_H_ 6 #ifndef MEDIA_FILTERS_TEST_VIDEO_DECODER_H_
7 #define MEDIA_FILTERS_TEST_VIDEO_DECODER_H_ 7 #define MEDIA_FILTERS_TEST_VIDEO_DECODER_H_
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "media/base/buffers.h" 11 #include "media/base/buffers.h"
12 #include "media/base/factory.h" 12 #include "media/base/factory.h"
13 #include "media/base/filters.h" 13 #include "media/base/filters.h"
14 #include "media/base/mock_media_filters.h" 14 #include "media/base/mock_media_filters.h"
15 #include "media/base/video_frame_impl.h" 15 #include "media/base/video_frame_impl.h"
16 #include "media/filters/decoder_base.h" 16 #include "media/filters/decoder_base.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 class TestVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> { 20 class TestVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> {
21 public: 21 public:
22 TestVideoDecoder() 22 TestVideoDecoder()
23 : DecoderBase<VideoDecoder, VideoFrame>("VideoDecoderThread"), 23 : video_width_(0),
24 video_width_(0),
25 video_height_(0) { 24 video_height_(0) {
26 } 25 }
27 26
28 bool OnInitialize(DemuxerStream* demuxer_stream) { 27 bool OnInitialize(DemuxerStream* demuxer_stream) {
29 const MediaFormat& media_format = demuxer_stream->media_format(); 28 const MediaFormat& media_format = demuxer_stream->media_format();
30 std::string mime_type; 29 std::string mime_type;
31 int width, height; 30 int width, height;
32 if (media_format.GetAsString(MediaFormat::kMimeType, &mime_type) && 31 if (media_format.GetAsString(MediaFormat::kMimeType, &mime_type) &&
33 mime_type.compare(mime_type::kH264AnnexB) == 0 && 32 mime_type.compare(mime_type::kH264AnnexB) == 0 &&
34 media_format.GetAsInteger(MediaFormat::kWidth, &width) && 33 media_format.GetAsInteger(MediaFormat::kWidth, &width) &&
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 71
73 size_t video_width_; 72 size_t video_width_;
74 size_t video_height_; 73 size_t video_height_;
75 74
76 DISALLOW_COPY_AND_ASSIGN(TestVideoDecoder); 75 DISALLOW_COPY_AND_ASSIGN(TestVideoDecoder);
77 }; 76 };
78 77
79 } // namespace 78 } // namespace
80 79
81 #endif // MEDIA_FILTERS_TEST_VIDEO_DECODER_H_ 80 #endif // MEDIA_FILTERS_TEST_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698