Virtual feed source

  • Hi:

    I Have a Question about the virtual feed source commands: into snowmix and with the virtual feed help, i get:

    virtual feed add [<vir id=""> [<feed name="">]] // empty <feed name=""> deletes entry
    virtual feed source [(feed | image) <vir id=""> (<feed id=""> | <image id="">)]
    virtual feed geometry <vir id=""> <width> <height>
    virtual feed place rect [<vir id=""> [<x> <y> <width> <height> <src_x> <src_y> [<rotation> <scale_x> <scale_y> <alpha>]]]
    virtual feed move coor <vir id=""> <delta x=""> <delta y=""> <step x=""> <step y="">
    virtual feed move clip <vir id=""> <delta clip="" x=""> <delta clip="" y=""> <delta clip="" w=""> <delta clip="" h=""> <step x=""> <step y=""> <step w=""> <step y="">
    virtual feed move scale <vir id=""> <delta sx=""> <delta sy=""> <step sx=""> <step sy="">
    virtual feed move alpha <vir id=""> <delta a=""> <step a="">

    I load a image with:

    image load 5 .. / path / image-name

    which has the same geometry as the virtual feed, then the command

    image overlay 5

    this command is placed inside the create Show command

    when I'm running Snowmix I get the follow error:

    Invalid number of parameters: "virtual feed source image 2 5 "

    what is my mistake, what thing is not correctly configured??

    thanks Peter.

    • Hi Natanael.

      You have found a bug. Thanks. To solve the issue, you need to alter the code in the file src/virtual_feed.cpp.

      The following line 302

      return SetVirtualSource(vir_id, source_id, true);

      needs to be changed to

      return SetVirtualSource(vir_id, source_id, false);

      Furthermore, you need to change the following section in src/video_mixer.cpp from

      int real_feed_no = m_pVirtualFeed->GetFeedSourceId(vir_feed_no);
      if (!m_pVideoFeed) {
          fprintf(stderr, "pVideoFeed was NULL for OverlayVirtualFeed\n");
          return 1;
      //                      struct feed_type* pFeed = m_pVideoFeed->FindFeed (real_feed_no);
      u_int8_t* src_buf = m_pVideoFeed->GetFeedFrame(real_feed_no);


      virtual_feed_enum_t feed_type = m_pVirtualFeed->GetFeedSourceType(vir_feed_no);
      u_int8_t* src_buf = NULL;
      int real_feed_no = m_pVirtualFeed->GetFeedSourceId(vir_feed_no);
      if (feed_type == VIRTUAL_FEED_FEED) {
          if (!m_pVideoFeed) {
              fprintf(stderr, "pVideoFeed was NULL for OverlayVirtualFeed\n");
              return 1;
          src_buf = m_pVideoFeed->GetFeedFrame(real_feed_no);
      } else if (feed_type == VIRTUAL_FEED_IMAGE) {
          if (!m_pVideoImage) {
              fprintf(stderr, "pVideoImage was NULL for OverlayVirtualFeed\n");
              return 1;
          image_item_t* pImage = m_pVideoImage->GetImageItem(real_feed_no);
          if (pImage) src_buf = pImage->pImageData;
      if (!src_buf) return 1;

      The virtual feed is not the best best code ever written, which is why and update for virtual feeds is on the development plans.

      Best regards
      Peter Maersk-Moller



Cancel   Add attachments