| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E
NCODER_H_ | 5 #ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E
NCODER_H_ |
| 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E
NCODER_H_ | 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E
NCODER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 gfx::Size frame_size; | 45 gfx::Size frame_size; |
| 46 int frame_rate; | 46 int frame_rate; |
| 47 int bit_rate; | 47 int bit_rate; |
| 48 wds::H264Profile profile; | 48 wds::H264Profile profile; |
| 49 wds::H264Level level; | 49 wds::H264Level level; |
| 50 // Video Encode Accelerator (VEA) specific parameters. | 50 // Video Encode Accelerator (VEA) specific parameters. |
| 51 CreateEncodeMemoryCallback create_memory_callback; | 51 CreateEncodeMemoryCallback create_memory_callback; |
| 52 CreateVideoEncodeAcceleratorCallback vea_create_callback; | 52 CreateVideoEncodeAcceleratorCallback vea_create_callback; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Returns the list of supported video encoder profiles |
| 56 // for the given frame size and frame rate. |
| 57 // If hight profile is supported it is to be first in the list. |
| 58 static std::vector<wds::H264Profile> FindSupportedProfiles( |
| 59 const gfx::Size& frame_size, |
| 60 int32_t frame_rate); |
| 61 |
| 55 // A factory method that creates a new encoder instance from the given | 62 // A factory method that creates a new encoder instance from the given |
| 56 // |params|, the encoder instance is returned as an argument of | 63 // |params|, the encoder instance is returned as an argument of |
| 57 // |result_callback| ('nullptr' argument means encoder creation failure). | 64 // |result_callback| ('nullptr' argument means encoder creation failure). |
| 58 static void Create(const InitParameters& params, | 65 static void Create(const InitParameters& params, |
| 59 const VideoEncoderCallback& encoder_callback); | 66 const VideoEncoderCallback& encoder_callback); |
| 60 | 67 |
| 61 // WiFiDisplayMediaEncoder | 68 // WiFiDisplayMediaEncoder |
| 62 WiFiDisplayElementaryStreamInfo CreateElementaryStreamInfo() const final; | 69 WiFiDisplayElementaryStreamInfo CreateElementaryStreamInfo() const final; |
| 63 | 70 |
| 64 // Encodes the given raw frame. The resulting encoded frame is passed | 71 // Encodes the given raw frame. The resulting encoded frame is passed |
| (...skipping 30 matching lines...) Expand all Loading... |
| 95 bool send_idr) = 0; | 102 bool send_idr) = 0; |
| 96 | 103 |
| 97 std::vector<WiFiDisplayElementaryStreamDescriptor> descriptors_; | 104 std::vector<WiFiDisplayElementaryStreamDescriptor> descriptors_; |
| 98 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 105 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
| 99 bool send_idr_; | 106 bool send_idr_; |
| 100 }; | 107 }; |
| 101 | 108 |
| 102 } // namespace extensions | 109 } // namespace extensions |
| 103 | 110 |
| 104 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE
O_ENCODER_H_ | 111 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE
O_ENCODER_H_ |
| OLD | NEW |