示例#1
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();
}
示例#2
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;
}
示例#3
0
AkPacket MultiplexElement::iStream(const AkPacket &packet)
{
    if (this->m_inputIndex >= 0
        && packet.index() != this->m_inputIndex)
        return AkPacket();

    if (!this->m_caps.isEmpty()
        && !packet.caps().isCompatible(this->m_caps))
        return AkPacket();

    AkPacket oPacket(packet);

    if (this->m_outputIndex >= 0)
        oPacket.setIndex(this->m_outputIndex);

    akSend(oPacket)
}