1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_VIDEO_VIDEO_UTILS_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_VIDEO_VIDEO_UTILS_H
18 
19 namespace OHOS::Ace {
20 
21 enum class SeekMode {
22     /* sync to keyframes before the time point. */
23     SEEK_PREVIOUS_SYNC = 0,
24     /* sync to keyframes after the time point. */
25     SEEK_NEXT_SYNC,
26     /* sync to closest keyframes. */
27     SEEK_CLOSEST_SYNC,
28     /* seek to frames closest the time point. */
29     SEEK_CLOSEST,
30 };
31 
32 // video playback status
33 enum class PlaybackStatus {
34     ERROR = 0,
35     IDLE,
36     INITIALIZED,
37     PREPARED,
38     STARTED,
39     PAUSED,
40     STOPPED,
41     PLAYBACK_COMPLETE,
42     NONE
43 };
44 
45 // video playback speed
46 enum class PlaybackSpeed {
47     /* Video playback at 0.75x normal speed */
48     SPEED_FORWARD_0_75_X = 0,
49     /* Video playback at 1.00x normal speed */
50     SPEED_FORWARD_1_00_X,
51     /* Video playback at 1.25x normal speed */
52     SPEED_FORWARD_1_25_X,
53     /* Video playback at 1.75x normal speed */
54     SPEED_FORWARD_1_75_X,
55     /* Video playback at 2.00x normal speed */
56     SPEED_FORWARD_2_00_X,
57 };
58 
59 } // namespace OHOS::Ace
60 
61 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_VIDEO_VIDEO_UTILS_H
62