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

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

Issue 13886011: media: Add support for playback of VP8 Alpha video streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « media/filters/skcanvas_video_renderer.cc ('k') | media/filters/vpx_video_decoder.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 (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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/demuxer_stream.h" 10 #include "media/base/demuxer_stream.h"
11 #include "media/base/video_decoder.h" 11 #include "media/base/video_decoder.h"
12 #include "media/base/video_frame.h"
12 13
13 struct vpx_codec_ctx; 14 struct vpx_codec_ctx;
14 struct vpx_image; 15 struct vpx_image;
15 16
16 namespace base { 17 namespace base {
17 class MessageLoopProxy; 18 class MessageLoopProxy;
18 } 19 }
19 20
20 namespace media { 21 namespace media {
21 22
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const scoped_refptr<DecoderBuffer>& buffer); 55 const scoped_refptr<DecoderBuffer>& buffer);
55 56
56 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); 57 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer);
57 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, 58 bool Decode(const scoped_refptr<DecoderBuffer>& buffer,
58 scoped_refptr<VideoFrame>* video_frame); 59 scoped_refptr<VideoFrame>* video_frame);
59 60
60 // Reset decoder and call |reset_cb_|. 61 // Reset decoder and call |reset_cb_|.
61 void DoReset(); 62 void DoReset();
62 63
63 void CopyVpxImageTo(const vpx_image* vpx_image, 64 void CopyVpxImageTo(const vpx_image* vpx_image,
65 const struct vpx_image* vpx_image_alpha,
64 scoped_refptr<VideoFrame>* video_frame); 66 scoped_refptr<VideoFrame>* video_frame);
65 67
66 scoped_refptr<base::MessageLoopProxy> message_loop_; 68 scoped_refptr<base::MessageLoopProxy> message_loop_;
67 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; 69 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_;
68 base::WeakPtr<VpxVideoDecoder> weak_this_; 70 base::WeakPtr<VpxVideoDecoder> weak_this_;
69 71
70 DecoderState state_; 72 DecoderState state_;
71 73
72 StatisticsCB statistics_cb_; 74 StatisticsCB statistics_cb_;
73 ReadCB read_cb_; 75 ReadCB read_cb_;
74 base::Closure reset_cb_; 76 base::Closure reset_cb_;
75 77
76 // Pointer to the demuxer stream that will feed us compressed buffers. 78 // Pointer to the demuxer stream that will feed us compressed buffers.
77 scoped_refptr<DemuxerStream> demuxer_stream_; 79 scoped_refptr<DemuxerStream> demuxer_stream_;
78 80
79 vpx_codec_ctx* vpx_codec_; 81 vpx_codec_ctx* vpx_codec_;
82 vpx_codec_ctx* vpx_codec_alpha_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 84 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
82 }; 85 };
83 86
84 } // namespace media 87 } // namespace media
85 88
86 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 89 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/skcanvas_video_renderer.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698