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

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

Issue 12263013: media: Add support for playback of VP8 Alpha video streams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor fixes Created 7 years, 10 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
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/ref_counted.h" 9 #include "base/memory/ref_counted.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status, 56 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status,
56 const scoped_refptr<DecoderBuffer>& buffer); 57 const scoped_refptr<DecoderBuffer>& buffer);
57 58
58 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); 59 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer);
59 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, 60 bool Decode(const scoped_refptr<DecoderBuffer>& buffer,
60 scoped_refptr<VideoFrame>* video_frame); 61 scoped_refptr<VideoFrame>* video_frame);
61 62
62 // Reset decoder and call |reset_cb_|. 63 // Reset decoder and call |reset_cb_|.
63 void DoReset(); 64 void DoReset();
64 65
65 void CopyVpxImageTo(const vpx_image* vpx_image, 66 void CopyVpxImageTo(const struct vpx_image* vpx_image,
67 const struct vpx_image* vpx_image_alpha,
66 scoped_refptr<VideoFrame>* video_frame); 68 scoped_refptr<VideoFrame>* video_frame);
67 69
68 scoped_refptr<base::MessageLoopProxy> message_loop_; 70 scoped_refptr<base::MessageLoopProxy> message_loop_;
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_;
scherkus (not reviewing) 2013/02/22 23:18:01 hmm.. it looks like both of these can use scoped_p
vignesh 2013/02/25 21:51:42 To do this, the libvpx includes should be moved fr
82 vpx_codec_ctx* vpx_codec_alpha_;
83 VideoFrame::Format format_;
80 84
81 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 85 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
82 }; 86 };
83 87
84 } // namespace media 88 } // namespace media
85 89
86 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 90 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698