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

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

Issue 2837613004: media: Support better decoder switching (Closed)
Patch Set: Mock*Decoder name Created 3 years, 7 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
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_VIDEO_DECODER_H_ 5 #ifndef MEDIA_BASE_VIDEO_DECODER_H_
6 #define MEDIA_BASE_VIDEO_DECODER_H_ 6 #define MEDIA_BASE_VIDEO_DECODER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 26 matching lines...) Expand all
37 typedef base::Callback<void(DecodeStatus)> DecodeCB; 37 typedef base::Callback<void(DecodeStatus)> DecodeCB;
38 38
39 VideoDecoder(); 39 VideoDecoder();
40 40
41 // Fires any pending callbacks, stops and destroys the decoder. 41 // Fires any pending callbacks, stops and destroys the decoder.
42 // Note: Since this is a destructor, |this| will be destroyed after this call. 42 // Note: Since this is a destructor, |this| will be destroyed after this call.
43 // Make sure the callbacks fired from this call doesn't post any task that 43 // Make sure the callbacks fired from this call doesn't post any task that
44 // depends on |this|. 44 // depends on |this|.
45 virtual ~VideoDecoder(); 45 virtual ~VideoDecoder();
46 46
47 // Returns the name of the decoder for logging purpose. 47 // Returns the name of the decoder for logging and decoder selection purposes.
48 // This name should be available immediately after construction (e.g. before
49 // Initialize() is called). It should also be stable in the sense that the
50 // name does not change across multiple constructions.
48 virtual std::string GetDisplayName() const = 0; 51 virtual std::string GetDisplayName() const = 0;
49 52
50 // Initializes a VideoDecoder with the given |config|, executing the 53 // Initializes a VideoDecoder with the given |config|, executing the
51 // |init_cb| upon completion. |output_cb| is called for each output frame 54 // |init_cb| upon completion. |output_cb| is called for each output frame
52 // decoded by Decode(). 55 // decoded by Decode().
53 // 56 //
54 // If |low_delay| is true then the decoder is not allowed to queue frames, 57 // If |low_delay| is true then the decoder is not allowed to queue frames,
55 // except for out-of-order frames, i.e. if the next frame can be returned it 58 // except for out-of-order frames, i.e. if the next frame can be returned it
56 // must be returned without waiting for Decode() to be called again. 59 // must be returned without waiting for Decode() to be called again.
57 // Initialization should fail if |low_delay| is true and the decoder cannot 60 // Initialization should fail if |low_delay| is true and the decoder cannot
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Returns maximum number of parallel decode requests. 116 // Returns maximum number of parallel decode requests.
114 virtual int GetMaxDecodeRequests() const; 117 virtual int GetMaxDecodeRequests() const;
115 118
116 private: 119 private:
117 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); 120 DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
118 }; 121 };
119 122
120 } // namespace media 123 } // namespace media
121 124
122 #endif // MEDIA_BASE_VIDEO_DECODER_H_ 125 #endif // MEDIA_BASE_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698