overlay finish snow 04.3

Anonymous
2014-05-20
2014-05-20
  • Anonymous - 2014-05-20

    Hi Peter,

    I cant find any documentation for overlay finish in snow 0.4.3.

    MSG: Invalid number of parameters: "text overlay "

    Can you please explain what that does exactly? Something like
    command create Show
    text overlay 1
    loop
    command end

    Thanks

     
    • Peter Maersk-Moller

      Hi ???

      When posting anonymously, please add a name, nickname or pseudonym at end of message so we have a handle to refer to.

      I'm afraid the very important command overlay finish is currently poorly documented.

      You can find a short explanation near the of the page at this link https://sourceforge.net/p/snowmix/wiki/Reserved%20Commands/

      The command overlay finish is very important, because this command give access to issue commands to be executed when the mixer is in a state where the main mixer frame is open for direct manipulation.

      If you on a control connection issue the command text overlay 1..4 7..end to overlay the placed text with ids 1 through 4 and 7 through the max id for a placed text, then nothing will happen. But if you add it to the command macro that has been named as the command macro to execute by overlay finish, then overlaying/mixing will happen.

      So as you write, the right way to do it is this.

          command create Show
            overlay virtual feed 3
            shape overlay 2 5 8
            image overlay 3 7
            text overlay 1..4 7.end
            loop
          command end
      
          overlay finish Show
      

      This tells that the command macro Show is to be executed every time just before the mixed frame is send to output from Snowmix. In this example, first we overlay/mix the virtual feed 3 (this will change to virtual feed overlay in a future version). Then we overlay the 3 shapes 2, 5 and 8. Then we overlay placed image 3 and 7. Then we overlay placed text 1 through 4 and 7 through the max id for placed text. Last but not least we end the command macro with the command loop*. This instructs SNowmix to reset the command pointer for the command macro Show so next time we call show for the next frame, the command will start at line 1.

      Any command you can give on a control connection can also be given from the command macro Show defined to be executed for every frame just before it is to be send to output, but the reverse does not apply.

      Does this help ?

      Best regards
      Peter

       
  • Anonymous - 2014-05-20

    Hi Peter,

    Yea makes sense, i am a bit confused coz i am reading through thw wiki, trying to run examples but i get some syntax error in snow 0.4.3 , guess the syntax and number of parameters changed.

    So a control channel is anything that is different than the main console righT?
    Coz if i try to do

    text string 1 Hello World
    text place 1 1 1 200 200 0.1 0.1 0.1

    I can see "Hello world" displayed on the screen, without the need to overlay

    Thanks
    Wis

     
    • Peter Maersk-Moller

      Hi Wis

      Please drop a note here, if you find something that is incorrect. Or even better, if you are logged in, you can add comments directly to the page with errors. No one has ever done the latter, but I guess I should get a notification about it. Yes syntax is changing, but any commands for 0.4.x should also work for 0.4.y when y >= x.

      If you can see the text overlayed when you execute the commands

      text string 1 Hello World
      text place 1 1 1 200 200 0.1 0.1 0.1
      

      then it has to be because you have defined a command macro and issued the overlay finish command with that command macro and that macro has to contain a text overlay command. Quite likely it is the command macro Show, but you can have changed it.

      I can promise you text does not get overlayed unless a text overlay is executed somehow.

      Try execute command list Show

      Next version of Snowmix has a command to list which command macro is associated with over finish.

      Best regards

       
    • Peter Maersk-Moller

      Hi Wiz.

      Even the main console is a control connection. However there are more messages appearing in the main console. A lot of the verbose messages only appear in the main console as a logging.

      If a command can be executed in the main console, it can also be executed in a control connection and vice versa.

      Best regards
      Peter

       
  • Anonymous - 2014-05-20

    btw i am trying to move text:

    text string 56 HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
    text place 56 56 1 200 200 0.1 0.2 0.3
    text place repeat move 56 200 200 200 400
    text place repeat move 56 200 200 400 200

    Nothing happens, how about if i want it to move only once and not repeat?

    Thanks again.

     
    • Peter Maersk-Moller

      Hi Wis

      The command text repeat move has the following syntax

      text place repeat move [<place id> <dx> <dy> <end x> <end y>]
      

      The parameters dx and dy are the distance the text should move between each frame. Typical values are between -5 to 5 and more likely -1 or 1.
      The parameters end x and end y are where the text, when moved should return to its original coordinates and start over. Assuming you want your text to move 100 pixels to the right and then start over, the command would be

      text place repeat move 56 1 0 300 200
      

      assuming you want to move in steps of 1 and assuming the text was placed in 200,200.

      If you only want to move it once, you can use the command text place move coor. It has the syntax

      text place move coor [<place id> [<delta_x> <delta_y> <step_x> <step_y>]]
      

      Here the delta values are the number of pixels you want to move the text between frames and the steps are the number of frames the movement is continued. For the same example as before, the command is

      text place move coor 56 1 0 100 0
      

      Best regards
      Peter

       
  • Anonymous - 2014-05-20

    I see, yes i did execute the command overlay finish but i exited snowmix and restarted the instance and now it works without issuing the overlay finish and macro

    MSG: 1: DigiDimClock
    MSG: 2: DigiUnDimClock
    MSG: 3: DimClock
    MSG: 4: UnDimClock
    MSG: 5: ClockFramerate
    MSG: 6: scale_image
    MSG: 7: rotate_image
    MSG: 8: dim_text
    MSG: 9: grow_text
    MSG: 10: clip_text
    MSG: 11: Blink_Feed_2_State
    MSG: 12: overlay image all
    MSG: 13: overlay text 1 3
    MSG: 14: overlay text 2 4..end
    MSG: 15: overlay text 0
    MSG: 16: loop

     
    • Peter Maersk-Moller

      Somewhere in your ini file or files, there is the command overlay finish Show or some other command macro given to overlay finish. I'm pretty sure. No placed text gets overlayed accidentally. If you can't find it, you can post your complete ini file. I'm prepared to wage a beer on that.

      Regards
      Peter

       
  • Anonymous - 2014-05-20

    Thanks for your fast reply!

    Initial ini file read
    text string 55 Hello!
    text place 55 55 10 300 1 1 1 1
    text place 55 55 1 10 300 1 1 1 1
    text place repeat move 55 1 0 100 300

    Nothing moves ^^

    Now, if i add
    text place move coor 55 1 0 10 0

    The text moves 100 pixels to the right and repeats :/

     
    • Peter Maersk-Moller

      Please post you full ini file here. You can attach a file to a posting. If you include your ini file embedded in the message please prepend every line with at least 4 spaces. If you are using vi as an editor, you can execute the following command in vi before you copy it to this forum.

      %s/^/\t/g
      

      This insert tab in the beginning of every line, then copy it over to this forum. If you attach a file, you don't have to prepend.

      Best regards
      Peter

       
    • Peter Maersk-Moller

      Hi

      Thanks. You have found a bug I am surprised not to have discovered before as I do use the function repeat move. Anyway. To fix it, find the file video_text.cpp and find the function AddRepeatMove. In this function you add the following line

      p->update = true;
      

      just before the function returns. That's all. Save the file, compile and test your example

      The function will look like this now

      int CTextItems::AddRepeatMove(u_int32_t place_id, int32_t dx, int32_t dy, int32_t ex, int32_t ey, double dr, double da)
      {
          if (place_id >= m_max_places || !m_text_places || !m_text_places[place_id]) return -1;
          text_item_t* p = GetTextPlace(place_id);
          if (!p) return -1;
          p->repeat_move_x = p->x;
          p->repeat_move_y = p->y;
          p->repeat_move_to_x = ex;
          p->repeat_move_to_y = ey;
          p->repeat_delta_x = dx;
          p->repeat_delta_y = dy;
          p->repeat_delta_rotation = dr;
          p->repeat_delta_alpha = da;
          p->update = true;
          return 0;
      }
      

      Best regards

      peter

       
  • Anonymous - 2014-05-20

    Hi Peter,

    Please find it below

    http://pastebin.com/rT2fkCtF

    Thanks

     
    • Peter Maersk-Moller

      Should work now with the bug fix in previous message. If not, I'll take a look again. Let me know if it works for you.

      Thanks for finding the bug.

      Peter

       


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks