void onVideoEncoded(void* sender, RawPacket& packet) { DebugL << "########### On packet: " << closed << ":" << packet.size() << endl; frames++; //assert(!closed); assert(packet.data()); assert(packet.size()); // Do not call stream::close from inside callback //ofile.write(packet.data(), packet.size()); //assert(frames <= 3); //if (frames == 20) // close(); }
void onFrame(void* sender, RawPacket& packet) { DebugL << "On packet: " << packet.size() << endl; assert(!closed); try { encoder.process(packet); } catch (std::exception& exc) { ErrorL << "Capture Recorder Error: " << exc.what() << endl; stop(); } }