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

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

Issue 23480036: Support creating secure decoder in MediaCodecBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 years, 3 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
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | media/base/android/video_decoder_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 virtual ~VideoDecoderJob(); 19 virtual ~VideoDecoderJob();
20 20
21 // Create a new VideoDecoderJob instance. 21 // Create a new VideoDecoderJob instance.
22 // |video_codec| - The video format the object needs to decode. 22 // |video_codec| - The video format the object needs to decode.
23 // |size| - The natrual size of the output frames. 23 // |is_secure| - Whether secure decoding is required.
24 // |size| - The natural size of the output frames.
24 // |surface| - The surface to render the frames to. 25 // |surface| - The surface to render the frames to.
25 // |media_crypto| - Handle to a Java object responsible for decrypting the 26 // |media_crypto| - Handle to a Java object responsible for decrypting the
26 // video data. 27 // video data.
27 // |request_data_cb| - Callback used to request more data for the decoder. 28 // |request_data_cb| - Callback used to request more data for the decoder.
28 static VideoDecoderJob* Create( 29 static VideoDecoderJob* Create(const VideoCodec video_codec,
29 const VideoCodec video_codec, const gfx::Size& size, jobject surface, 30 bool is_secure,
30 jobject media_crypto, const base::Closure& request_data_cb); 31 const gfx::Size& size,
32 jobject surface,
33 jobject media_crypto,
34 const base::Closure& request_data_cb);
31 35
32 private: 36 private:
33 VideoDecoderJob(scoped_ptr<VideoCodecBridge> video_codec_bridge, 37 VideoDecoderJob(scoped_ptr<VideoCodecBridge> video_codec_bridge,
34 const base::Closure& request_data_cb); 38 const base::Closure& request_data_cb);
35 39
36 // MediaDecoderJob implementation. 40 // MediaDecoderJob implementation.
37 virtual void ReleaseOutputBuffer( 41 virtual void ReleaseOutputBuffer(
38 int outputBufferIndex, size_t size, 42 int outputBufferIndex, size_t size,
39 const base::TimeDelta& presentation_timestamp, 43 const base::TimeDelta& presentation_timestamp,
40 const MediaDecoderJob::DecoderCallback& callback, 44 const MediaDecoderJob::DecoderCallback& callback,
41 MediaCodecStatus status) OVERRIDE; 45 MediaCodecStatus status) OVERRIDE;
42 46
43 virtual bool ComputeTimeToRender() const OVERRIDE; 47 virtual bool ComputeTimeToRender() const OVERRIDE;
44 48
45 scoped_ptr<VideoCodecBridge> video_codec_bridge_; 49 scoped_ptr<VideoCodecBridge> video_codec_bridge_;
46 }; 50 };
47 51
48 } // namespace media 52 } // namespace media
49 53
50 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ 54 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_
OLDNEW
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | media/base/android/video_decoder_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698