当我检查ffmpeg的源代码时,我看到这一行:
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method
(const AVFormatContext* ctx);
Run Code Online (Sandbox Code Playgroud)
enum这里有什么功能?
enum AVDurationEstimationMethodtogether是函数av_fmt_ctx_get_duration_estimation_method返回的类型
关键字enum与struct和类似union,是表示类型的必要条件.要省略它,请使用typedef:
typedef enum AVDurationEstimationMethod sometype;
Run Code Online (Sandbox Code Playgroud)
然后你就可以使用它:
sometype av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
185 次 |
| 最近记录: |