brykt@google.com | f556890 | 2012-12-20 11:42:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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 | |
kjellander | d2b63cf | 2017-06-30 03:04:59 -0700 | [diff] [blame] | 11 | #ifndef WEBRTC_RTC_TOOLS_FRAME_EDITING_FRAME_EDITING_LIB_H_ |
| 12 | #define WEBRTC_RTC_TOOLS_FRAME_EDITING_FRAME_EDITING_LIB_H_ |
brykt@google.com | f556890 | 2012-12-20 11:42:45 +0000 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | namespace webrtc { |
| 17 | |
| 18 | // Frame numbering starts at 1. The set of frames to be processed includes the |
| 19 | // frame with the number: first_frame_to_process and last_frame_to_process. |
| 20 | // Interval specifies with what interval frames should be cut or kept. |
| 21 | // Example 1: |
| 22 | // If one clip has 10 frames (1 to 10), and you specify |
| 23 | // first_frame_to_process = 4, last_frame_to_process = 7 and interval = -1, |
| 24 | // then you will get a clip that contains frame 1, 2, 3, 8, 9 and 10. |
| 25 | // Example 2: |
| 26 | // I you specify first_frame_to_process = 1, last_frame_to_process = 10 and |
| 27 | // interval = -4, then you will get a clip that contains frame 1, 5, 9. |
| 28 | // Example 3: |
| 29 | // If you specify first_frame_to_process = 4, last_frame_to_process = 7 and |
| 30 | // interval = 2, then you will get a clip that contains frame |
| 31 | // 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9 and 10. |
| 32 | // No interpolation is done when up-sampling. |
| 33 | |
| 34 | int EditFrames(const std::string& in_path, int width, int height, |
| 35 | int first_frame_to_process, int interval, |
| 36 | int last_frame_to_process, const std::string& out_path); |
| 37 | } // namespace webrtc |
| 38 | |
kjellander | d2b63cf | 2017-06-30 03:04:59 -0700 | [diff] [blame] | 39 | #endif // WEBRTC_RTC_TOOLS_FRAME_EDITING_FRAME_EDITING_LIB_H_ |