Exemple #1
0
void CameraOutV4L2::writeFrame(const AkPacket &frame)
{
    if (!this->m_deviceFile.isOpen())
        return;

    if (this->m_deviceFile.write(frame.buffer()) < 0)
        qDebug() << "Error writing frame";
}
Exemple #2
0
AkVideoPacket::AkVideoPacket(const AkPacket &other)
{
    this->d = new AkVideoPacketPrivate();
    this->d->m_caps = other.caps();
    this->data() = other.data();
    this->buffer() = other.buffer();
    this->pts() = other.pts();
    this->timeBase() = other.timeBase();
    this->index() = other.index();
    this->id() = other.id();
}
Exemple #3
0
AkPacket AkVideoPacket::toPacket() const
{
    AkPacket packet;
    packet.caps() =  this->d->m_caps.toCaps();
    packet.buffer() = this->buffer();
    packet.pts() = this->pts();
    packet.timeBase() = this->timeBase();
    packet.index() = this->index();
    packet.id() = this->id();

    return packet;
}