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

Side by Side Diff: media/formats/common/stream_parser_test_base.h

Issue 1716503002: Basic media tracks implementation for media stream parsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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/media_source_state.cc ('k') | media/formats/common/stream_parser_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ 5 #ifndef MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_
6 #define MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ 6 #define MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // The last AudioDecoderConfig handed to OnNewConfig(). 50 // The last AudioDecoderConfig handed to OnNewConfig().
51 const AudioDecoderConfig& last_audio_config() const { 51 const AudioDecoderConfig& last_audio_config() const {
52 return last_audio_config_; 52 return last_audio_config_;
53 } 53 }
54 54
55 private: 55 private:
56 bool AppendDataInPieces(const uint8_t* data, 56 bool AppendDataInPieces(const uint8_t* data,
57 size_t length, 57 size_t length,
58 size_t piece_size); 58 size_t piece_size);
59 void OnInitDone(const StreamParser::InitParameters& params); 59 void OnInitDone(const StreamParser::InitParameters& params);
60 bool OnNewConfig(const AudioDecoderConfig& audio_config, 60 bool OnNewConfig(scoped_ptr<MediaTracks> tracks,
61 const VideoDecoderConfig& video_config,
62 const StreamParser::TextTrackConfigMap& text_config); 61 const StreamParser::TextTrackConfigMap& text_config);
63 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, 62 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers,
64 const StreamParser::BufferQueue& video_buffers, 63 const StreamParser::BufferQueue& video_buffers,
65 const StreamParser::TextBufferQueueMap& text_map); 64 const StreamParser::TextBufferQueueMap& text_map);
66 void OnKeyNeeded(EmeInitDataType type, const std::vector<uint8_t>& init_data); 65 void OnKeyNeeded(EmeInitDataType type, const std::vector<uint8_t>& init_data);
67 void OnNewSegment(); 66 void OnNewSegment();
68 void OnEndOfSegment(); 67 void OnEndOfSegment();
69 68
70 scoped_ptr<StreamParser> parser_; 69 scoped_ptr<StreamParser> parser_;
71 std::stringstream results_stream_; 70 std::stringstream results_stream_;
72 AudioDecoderConfig last_audio_config_; 71 AudioDecoderConfig last_audio_config_;
73 72
74 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); 73 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase);
75 }; 74 };
76 75
77 } // namespace media 76 } // namespace media
78 77
79 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ 78 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_
OLDNEW
« no previous file with comments | « media/filters/media_source_state.cc ('k') | media/formats/common/stream_parser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698