Skip to content

Commit

Permalink
名前のなかった引数に名前を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoho committed Sep 3, 2023
1 parent 93ccc49 commit be9f0b5
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/sora_sdk_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,35 +179,43 @@ NB_MODULE(sora_sdk_ext, m) {
.def("set_enabled", &SoraTrackInterface::set_enabled, "enable"_a);

nb::class_<SoraAudioSource, SoraTrackInterface>(m, "SoraAudioSource")
.def("on_data", nb::overload_cast<const int16_t*, size_t, double>(
&SoraAudioSource::OnData))
.def("on_data",
nb::overload_cast<const int16_t*, size_t>(&SoraAudioSource::OnData))
nb::overload_cast<const int16_t*, size_t, double>(
&SoraAudioSource::OnData),
"data"_a, "samples_per_channel"_a, "timestamp"_a)
.def("on_data",
nb::overload_cast<const int16_t*, size_t>(&SoraAudioSource::OnData),
"data"_a, "samples_per_channel"_a)
.def("on_data",
nb::overload_cast<nb::ndarray<int16_t, nb::shape<nb::any, nb::any>,
nb::c_contig, nb::device::cpu>,
double>(&SoraAudioSource::OnData))
double>(&SoraAudioSource::OnData),
"ndarray"_a, "timestamp"_a)
.def("on_data",
nb::overload_cast<nb::ndarray<int16_t, nb::shape<nb::any, nb::any>,
nb::c_contig, nb::device::cpu>>(
&SoraAudioSource::OnData));
&SoraAudioSource::OnData),
"ndarray"_a);

nb::class_<SoraVideoSource, SoraTrackInterface>(m, "SoraVideoSource")
.def(
"on_captured",
nb::overload_cast<nb::ndarray<uint8_t, nb::shape<nb::any, nb::any, 3>,
nb::c_contig, nb::device::cpu>>(
&SoraVideoSource::OnCaptured))
&SoraVideoSource::OnCaptured),
"ndarray"_a)
.def(
"on_captured",
nb::overload_cast<nb::ndarray<uint8_t, nb::shape<nb::any, nb::any, 3>,
nb::c_contig, nb::device::cpu>,
double>(&SoraVideoSource::OnCaptured))
double>(&SoraVideoSource::OnCaptured),
"ndarray"_a, "timestamp"_a)
.def(
"on_captured",
nb::overload_cast<nb::ndarray<uint8_t, nb::shape<nb::any, nb::any, 3>,
nb::c_contig, nb::device::cpu>,
int64_t>(&SoraVideoSource::OnCaptured));
int64_t>(&SoraVideoSource::OnCaptured),
"ndarray"_a, "timestamp_us"_a);

nb::class_<SoraAudioSinkImpl>(m, "SoraAudioSinkImpl",
nb::type_slots(audio_sink_slots))
Expand Down

0 comments on commit be9f0b5

Please sign in to comment.