| 296 | } |
| 297 | |
| 298 | bool decoderFFmpeg::pushData(QByteArray &data) |
| 299 | { |
| 300 | if (!this->raw_pkt) |
| 301 | this->raw_pkt = this->ff.allocatePacket(); |
| 302 | if (data.length() == 0) |
| 303 | { |
| 304 | // Push an empty packet to indicate that the file has ended |
| 305 | DEBUG_FFMPEG("decoderFFmpeg::pushData: Pushing an empty packet"); |
| 306 | FFmpeg::AVPacketWrapper emptyPacket; |
| 307 | return this->pushAVPacket(emptyPacket); |
| 308 | } |
| 309 | else |
| 310 | DEBUG_FFMPEG("decoderFFmpeg::pushData: Pushing data length " << data.length()); |
| 311 | |
| 312 | // Add some padding |
| 313 | data.append(this->avPacketPaddingData); |
| 314 | |
| 315 | this->raw_pkt.setData(data); |
| 316 | this->raw_pkt.setDTS(AV_NOPTS_VALUE); |
| 317 | this->raw_pkt.setPTS(AV_NOPTS_VALUE); |
| 318 | |
| 319 | return this->pushAVPacket(this->raw_pkt); |
| 320 | } |
| 321 | |
| 322 | bool decoderFFmpeg::pushAVPacket(FFmpeg::AVPacketWrapper &pkt) |
| 323 | { |
nothing calls this directly
no test coverage detected