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

Side by Side Diff: media/webm/webm_tracks_parser.h

Issue 11088047: Support encrypted audio stream in demuxer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « media/webm/webm_stream_parser.cc ('k') | media/webm/webm_tracks_parser.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WEBM_WEBM_TRACKS_PARSER_H_ 5 #ifndef MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
6 #define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ 6 #define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // Parses a WebM Tracks element in |buf|. 23 // Parses a WebM Tracks element in |buf|.
24 // 24 //
25 // Returns -1 if the parse fails. 25 // Returns -1 if the parse fails.
26 // Returns 0 if more data is needed. 26 // Returns 0 if more data is needed.
27 // Returns the number of bytes parsed on success. 27 // Returns the number of bytes parsed on success.
28 int Parse(const uint8* buf, int size); 28 int Parse(const uint8* buf, int size);
29 29
30 int64 audio_track_num() const { return audio_track_num_; } 30 int64 audio_track_num() const { return audio_track_num_; }
31 int64 video_track_num() const { return video_track_num_; } 31 int64 video_track_num() const { return video_track_num_; }
32 32 const std::string& audio_encryption_key_id() const {
33 const std::string& video_encryption_key_id() const; 33 return audio_encryption_key_id_;
34 }
35 const std::string& video_encryption_key_id() const {
36 return video_encryption_key_id_;
37 }
34 38
35 private: 39 private:
36 // WebMParserClient methods 40 // WebMParserClient methods
37 virtual WebMParserClient* OnListStart(int id) OVERRIDE; 41 virtual WebMParserClient* OnListStart(int id) OVERRIDE;
38 virtual bool OnListEnd(int id) OVERRIDE; 42 virtual bool OnListEnd(int id) OVERRIDE;
39 virtual bool OnUInt(int id, int64 val) OVERRIDE; 43 virtual bool OnUInt(int id, int64 val) OVERRIDE;
40 virtual bool OnFloat(int id, double val) OVERRIDE; 44 virtual bool OnFloat(int id, double val) OVERRIDE;
41 virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE; 45 virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE;
42 virtual bool OnString(int id, const std::string& str) OVERRIDE; 46 virtual bool OnString(int id, const std::string& str) OVERRIDE;
43 47
44 int64 track_type_; 48 int64 track_type_;
45 int64 track_num_; 49 int64 track_num_;
46 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_; 50 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_;
47 51
48 int64 audio_track_num_; 52 int64 audio_track_num_;
49 scoped_ptr<WebMContentEncodingsClient> audio_content_encodings_client_;
50
51 int64 video_track_num_; 53 int64 video_track_num_;
52 scoped_ptr<WebMContentEncodingsClient> video_content_encodings_client_; 54 std::string audio_encryption_key_id_;
55 std::string video_encryption_key_id_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); 57 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
55 }; 58 };
56 59
57 } // namespace media 60 } // namespace media
58 61
59 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ 62 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « media/webm/webm_stream_parser.cc ('k') | media/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698