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

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

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile errors 11/21 #6 Created 7 years, 1 month 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/source_buffer_stream.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FILTERS_WEBVTT_UTIL_H_
6 #define MEDIA_FILTERS_WEBVTT_UTIL_H_
7
8 #include <vector>
9
10 namespace media {
11
12 // Utility function to create side data item for decoder buffer.
13 template<typename T>
14 void MakeSideData(T id_begin, T id_end,
15 T settings_begin, T settings_end,
16 std::vector<uint8>* side_data) {
17 // The DecoderBuffer only supports a single side data item. In the case of
18 // a WebVTT cue, we can have potentially two side data items. In order to
19 // avoid disrupting DecoderBuffer any more than we need to, we copy both
20 // side data items onto a single one, and terminate each with a NUL marker.
21 side_data->clear();
22 side_data->insert(side_data->end(), id_begin, id_end);
23 side_data->push_back(0);
24 side_data->insert(side_data->end(), settings_begin, settings_end);
25 side_data->push_back(0);
26 }
27
28 } // namespace media
29
30 #endif // MEDIA_FILTERS_WEBVTT_UTIL_H_
OLDNEW
« no previous file with comments | « media/filters/source_buffer_stream.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698