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

Side by Side Diff: content/renderer/media/webrtc/video_destination_handler.h

Issue 675513002: PepperVideoSourceHost: Change endianness of color format of frames sent to the plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | content/renderer/media/webrtc/video_destination_handler.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_RENDERER_MEDIA_WEBRTC_VIDEO_DESTINATION_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_VIDEO_DESTINATION_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_VIDEO_DESTINATION_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_VIDEO_DESTINATION_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 int max_requested_width, 53 int max_requested_width,
54 int max_requested_height, 54 int max_requested_height,
55 double max_requested_frame_rate, 55 double max_requested_frame_rate,
56 const VideoCaptureDeviceFormatsCB& callback) override; 56 const VideoCaptureDeviceFormatsCB& callback) override;
57 void StartSourceImpl( 57 void StartSourceImpl(
58 const media::VideoCaptureFormat& format, 58 const media::VideoCaptureFormat& format,
59 const VideoCaptureDeliverFrameCB& frame_callback) override; 59 const VideoCaptureDeliverFrameCB& frame_callback) override;
60 void StopSourceImpl() override; 60 void StopSourceImpl() override;
61 61
62 private: 62 private:
63 // Endian in memory order, e.g. AXXX stands for uint8 pixel[4] = {A, x, x, x};
64 enum PixelEndian {
65 UNKNOWN,
66 AXXX,
67 XXXA,
68 };
69
70 media::VideoFramePool frame_pool_; 63 media::VideoFramePool frame_pool_;
71 64
72 class FrameWriterDelegate; 65 class FrameWriterDelegate;
73 scoped_refptr<FrameWriterDelegate> delegate_; 66 scoped_refptr<FrameWriterDelegate> delegate_;
74 PixelEndian endian_;
75 67
76 DISALLOW_COPY_AND_ASSIGN(PpFrameWriter); 68 DISALLOW_COPY_AND_ASSIGN(PpFrameWriter);
77 }; 69 };
78 70
79 // VideoDestinationHandler is a glue class between the content MediaStream and 71 // VideoDestinationHandler is a glue class between the content MediaStream and
80 // the effects pepper plugin host. 72 // the effects pepper plugin host.
81 class CONTENT_EXPORT VideoDestinationHandler { 73 class CONTENT_EXPORT VideoDestinationHandler {
82 public: 74 public:
83 // Instantiates and adds a new video track to the MediaStream specified by 75 // Instantiates and adds a new video track to the MediaStream specified by
84 // |url|. Returns a handler for delivering frames to the new video track as 76 // |url|. Returns a handler for delivering frames to the new video track as
85 // |frame_writer|. 77 // |frame_writer|.
86 // If |registry| is NULL the global blink::WebMediaStreamRegistry will be 78 // If |registry| is NULL the global blink::WebMediaStreamRegistry will be
87 // used to look up the media stream. 79 // used to look up the media stream.
88 // The caller of the function takes the ownership of |frame_writer|. 80 // The caller of the function takes the ownership of |frame_writer|.
89 // Returns true on success and false on failure. 81 // Returns true on success and false on failure.
90 static bool Open(MediaStreamRegistryInterface* registry, 82 static bool Open(MediaStreamRegistryInterface* registry,
91 const std::string& url, 83 const std::string& url,
92 FrameWriterInterface** frame_writer); 84 FrameWriterInterface** frame_writer);
93 85
94 private: 86 private:
95 DISALLOW_COPY_AND_ASSIGN(VideoDestinationHandler); 87 DISALLOW_COPY_AND_ASSIGN(VideoDestinationHandler);
96 }; 88 };
97 89
98 } // namespace content 90 } // namespace content
99 91
100 #endif // CONTENT_RENDERER_MEDIA_VIDEO_DESTINATION_HANDLER_H_ 92 #endif // CONTENT_RENDERER_MEDIA_VIDEO_DESTINATION_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc/video_destination_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698