Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ability to access duration since stream started in StreamInstants

Đang mở
#440 3 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

Read the StreamInstants and InputStreamTimestamp definitions and their tests to see how stream timing is represented and which duration operations are exposed. Compare the three proposed API options against existing conventions; done means enabling access to elapsed time since stream start with an agreed public API and adding coverage for it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello,

I'm attempting to get the timing information returned from the InputStreamTimestamp. The StreamInstants only appears to have methods for getting the Duration since another StreamInstant or for adding and subtracting other Durations.

I would like to find a way to access the duration since the stream started, but it doesn't appear that that is possible with the currently provided methods. If there is another approach that I am missing, I would be extremely grateful for an example.

There are three approaches that would fit my use case and I would be happy to submit a PR if any are acceptable.

  1. Make secs and nanos public.
  2. Make as_nanos(&self) public
  3. Make a new pub fn duration_since_stream_start(&self) -> Duration or some variation of

I appreciate your time and look forward to discussing this further.

Ngôn ngữ chính
Rust
Star
4k
Fork
554
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RustAudio/cpal

Tất cả issue của RustAudio/cpal

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.