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

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

Issue 8352019: Change Read size to a size_t for clarity (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_glue_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // FFmpegGlue is an adapter for FFmpeg's URLProtocol interface that allows us to 5 // FFmpegGlue is an adapter for FFmpeg's URLProtocol interface that allows us to
6 // use a DataSource implementation with FFmpeg. For convenience we use FFmpeg's 6 // use a DataSource implementation with FFmpeg. For convenience we use FFmpeg's
7 // av_open_input_file function, which analyzes the filename given to it and 7 // av_open_input_file function, which analyzes the filename given to it and
8 // automatically initializes the appropriate URLProtocol. 8 // automatically initializes the appropriate URLProtocol.
9 // 9 //
10 // Since the DataSource is already open by time we call av_open_input_file, we 10 // Since the DataSource is already open by time we call av_open_input_file, we
(...skipping 27 matching lines...) Expand all
38 namespace media { 38 namespace media {
39 39
40 class MEDIA_EXPORT FFmpegURLProtocol { 40 class MEDIA_EXPORT FFmpegURLProtocol {
41 public: 41 public:
42 FFmpegURLProtocol() {} 42 FFmpegURLProtocol() {}
43 43
44 virtual ~FFmpegURLProtocol() {} 44 virtual ~FFmpegURLProtocol() {}
45 45
46 // Read the given amount of bytes into data, returns the number of bytes read 46 // Read the given amount of bytes into data, returns the number of bytes read
47 // if successful, kReadError otherwise. 47 // if successful, kReadError otherwise.
48 virtual int Read(int size, uint8* data) = 0; 48 virtual size_t Read(size_t size, uint8* data) = 0;
49 49
50 // Returns true and the current file position for this file, false if the 50 // Returns true and the current file position for this file, false if the
51 // file position could not be retrieved. 51 // file position could not be retrieved.
52 virtual bool GetPosition(int64* position_out) = 0; 52 virtual bool GetPosition(int64* position_out) = 0;
53 53
54 // Returns true if the file position could be set, false otherwise. 54 // Returns true if the file position could be set, false otherwise.
55 virtual bool SetPosition(int64 position) = 0; 55 virtual bool SetPosition(int64 position) = 0;
56 56
57 // Returns true and the file size, false if the file size could not be 57 // Returns true and the file size, false if the file size could not be
58 // retrieved. 58 // retrieved.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 friend class FFmpegGlueTest; 103 friend class FFmpegGlueTest;
104 static URLProtocol* url_protocol(); 104 static URLProtocol* url_protocol();
105 105
106 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue); 106 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue);
107 }; 107 };
108 108
109 } // namespace media 109 } // namespace media
110 110
111 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_ 111 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_glue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698