Menu

#12 First start record then auto-connect stream option

open
nobody
auto-stream (1)
5
2019-05-10
2015-06-04
No

We have start recording when connected, but would like to suggest another option/button to first start recording and then connect for streaming, the reason being is, if there is a problem with the connection we can at least have the recording, I know we can manually first hit record and then the stream button, but I'm trying to automate tasks for an unattended setup and this option will help alot.

Discussion

  • spockrules

    spockrules - 2016-06-02

    I have the same need as well. I really appreciate this extremely useful program, by the way.

     
  • Jim

    Jim - 2019-05-10

    I have butt set up to automatically record and stream to an icecast server when it is brought up. The problem is that if it has trouble connecting to the icecast server, it won't record locally. I use the local recording for archival purposes. Therefore, I downloaded the source and changed butt to start recording before trying to connect to the server.

    If anyone ever needs to implement this themselves, download the source, and modify this:

    src/FLTK/fl_callbacks.cpp

    After line 175, insert this code (the function is button_connect_cb):

    // If we're supposed to automatically start recording,
    // and we're not recording now, then do it BEFORE
    // trying to contact the server.
    if(cfg.rec.start_rec && !recording)
    {
        button_record_cb();
        timer_init(&rec_timer, 1);
    }
    

    In case fl_callbacks.cpp has changed too much since I have posted this, the change needs to go in the button_connect_cb() function, right before this code:

    while(try_to_connect)
    {
        usleep(10000); //10 ms
        Fl::wait(0); //update gui and parse user events
    }
    
     

Log in to post a comment.