Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vp9 encoder returns null packets #6

Open
githubquestions opened this issue Jun 9, 2020 · 1 comment
Open

vp9 encoder returns null packets #6

githubquestions opened this issue Jun 9, 2020 · 1 comment

Comments

@githubquestions
Copy link

githubquestions commented Jun 9, 2020

vpx_codec_get_cx_data returning null any ideas

@githubquestions
Copy link
Author

update: got this to work using env-libvpx-sys fork from this fork, but still struggling to get audio to work. cpal updated its API to get rid of event loop, so instead using build_input_stream.
Pretty sure

let s2 = interpolate::Converter::from_hz_to_hz(
                          signal::from_interleaved_samples_iter::<_, [_; $chan]>($signal),
                          BorrowedInterpolator(&mut p),
                          f64::from(fmt.sample_rate().0), //as _,
                          SAMPLE_RATE as _,
                      );

                 
                      for frame in s2.until_exhausted() {
                          $i.extend_from_slice(&frame);
                          if $i.len() >= target {
                          let n = $write;
                          at.add_frame(&$o[..n], time, true); //TODO: Which frames are key?
                          $i.clear();
                          time += 20_000_000;
                          }
                      }

should still work, but still struggling with how to use cpal::StreamData::Input from main macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant