• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     PREPARED,
37     STARTED,
38     PAUSED,
39     STOPPED,
40     PLAYBACK_COMPLETE,
41     NONE
42 };
43 
44 // video playback speed
45 enum class PlaybackSpeed {
46     /* Video playback at 0.75x normal speed */
47     SPEED_FORWARD_0_75_X = 0,
48     /* Video playback at 1.00x normal speed */
49     SPEED_FORWARD_1_00_X,
50     /* Video playback at 1.25x normal speed */
51     SPEED_FORWARD_1_25_X,
52     /* Video playback at 1.75x normal speed */
53     SPEED_FORWARD_1_75_X,
54     /* Video playback at 2.00x normal speed */
55     SPEED_FORWARD_2_00_X,
56 };
57 
58 } // namespace OHOS::Ace
59 
60 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_VIDEO_VIDEO_UTILS_H
61