Reading more universes from olad

43 views
Skip to first unread message

Santi

unread,
May 22, 2013, 8:46:46 AM5/22/13
to open-l...@googlegroups.com
Hello,

i am working now in add OLA and CITP/MSEx support to glMixer 


a GPL multiplatform live visual software. I have one universe reading in a thread, but i need more universes. I have now 8 layers with 64 channels each, but i would test how it works with 16 video layers. The hardcoded source maximun are 125 now and i plan implement support for all, so i will need a lot of universes. I don not know one application of having 125 sources and surely i have not the hardware required for that, but i want test the most layers possible, the bottlenecks are easiest to see it when there is a lot of use.
I am on Linux in C++/Qt. I start the connection with:

    // set up ola connection
    m_client = new OlaCallbackClientWrapper;
    if (!m_client->Setup()) {qErrnoWarning("olaInterface::open: m_client.Setup:");}
    m_clientpointer = m_client->GetClient();
    m_clientpointer->SetDmxCallback(ola::NewCallback(this, &olaWorker::NewDmx));
    m_clientpointer->RegisterUniverse(m_universe,ola::REGISTER,ola::NewSingleCallback(this, &olaWorker::RegisterComplete));
    m_client->GetSelectServer()->RegisterRepeatingTimeout(4000,ola::NewCallback(this, &olaWorker::CheckDataLoss));
    qDebug()<< "olaWorker: Init complete.";
    m_client->GetSelectServer()->Run();

and receives the data in the Callback NewDMX where the data is processed. I have several ideas but i do not know what are the best in perfomance and clean code. My questions:

- Should i create a new OlaCallbackClientWrapper or i can use the same?  if yes, each OlaCallbackclientWrapper it should be in a new thread or can be in the same? 
 
- Should i only Register a new universe and expects the DmxBuffer in NewDmx with the universe variable set to the universe being sent?

All the code is in 

git clone https://code.google.com/p/libremediaserver.glmixer-dmx/

if any of you are interested. olaInterface.cpp and olaInterface.h are the related files.

Regards.

Santi Noreña.

Simon Newton

unread,
May 22, 2013, 12:33:20 PM5/22/13
to open-lighting
On Wed, May 22, 2013 at 5:46 AM, Santi <belf...@gmail.com> wrote:
Hello,

i am working now in add OLA and CITP/MSEx support to glMixer 


a GPL multiplatform live visual software. I have one universe reading in a thread, but i need more universes. I have now 8 layers with 64 channels each, but i would test how it works with 16 video layers. The hardcoded source maximun are 125 now and i plan implement support for all, so i will need a lot of universes. I don not know one application of having 125 sources and surely i have not the hardware required for that, but i want test the most layers possible, the bottlenecks are easiest to see it when there is a lot of use.
I am on Linux in C++/Qt. I start the connection with:

    // set up ola connection
    m_client = new OlaCallbackClientWrapper;
    if (!m_client->Setup()) {qErrnoWarning("olaInterface::open: m_client.Setup:");}
    m_clientpointer = m_client->GetClient();
    m_clientpointer->SetDmxCallback(ola::NewCallback(this, &olaWorker::NewDmx));
    m_clientpointer->RegisterUniverse(m_universe,ola::REGISTER,ola::NewSingleCallback(this, &olaWorker::RegisterComplete));
    m_client->GetSelectServer()->RegisterRepeatingTimeout(4000,ola::NewCallback(this, &olaWorker::CheckDataLoss));
    qDebug()<< "olaWorker: Init complete.";
    m_client->GetSelectServer()->Run();

and receives the data in the Callback NewDMX where the data is processed. I have several ideas but i do not know what are the best in perfomance and clean code. My questions:

- Should i create a new OlaCallbackClientWrapper or i can use the same?  if yes, each OlaCallbackclientWrapper it should be in a new thread or can be in the same? 


I'd stick with one client for now.  I expect you'll max out a single client around the 500 universe mark. 

 
 
- Should i only Register a new universe and expects the DmxBuffer in NewDmx with the universe variable set to the universe being sent?

I'm not sure what you mean by this. You can register for multiple universes and the first argument to the callback will be the universe that the data is for.

Simon

 

All the code is in 

git clone https://code.google.com/p/libremediaserver.glmixer-dmx/

if any of you are interested. olaInterface.cpp and olaInterface.h are the related files.

Regards.


Santi Noreña.

--
The Open Lighting Group: open-l...@googlegroups.com, #openlighting (irc.freenode.org)
To unsubscribe from this group, send email to open-lightin...@googlegroups.com
For more options, visit https://groups.google.com/groups/opt_out?hl=en
 
 

Santi

unread,
May 22, 2013, 12:51:44 PM5/22/13
to open-l...@googlegroups.com
Thank you very much for the fast answer and sorry for my english. 

wow 500 universes, i dont know if i will have enough...  ;-)







2013/5/22 Simon Newton <nom...@gmail.com>
Reply all
Reply to author
Forward
0 new messages