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

Side by Side Diff: media/base/stream_parser.h

Issue 10910293: Add is_encrypted() in VideoDecoderConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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_BASE_STREAM_PARSER_H_ 5 #ifndef MEDIA_BASE_STREAM_PARSER_H_
6 #define MEDIA_BASE_STREAM_PARSER_H_ 6 #define MEDIA_BASE_STREAM_PARSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 22 matching lines...) Expand all
33 // occurred. 33 // occurred.
34 // Second parameter - Indicates the stream duration. Only contains a valid 34 // Second parameter - Indicates the stream duration. Only contains a valid
35 // value if the first parameter is true. 35 // value if the first parameter is true.
36 typedef base::Callback<void(bool, base::TimeDelta)> InitCB; 36 typedef base::Callback<void(bool, base::TimeDelta)> InitCB;
37 37
38 // Indicates when new stream configurations have been parsed. 38 // Indicates when new stream configurations have been parsed.
39 // First parameter - The new audio configuration. If the config is not valid 39 // First parameter - The new audio configuration. If the config is not valid
40 // then it means that there isn't an audio stream. 40 // then it means that there isn't an audio stream.
41 // Second parameter - The new video configuration. If the config is not valid 41 // Second parameter - The new video configuration. If the config is not valid
42 // then it means that there isn't an audio stream. 42 // then it means that there isn't an audio stream.
43 // Third parameter - Whether the audio stream is encrypted.
44 // Fourth parameter - Whether the video stream is encrypted.
43 // Return value - True if the new configurations are accepted. 45 // Return value - True if the new configurations are accepted.
44 // False if the new configurations are not supported 46 // False if the new configurations are not supported
45 // and indicates that a parsing error should be signalled. 47 // and indicates that a parsing error should be signalled.
46 typedef base::Callback<bool(const AudioDecoderConfig&, 48 typedef base::Callback<bool(const AudioDecoderConfig&,
47 const VideoDecoderConfig&)> NewConfigCB; 49 const VideoDecoderConfig&,
50 bool, bool)> NewConfigCB;
48 51
49 // New stream buffers have been parsed. 52 // New stream buffers have been parsed.
50 // First parameter - A queue of newly parsed buffers. 53 // First parameter - A queue of newly parsed buffers.
51 // Return value - True indicates that the buffers are accepted. 54 // Return value - True indicates that the buffers are accepted.
52 // False if something was wrong with the buffers and a parsing 55 // False if something was wrong with the buffers and a parsing
53 // error should be signalled. 56 // error should be signalled.
54 typedef base::Callback<bool(const BufferQueue&)> NewBuffersCB; 57 typedef base::Callback<bool(const BufferQueue&)> NewBuffersCB;
55 58
56 // Signals the beginning of a new media segment. 59 // Signals the beginning of a new media segment.
57 // First parameter - The earliest timestamp of all the streams in the segment. 60 // First parameter - The earliest timestamp of all the streams in the segment.
(...skipping 29 matching lines...) Expand all
87 // Returns true if the parse succeeds. 90 // Returns true if the parse succeeds.
88 virtual bool Parse(const uint8* buf, int size) = 0; 91 virtual bool Parse(const uint8* buf, int size) = 0;
89 92
90 private: 93 private:
91 DISALLOW_COPY_AND_ASSIGN(StreamParser); 94 DISALLOW_COPY_AND_ASSIGN(StreamParser);
92 }; 95 };
93 96
94 } // namespace media 97 } // namespace media
95 98
96 #endif // MEDIA_BASE_STREAM_PARSER_H_ 99 #endif // MEDIA_BASE_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698