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

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

Issue 7203002: Adding ChunkDemuxer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 9 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FILTERS_BUFFER_URL_PROTOCOL_H_
6 #define MEDIA_FILTERS_BUFFER_URL_PROTOCOL_H_
7
8 #include "media/filters/ffmpeg_glue.h"
9
10 #include "base/basictypes.h"
11
12 namespace media {
13
14 // Simple FFmpegURLProtocol that reads from a buffer.
15 // NOTE: This object does not copy the buffer so the
16 // buffer pointer passed into the constructor
17 // needs to remain valid for the entire lifetime of
18 // this object.
19 class BufferUrlProtocol : public FFmpegURLProtocol {
scherkus (not reviewing) 2011/06/23 18:50:18 I had a feeling this code looked oddly familiar...
acolwell GONE FROM CHROMIUM 2011/06/23 22:42:17 Done.
20 public:
21 BufferUrlProtocol(const uint8* buf, int size, bool streaming);
22 virtual ~BufferUrlProtocol();
23
24 // FFmpegURLProtocol methods.
25 virtual int Read(int size, uint8* data);
26 virtual bool GetPosition(int64* position_out);
27 virtual bool SetPosition(int64 position);
28 virtual bool GetSize(int64* size_out);
29 virtual bool IsStreaming();
30
31 private:
32 const uint8* buf_;
33 int size_;
34 int offset_;
35 bool streaming_;
36
37 DISALLOW_IMPLICIT_CONSTRUCTORS(BufferUrlProtocol);
38 };
39
40 }
scherkus (not reviewing) 2011/06/23 18:50:18 // namespace media
acolwell GONE FROM CHROMIUM 2011/06/23 22:42:17 Done.
41
42 #endif // MEDIA_FILTERS_BUFFER_URL_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698