diff --git a/NVEncCore/rgy_avutil.cpp b/NVEncCore/rgy_avutil.cpp index 2b875153..8effc15b 100644 --- a/NVEncCore/rgy_avutil.cpp +++ b/NVEncCore/rgy_avutil.cpp @@ -570,7 +570,7 @@ uniuqeRGYChannelLayout getDefaultChannelLayout(const int nb_channels) { return ch_layout; } -int getChannelLayoutIndexFromChannel(const RGYChannelLayout *ch_layout, const AVChannel channel) { +int getChannelLayoutIndexFromChannel(const RGYChannelLayout *ch_layout, const RGYChannel channel) { #if AV_CHANNEL_LAYOUT_STRUCT_AVAIL return av_channel_layout_index_from_channel(ch_layout, channel); #else @@ -578,7 +578,7 @@ int getChannelLayoutIndexFromChannel(const RGYChannelLayout *ch_layout, const AV #endif } -AVChannel getChannelLayoutChannelFromIndex(const RGYChannelLayout *ch_layout, const int index) { +RGYChannel getChannelLayoutChannelFromIndex(const RGYChannelLayout *ch_layout, const int index) { #if AV_CHANNEL_LAYOUT_STRUCT_AVAIL return av_channel_layout_channel_from_index(ch_layout, index); #else diff --git a/NVEncCore/rgy_avutil.h b/NVEncCore/rgy_avutil.h index 558f7986..e3f5e653 100644 --- a/NVEncCore/rgy_avutil.h +++ b/NVEncCore/rgy_avutil.h @@ -85,9 +85,11 @@ extern "C" { #endif #if AV_CHANNEL_LAYOUT_STRUCT_AVAIL +using RGYChannel = AVChannel; using RGYChannelLayout = AVChannelLayout; using uniuqeRGYChannelLayout = std::unique_ptr; #else +using RGYChannel = uint64_t; using RGYChannelLayout = uint64_t; using uniuqeRGYChannelLayout = std::unique_ptr; #endif @@ -376,8 +378,8 @@ uniuqeRGYChannelLayout getChannelLayoutFromString(const std::string& channel_lay //デフォルトのチャンネルレイアウトを取得 uniuqeRGYChannelLayout getDefaultChannelLayout(const int nb_channels); -int getChannelLayoutIndexFromChannel(const RGYChannelLayout *ch_layout, const AVChannel channel); -AVChannel getChannelLayoutChannelFromIndex(const RGYChannelLayout *ch_layout, const int index); +int getChannelLayoutIndexFromChannel(const RGYChannelLayout *ch_layout, const RGYChannel channel); +RGYChannel getChannelLayoutChannelFromIndex(const RGYChannelLayout *ch_layout, const int index); //時刻を表示 std::string getTimestampChar(int64_t ts, const AVRational& timebase);