Closed lattice0 closed 2 years ago
Actually, it works on my app. I don't receive just one packet. Turns out I was doing this:
Some(Ok(CodecItem::VideoFrame(v))) => {
info!("video frame: {:?}", v);
let mut nal_bytes = Vec::new();
avcc_to_annex_b(&v.data(), &mut nal_bytes);
let packet = Box::new(RetinaEncodedPacket {
video_frame: v,
nal_bytes: nal_bytes
});
on_produce(packet);
}
and it got caught in a loop. Probably something wrong with my avcc_to_annex_b
implementation that I'm testing.
So the only problem is in the cargo run example
Ahh, basically I missed in #42 a place where the example was checking for a supported codec by having the parameters. It needs to be updated to not expect them to be present right away.
On the cargo run example, I get:
from https://github.com/scottlamb/retina/blob/cd841b9f80f1d0dbd7226ad43c3023e4c6e84c40/examples/client/mp4.rs#L724
On my app, I get just this first video frame, and then nothing more:
on the line
packet capture of cargo run example sent via email