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

Side by Side Diff: remoting/codec/video_decoder.h

Issue 2088953004: Fix VideoDecoderVpx to use pixel format the consumer wants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « remoting/client/software_video_renderer.cc ('k') | remoting/codec/video_decoder_verbatim.h » ('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 REMOTING_CODEC_VIDEO_DECODER_H_ 5 #ifndef REMOTING_CODEC_VIDEO_DECODER_H_
6 #define REMOTING_CODEC_VIDEO_DECODER_H_ 6 #define REMOTING_CODEC_VIDEO_DECODER_H_
7 7
8
9 namespace webrtc { 8 namespace webrtc {
10 class DesktopFrame; 9 class DesktopFrame;
11 } // namespace webrtc 10 } // namespace webrtc
12 11
13 namespace remoting { 12 namespace remoting {
14 13
15 class VideoPacket; 14 class VideoPacket;
16 15
17 // Interface for a decoder that decodes video packets. 16 // Interface for a decoder that decodes video packets.
18 class VideoDecoder { 17 class VideoDecoder {
19 public: 18 public:
19 // List of supported pixel formats needed by various platforms.
20 enum class PixelFormat { BGRA, RGBA };
Lambros 2016/06/24 01:13:58 Seems a bit weird having this enumeration in two p
Sergey Ulanov 2016/06/24 02:01:09 I agree. The proper place for this enum would be w
21
20 VideoDecoder() {} 22 VideoDecoder() {}
21 virtual ~VideoDecoder() {} 23 virtual ~VideoDecoder() {}
22 24
25 virtual void SetPixelFormat(PixelFormat pixel_format) = 0;
26
23 // Decodes a video frame. Returns false in case of a failure. The caller must 27 // Decodes a video frame. Returns false in case of a failure. The caller must
24 // pre-allocate a |frame| with the size specified in the |packet|. 28 // pre-allocate a |frame| with the size specified in the |packet|.
25 virtual bool DecodePacket(const VideoPacket& packet, 29 virtual bool DecodePacket(const VideoPacket& packet,
26 webrtc::DesktopFrame* frame) = 0; 30 webrtc::DesktopFrame* frame) = 0;
27 }; 31 };
28 32
29 } // namespace remoting 33 } // namespace remoting
30 34
31 #endif // REMOTING_CODEC_VIDEO_DECODER_H_ 35 #endif // REMOTING_CODEC_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « remoting/client/software_video_renderer.cc ('k') | remoting/codec/video_decoder_verbatim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698