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

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

Issue 11420070: Remove locking from FFmpegDemuxerStream and associated TODOs from media code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | 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_FILTERS_FFMPEG_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/decryptor.h" 10 #include "media/base/decryptor.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 enum DecoderState { 49 enum DecoderState {
50 kUninitialized, 50 kUninitialized,
51 kNormal, 51 kNormal,
52 kFlushCodec, 52 kFlushCodec,
53 kDecodeFinished 53 kDecodeFinished
54 }; 54 };
55 55
56 // Carries out the reading operation scheduled by Read(). 56 // Carries out the reading operation scheduled by Read().
57 void DoRead(const ReadCB& read_cb); 57 void DoRead(const ReadCB& read_cb);
58 58
59 // Reads from the demuxer stream with corresponding callback method. 59 // Reads from the demuxer stream.
60 void ReadFromDemuxerStream(); 60 void ReadFromDemuxerStream();
61 void DecryptOrDecodeBuffer(DemuxerStream::Status status,
62 const scoped_refptr<DecoderBuffer>& buffer);
63 61
64 // Carries out the buffer processing operation scheduled by 62 // Carries out the buffer processing operation scheduled by
65 // DecryptOrDecodeBuffer(). 63 // DecryptOrDecodeBuffer().
66 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status, 64 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status,
67 const scoped_refptr<DecoderBuffer>& buffer); 65 const scoped_refptr<DecoderBuffer>& buffer);
68 66
69 // Callback called by the decryptor to deliver decrypted data buffer and 67 // Callback called by the decryptor to deliver decrypted data buffer and
70 // reporting decrypt status. This callback could be called synchronously or 68 // reporting decrypt status. This callback could be called synchronously or
71 // asynchronously. 69 // asynchronously.
72 void BufferDecrypted(Decryptor::Status decrypt_status, 70 void BufferDecrypted(Decryptor::Status decrypt_status,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 scoped_refptr<DemuxerStream> demuxer_stream_; 109 scoped_refptr<DemuxerStream> demuxer_stream_;
112 110
113 Decryptor* decryptor_; 111 Decryptor* decryptor_;
114 112
115 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 113 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
116 }; 114 };
117 115
118 } // namespace media 116 } // namespace media
119 117
120 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 118 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698