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

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

Issue 623363002: Send metadata change to renderer after decoder is drained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix clang build Created 6 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"
(...skipping 17 matching lines...) Expand all
28 virtual ~VideoDecoderJob(); 28 virtual ~VideoDecoderJob();
29 29
30 // Passes a java surface object to the codec. Returns true if the surface 30 // Passes a java surface object to the codec. Returns true if the surface
31 // can be used by the decoder, or false otherwise. 31 // can be used by the decoder, or false otherwise.
32 bool SetVideoSurface(gfx::ScopedJavaSurface surface); 32 bool SetVideoSurface(gfx::ScopedJavaSurface surface);
33 33
34 // MediaDecoderJob implementation. 34 // MediaDecoderJob implementation.
35 virtual bool HasStream() const override; 35 virtual bool HasStream() const override;
36 virtual void Flush() override; 36 virtual void Flush() override;
37 virtual void ReleaseDecoderResources() override; 37 virtual void ReleaseDecoderResources() override;
38 virtual void SetDemuxerConfigs(const DemuxerConfigs& configs) override;
38 39
39 bool next_video_data_is_iframe() { 40 bool next_video_data_is_iframe() {
40 return next_video_data_is_iframe_; 41 return next_video_data_is_iframe_;
41 } 42 }
42 43
43 int width() const { return width_; } 44 int output_width() const { return output_width_; }
44 int height() const { return height_; } 45 int output_height() const { return output_height_; }
45 46
46 private: 47 private:
47 // MediaDecoderJob implementation. 48 // MediaDecoderJob implementation.
48 virtual void ReleaseOutputBuffer( 49 virtual void ReleaseOutputBuffer(
49 int output_buffer_index, 50 int output_buffer_index,
50 size_t size, 51 size_t size,
51 bool render_output, 52 bool render_output,
52 base::TimeDelta current_presentation_timestamp, 53 base::TimeDelta current_presentation_timestamp,
53 const ReleaseOutputCompletionCallback& callback) override; 54 const ReleaseOutputCompletionCallback& callback) override;
54 virtual bool ComputeTimeToRender() const override; 55 virtual bool ComputeTimeToRender() const override;
55 virtual void UpdateDemuxerConfigs(const DemuxerConfigs& configs) override;
56 virtual bool IsCodecReconfigureNeeded( 56 virtual bool IsCodecReconfigureNeeded(
57 const DemuxerConfigs& configs) const override; 57 const DemuxerConfigs& configs) const override;
58 virtual bool AreDemuxerConfigsChanged( 58 virtual bool AreDemuxerConfigsChanged(
59 const DemuxerConfigs& configs) const override; 59 const DemuxerConfigs& configs) const override;
60 virtual bool CreateMediaCodecBridgeInternal() override; 60 virtual bool CreateMediaCodecBridgeInternal() override;
61 virtual void CurrentDataConsumed(bool is_config_change) override; 61 virtual void CurrentDataConsumed(bool is_config_change) override;
62 virtual bool UpdateOutputFormat() override;
62 63
63 // Returns true if a protected surface is required for video playback. 64 // Returns true if a protected surface is required for video playback.
64 bool IsProtectedSurfaceRequired(); 65 bool IsProtectedSurfaceRequired();
65 66
66 // Video configs from the demuxer. 67 // Video configs from the demuxer.
67 VideoCodec video_codec_; 68 VideoCodec video_codec_;
68 int width_; 69 int config_width_;
69 int height_; 70 int config_height_;
71
72 // Video output format.
73 int output_width_;
74 int output_height_;
70 75
71 // The surface object currently owned by the player. 76 // The surface object currently owned by the player.
72 gfx::ScopedJavaSurface surface_; 77 gfx::ScopedJavaSurface surface_;
73 78
74 // Callbacks to inform the caller about decoder resources change. 79 // Callbacks to inform the caller about decoder resources change.
75 base::Closure request_resources_cb_; 80 base::Closure request_resources_cb_;
76 base::Closure release_resources_cb_; 81 base::Closure release_resources_cb_;
77 82
78 // Track whether the next access unit is an I-frame. The first access 83 // Track whether the next access unit is an I-frame. The first access
79 // unit after Flush() and CurrentDataConsumed(true) is guaranteed to be an 84 // unit after Flush() and CurrentDataConsumed(true) is guaranteed to be an
80 // I-frame. 85 // I-frame.
81 bool next_video_data_is_iframe_; 86 bool next_video_data_is_iframe_;
82 87
83 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); 88 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob);
84 }; 89 };
85 90
86 } // namespace media 91 } // namespace media
87 92
88 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ 93 #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