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

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

Issue 1372203002: Throttle media decoding after excessive Android media server crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new infobar text per UI review Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIDEO_DECODER_JOB_H_ 5 #ifndef MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_
6 #define MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ 6 #define MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "media/base/android/media_decoder_job.h" 10 #include "media/base/android/media_decoder_job.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 class VideoCodecBridge; 14 class VideoCodecBridge;
15 15
16 // Class for managing video decoding jobs. 16 // Class for managing video decoding jobs.
17 class VideoDecoderJob : public MediaDecoderJob { 17 class VideoDecoderJob : public MediaDecoderJob {
18 public: 18 public:
19 // Create a new VideoDecoderJob instance. 19 // Create a new VideoDecoderJob instance.
20 // |request_data_cb| - Callback used to request more data for the decoder. 20 // |request_data_cb| - Callback used to request more data for the decoder.
21 // |request_resources_cb| - Callback used to request resources.
22 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that 21 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that
23 // demuxer config has changed. 22 // demuxer config has changed.
24 VideoDecoderJob(const base::Closure& request_data_cb, 23 VideoDecoderJob(const base::Closure& request_data_cb,
25 const base::Closure& request_resources_cb,
26 const base::Closure& on_demuxer_config_changed_cb, 24 const base::Closure& on_demuxer_config_changed_cb,
27 FrameStatistics* frame_statistics); 25 FrameStatistics* frame_statistics);
28 ~VideoDecoderJob() override; 26 ~VideoDecoderJob() override;
29 27
30 // Passes a java surface object to the codec. Returns true if the surface 28 // Passes a java surface object to the codec. Returns true if the surface
31 // can be used by the decoder, or false otherwise. 29 // can be used by the decoder, or false otherwise.
32 bool SetVideoSurface(gfx::ScopedJavaSurface surface); 30 bool SetVideoSurface(gfx::ScopedJavaSurface surface);
33 31
34 // MediaDecoderJob implementation. 32 // MediaDecoderJob implementation.
35 bool HasStream() const override; 33 bool HasStream() const override;
(...skipping 26 matching lines...) Expand all
62 int config_width_; 60 int config_width_;
63 int config_height_; 61 int config_height_;
64 62
65 // Video output format. 63 // Video output format.
66 int output_width_; 64 int output_width_;
67 int output_height_; 65 int output_height_;
68 66
69 // The surface object currently owned by the player. 67 // The surface object currently owned by the player.
70 gfx::ScopedJavaSurface surface_; 68 gfx::ScopedJavaSurface surface_;
71 69
72 // Callbacks to inform the caller about decoder resources change.
73 base::Closure request_resources_cb_;
74 base::Closure release_resources_cb_;
75
76 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); 70 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob);
77 }; 71 };
78 72
79 } // namespace media 73 } // namespace media
80 74
81 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ 75 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_
OLDNEW
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | media/base/android/video_decoder_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698