1 /* 2 * Copyright 2022 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef API_FRAME_TRANSFORMER_FACTORY_H_ 12 #define API_FRAME_TRANSFORMER_FACTORY_H_ 13 14 #include <memory> 15 #include <vector> 16 17 #include "api/frame_transformer_interface.h" 18 #include "api/scoped_refptr.h" 19 #include "api/video/encoded_frame.h" 20 #include "api/video/video_frame_metadata.h" 21 22 // This file contains EXPERIMENTAL functions to create video frames from 23 // either an old video frame or directly from parameters. 24 // These functions will be used in Chrome functionality to manipulate 25 // encoded frames from Javascript. 26 namespace webrtc { 27 28 // TODO(bugs.webrtc.org/14708): Add the required parameters to these APIs. 29 std::unique_ptr<TransformableVideoFrameInterface> CreateVideoSenderFrame(); 30 // TODO(bugs.webrtc.org/14708): Consider whether Receiver frames ever make sense 31 // to create. 32 std::unique_ptr<TransformableVideoFrameInterface> CreateVideoReceiverFrame(); 33 // Creates a new frame with the same metadata as the original. 34 // The original can be a sender or receiver frame. 35 RTC_EXPORT std::unique_ptr<TransformableVideoFrameInterface> CloneVideoFrame( 36 TransformableVideoFrameInterface* original); 37 } // namespace webrtc 38 39 #endif // API_FRAME_TRANSFORMER_FACTORY_H_ 40