• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 /**
17  * @addtogroup AVImageGenerator
18  * @{
19  *
20  * @brief Provides APIs for generating an image at the specific time from a video resource.
21  *
22  * @syscap SystemCapability.Multimedia.Media.AVImageGenerator
23  * @since 18
24  */
25 
26 /**
27  * @file avimage_generator_base.h
28  *
29  * @brief Defines the structure and enumeration for AVImageGenerator.
30  *
31  * @syscap SystemCapability.Multimedia.Media.AVImageGenerator
32  * @kit MediaKit
33  * @library libavimage_generator.so
34  * @since 18
35  */
36 
37 #ifndef MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_BASE_H
38 #define MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVIMAGE_GENERATOR_BASE_H
39 
40 #include <stdint.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /**
47  * @brief Enumerates the image query options about the relationship between the given timeUs and a key frame.
48  *
49  * @syscap SystemCapability.Multimedia.Media.AVImageGenerator
50  * @since 18
51  */
52 typedef enum OH_AVImageGenerator_QueryOptions {
53     /**
54      * This option is used to fetch a key frame from the given media
55      * resource that is located right after or at the given time.
56      */
57     OH_AVIMAGE_GENERATOR_QUERY_NEXT_SYNC = 0,
58     /**
59      * This option is used to fetch a key frame from the given media
60      * resource that is located right before or at the given time.
61      */
62     OH_AVIMAGE_GENERATOR_QUERY_PREVIOUS_SYNC = 1,
63     /**
64      * This option is used to fetch a key frame from the given media
65      * resource that is located closest to or at the given time.
66      */
67     OH_AVIMAGE_GENERATOR_QUERY_CLOSEST_SYNC = 2,
68     /**
69      * This option is used to fetch a frame (maybe not keyframe) from
70      * the given media resource that is located closest to or at the given time.
71      */
72     OH_AVIMAGE_GENERATOR_QUERY_CLOSEST = 3,
73 } OH_AVImageGenerator_QueryOptions;
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 #endif // MULTIMEDIA_PLAYER_FRAMEWORK_NATIVE_AVMETADATA_EXTRACTOR_BASE_H
79 /** @} */
80