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

Side by Side Diff: media/base/android/video_media_codec_decoder.h

Issue 1682923003: Rename browser side MediaCodec-based decoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reformatted to make bots happy Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ 5 #ifndef MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ 6 #define MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "media/base/android/media_codec_decoder.h" 12 #include "media/base/android/media_codec_decoder.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 #include "ui/gl/android/scoped_java_surface.h" 14 #include "ui/gl/android/scoped_java_surface.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 // Video decoder for MediaCodecPlayer 18 // Video decoder for MediaCodecPlayer
19 class MediaCodecVideoDecoder : public MediaCodecDecoder { 19 class VideoMediaCodecDecoder : public MediaCodecDecoder {
20 public: 20 public:
21 // Typedefs for the notification callbacks 21 // Typedefs for the notification callbacks
22 typedef base::Callback<void(const gfx::Size& video_size)> 22 typedef base::Callback<void(const gfx::Size& video_size)>
23 VideoSizeChangedCallback; 23 VideoSizeChangedCallback;
24 24
25 // For parameters see media_codec_decoder.h 25 // For parameters see media_codec_decoder.h
26 // update_current_time_cb: callback that reports current playback time. 26 // update_current_time_cb: callback that reports current playback time.
27 // Called for released output frame, 27 // Called for released output frame,
28 // video_size_changed_cb: reports the new video size, 28 // video_size_changed_cb: reports the new video size,
29 // codec_created_cb: reports that video codec has been created. A controller 29 // codec_created_cb: reports that video codec has been created. A controller
30 // class might use it to release more resources so that this 30 // class might use it to release more resources so that this
31 // decoder can use them. 31 // decoder can use them.
32 MediaCodecVideoDecoder( 32 VideoMediaCodecDecoder(
33 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner, 33 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner,
34 FrameStatistics* frame_statistics, 34 FrameStatistics* frame_statistics,
35 const base::Closure& request_data_cb, 35 const base::Closure& request_data_cb,
36 const base::Closure& starvation_cb, 36 const base::Closure& starvation_cb,
37 const base::Closure& drained_requested_cb, 37 const base::Closure& drained_requested_cb,
38 const base::Closure& stop_done_cb, 38 const base::Closure& stop_done_cb,
39 const base::Closure& waiting_for_decryption_key_cb, 39 const base::Closure& waiting_for_decryption_key_cb,
40 const base::Closure& error_cb, 40 const base::Closure& error_cb,
41 const SetTimeCallback& update_current_time_cb, 41 const SetTimeCallback& update_current_time_cb,
42 const VideoSizeChangedCallback& video_size_changed_cb); 42 const VideoSizeChangedCallback& video_size_changed_cb);
43 ~MediaCodecVideoDecoder() override; 43 ~VideoMediaCodecDecoder() override;
44 44
45 const char* class_name() const override; 45 const char* class_name() const override;
46 46
47 bool HasStream() const override; 47 bool HasStream() const override;
48 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; 48 void SetDemuxerConfigs(const DemuxerConfigs& configs) override;
49 bool IsContentEncrypted() const override; 49 bool IsContentEncrypted() const override;
50 void ReleaseDecoderResources() override; 50 void ReleaseDecoderResources() override;
51 void ReleaseMediaCodec() override; 51 void ReleaseMediaCodec() override;
52 52
53 // Stores the video surface to use with upcoming Configure() 53 // Stores the video surface to use with upcoming Configure()
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Indices of output buffers that are posted for rendering. 115 // Indices of output buffers that are posted for rendering.
116 std::set<int> delayed_buffers_; 116 std::set<int> delayed_buffers_;
117 117
118 // Associate presentation timestamps with time. 118 // Associate presentation timestamps with time.
119 base::TimeTicks start_time_ticks_; 119 base::TimeTicks start_time_ticks_;
120 base::TimeDelta start_pts_; 120 base::TimeDelta start_pts_;
121 121
122 // Mantain the last seen PTS for stand-alone EOS. 122 // Mantain the last seen PTS for stand-alone EOS.
123 base::TimeDelta last_seen_pts_; 123 base::TimeDelta last_seen_pts_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(MediaCodecVideoDecoder); 125 DISALLOW_COPY_AND_ASSIGN(VideoMediaCodecDecoder);
126 }; 126 };
127 127
128 } // namespace media 128 } // namespace media
129 129
130 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ 130 #endif // MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/android/media_codec_video_decoder.cc ('k') | media/base/android/video_media_codec_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698