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

Side by Side Diff: media/filters/vpx_video_decoder.h

Issue 1520313002: Don't assume correct image format in CopyVpxImageToVideoFrame() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | media/filters/vpx_video_decoder.cc » ('j') | media/filters/vpx_video_decoder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FILTERS_VPX_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "media/base/demuxer_stream.h" 10 #include "media/base/demuxer_stream.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool ConfigureDecoder(const VideoDecoderConfig& config); 59 bool ConfigureDecoder(const VideoDecoderConfig& config);
60 60
61 void CloseDecoder(); 61 void CloseDecoder();
62 62
63 // Try to decode |buffer| into |video_frame|. Return true if all decoding 63 // Try to decode |buffer| into |video_frame|. Return true if all decoding
64 // succeeded. Note that decoding can succeed and still |video_frame| be 64 // succeeded. Note that decoding can succeed and still |video_frame| be
65 // nullptr if there has been a partial decoding. 65 // nullptr if there has been a partial decoding.
66 bool VpxDecode(const scoped_refptr<DecoderBuffer>& buffer, 66 bool VpxDecode(const scoped_refptr<DecoderBuffer>& buffer,
67 scoped_refptr<VideoFrame>* video_frame); 67 scoped_refptr<VideoFrame>* video_frame);
68 68
69 void CopyVpxImageToVideoFrame(const struct vpx_image* vpx_image, 69 bool CopyVpxImageToVideoFrame(const struct vpx_image* vpx_image,
70 scoped_refptr<VideoFrame>* video_frame); 70 scoped_refptr<VideoFrame>* video_frame);
71 71
72 base::ThreadChecker thread_checker_; 72 base::ThreadChecker thread_checker_;
73 73
74 DecoderState state_; 74 DecoderState state_;
75 75
76 OutputCB output_cb_; 76 OutputCB output_cb_;
77 77
78 VideoDecoderConfig config_; 78 VideoDecoderConfig config_;
79 79
80 vpx_codec_ctx* vpx_codec_; 80 vpx_codec_ctx* vpx_codec_;
81 vpx_codec_ctx* vpx_codec_alpha_; 81 vpx_codec_ctx* vpx_codec_alpha_;
82 82
83 // |memory_pool_| is a single-threaded memory pool used for VP9 decoding 83 // |memory_pool_| is a single-threaded memory pool used for VP9 decoding
84 // with no alpha. |frame_pool_| is used for all other cases. 84 // with no alpha. |frame_pool_| is used for all other cases.
85 class MemoryPool; 85 class MemoryPool;
86 scoped_refptr<MemoryPool> memory_pool_; 86 scoped_refptr<MemoryPool> memory_pool_;
87 87
88 VideoFramePool frame_pool_; 88 VideoFramePool frame_pool_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 90 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
91 }; 91 };
92 92
93 } // namespace media 93 } // namespace media
94 94
95 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 95 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/vpx_video_decoder.cc » ('j') | media/filters/vpx_video_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698