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

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

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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/vpx_video_decoder.cc ('k') | media/formats/common/offset_byte_queue.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FILTERS_WEBVTT_UTIL_H_ 5 #ifndef MEDIA_FILTERS_WEBVTT_UTIL_H_
6 #define MEDIA_FILTERS_WEBVTT_UTIL_H_ 6 #define MEDIA_FILTERS_WEBVTT_UTIL_H_
7 7
8 #include <stdint.h>
9
8 #include <vector> 10 #include <vector>
9 11
10 namespace media { 12 namespace media {
11 13
12 // Utility function to create side data item for decoder buffer. 14 // Utility function to create side data item for decoder buffer.
13 template <typename T> 15 template <typename T>
14 void MakeSideData(T id_begin, 16 void MakeSideData(T id_begin,
15 T id_end, 17 T id_end,
16 T settings_begin, 18 T settings_begin,
17 T settings_end, 19 T settings_end,
18 std::vector<uint8_t>* side_data) { 20 std::vector<uint8_t>* side_data) {
19 // The DecoderBuffer only supports a single side data item. In the case of 21 // The DecoderBuffer only supports a single side data item. In the case of
20 // a WebVTT cue, we can have potentially two side data items. In order to 22 // a WebVTT cue, we can have potentially two side data items. In order to
21 // avoid disrupting DecoderBuffer any more than we need to, we copy both 23 // avoid disrupting DecoderBuffer any more than we need to, we copy both
22 // side data items onto a single one, and terminate each with a NUL marker. 24 // side data items onto a single one, and terminate each with a NUL marker.
23 side_data->clear(); 25 side_data->clear();
24 side_data->insert(side_data->end(), id_begin, id_end); 26 side_data->insert(side_data->end(), id_begin, id_end);
25 side_data->push_back(0); 27 side_data->push_back(0);
26 side_data->insert(side_data->end(), settings_begin, settings_end); 28 side_data->insert(side_data->end(), settings_begin, settings_end);
27 side_data->push_back(0); 29 side_data->push_back(0);
28 } 30 }
29 31
30 } // namespace media 32 } // namespace media
31 33
32 #endif // MEDIA_FILTERS_WEBVTT_UTIL_H_ 34 #endif // MEDIA_FILTERS_WEBVTT_UTIL_H_
OLDNEW
« no previous file with comments | « media/filters/vpx_video_decoder.cc ('k') | media/formats/common/offset_byte_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698