frame_transformer_factory.h (1614B)
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 16 #include "api/frame_transformer_interface.h" 17 #include "rtc_base/system/rtc_export.h" 18 19 // This file contains EXPERIMENTAL functions to create video frames from 20 // either an old video frame or directly from parameters. 21 // These functions will be used in Chrome functionality to manipulate 22 // encoded frames from Javascript. 23 namespace webrtc { 24 25 // TODO(bugs.webrtc.org/14708): Add the required parameters to these APIs. 26 std::unique_ptr<TransformableVideoFrameInterface> CreateVideoSenderFrame(); 27 // TODO(bugs.webrtc.org/14708): Consider whether Receiver frames ever make sense 28 // to create. 29 std::unique_ptr<TransformableVideoFrameInterface> CreateVideoReceiverFrame(); 30 // Creates a new frame with the same metadata as the original. 31 // The original can be a sender or receiver frame. 32 RTC_EXPORT std::unique_ptr<TransformableAudioFrameInterface> CloneAudioFrame( 33 TransformableAudioFrameInterface* original); 34 RTC_EXPORT std::unique_ptr<TransformableVideoFrameInterface> CloneVideoFrame( 35 TransformableVideoFrameInterface* original); 36 } // namespace webrtc 37 38 #endif // API_FRAME_TRANSFORMER_FACTORY_H_