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

Side by Side Diff: media/base/stream_parser_unittest.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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
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 #include <algorithm> 5 #include <algorithm>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "base/basictypes.h"
9 #include "media/base/stream_parser.h" 8 #include "media/base/stream_parser.h"
10 #include "media/base/stream_parser_buffer.h" 9 #include "media/base/stream_parser_buffer.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 namespace media { 12 namespace media {
14 13
15 typedef StreamParser::TrackId TrackId; 14 typedef StreamParser::TrackId TrackId;
16 typedef StreamParser::BufferQueue BufferQueue; 15 typedef StreamParser::BufferQueue BufferQueue;
17 typedef StreamParser::TextBufferQueueMap TextBufferQueueMap; 16 typedef StreamParser::TextBufferQueueMap TextBufferQueueMap;
18 17
19 const int kEnd = -1; 18 const int kEnd = -1;
20 const uint8 kFakeData[] = { 0xFF }; 19 const uint8_t kFakeData[] = {0xFF};
21 const TrackId kAudioTrackId = 0; 20 const TrackId kAudioTrackId = 0;
22 const TrackId kVideoTrackId = 1; 21 const TrackId kVideoTrackId = 1;
23 const TrackId kTextTrackIdA = 2; 22 const TrackId kTextTrackIdA = 2;
24 const TrackId kTextTrackIdB = 3; 23 const TrackId kTextTrackIdB = 3;
25 24
26 static bool IsAudio(scoped_refptr<StreamParserBuffer> buffer) { 25 static bool IsAudio(scoped_refptr<StreamParserBuffer> buffer) {
27 return buffer->type() == DemuxerStream::AUDIO; 26 return buffer->type() == DemuxerStream::AUDIO;
28 } 27 }
29 28
30 static bool IsVideo(scoped_refptr<StreamParserBuffer> buffer) { 29 static bool IsVideo(scoped_refptr<StreamParserBuffer> buffer) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 VerifyMergeSuccess(expected, true); 371 VerifyMergeSuccess(expected, true);
373 372
374 // But appending something with a lower timestamp than the last timestamp 373 // But appending something with a lower timestamp than the last timestamp
375 // in the pre-existing merge result should fail. 374 // in the pre-existing merge result should fail.
376 int more_audio_timestamps[] = { 106, kEnd }; 375 int more_audio_timestamps[] = { 106, kEnd };
377 GenerateAudioBuffers(more_audio_timestamps); 376 GenerateAudioBuffers(more_audio_timestamps);
378 VerifyMergeFailure(); 377 VerifyMergeFailure();
379 } 378 }
380 379
381 } // namespace media 380 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698