/* BoCA - BonkEnc Component Architecture * Copyright (C) 2007-2020 Robert Kausch * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 2 of * the License, or (at your option) any later version. * * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #include #include "dllinterface.h" namespace BoCA { class SuperWorker : public Threads::Thread { private: Threads::Semaphore processSignal; Threads::Semaphore readySignal; HANDLE_AACENCODER handle; Format format; Int frameSize; Int maxPacketSize; Buffer samplesBuffer; Buffer packetBuffer; Array packetSizes; Bool flush; Bool quit; Int Run(); public: SuperWorker(const Config *, const Format &); ~SuperWorker(); Void Encode(const Buffer &, Int, Int, Bool); Void WaitUntilReady(); Int Quit(); const Buffer &GetPackets() const { return packetBuffer; }; const Array &GetPacketSizes() const { return packetSizes; }; }; };