Latest post Mon, Feb 6 2017 9:26 AM by Francesco. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Wed, Feb 1 2017 4:32 PM

    • Francesco
    • Not Ranked
    • Joined on Wed, May 16 2012
    • Pisa - Italy
    • Posts 65
    • Points 645

    Error AMT_UNKNOWN_EXCEPTION_RAISED when attempting to reload plugins

    Hi

    I've successfully inserted the AMT function in my code (32 bit application with SDK  2.4.4.222.1) but I saw this error when attempting to load plugins after unload.  That is I have the function that create AMT clip.  The first time all is ok clip is generated and no error occurs.  The second time I call the function gives an error when attempting to load AMT plugins.  The only way to make it works is to avoid unloading plugins after clip creation.  In the subsequent a code snippet in order to explain what I'm doing:

    int Make_AMTFile(char *clipname)

    {

     int load_status = 0;
     int call_status = AMT_SUCCESS;
     amtSession_t amtSession_cur;

     load_status = LoadAmtPlugins();
     if (load_status != AMT_SUCCESS)
     {
         call_status = load_status;
         stre = "Error loading AMT plugins : ";
         goto Make_AMTFile_err;
     }
     amtSession_cur.amt_instance = NULL;
     amtSession_cur.amt_properties = NULL;


    // Create AMT file

      call_status = CreateAmtFile(&amtSession_cur, clipname, mediaPropertiesHD_220.c_str(), mediaPropertiesHD_220.c_str(), NULL, NULL);
     if (call_status != AMT_SUCCESS)
     {
         stre = "Error creating AMT file : ";
         goto Make_AMTFile_err;
     }
     call_status = CreateAmtTrack(&amtSession_cur, ET_VIDEO, 0);
     if (call_status != AMT_SUCCESS)
     {
         stre = "Error creating video track : ";
         goto Make_AMTFile_err;
     }

     for(kk=1;kk<5;kk++)
     {
       call_status = CreateAmtTrack(&amtSession_cur, ET_AUDIO, kk);
       if (call_status != AMT_SUCCESS)
       {
             stre.printf("Error creating audio track %d : ",kk);
            goto Make_AMTFile_err;
       }
     }

    // Other initializations

     

    // MAin loop

        for (amt_frameCnt = 0; amt_frameCnt < total_amt_frames; amt_frameCnt++)
        {
              // Other code for reading and creating a DNxHD frame

             // Write video track

                 call_status = WriteAmtTrackSample(&amtSession_cur,0,thpkt.data,thpkt.size );
               if (call_status != AMT_SUCCESS)
              {
                  stre.printf("Error writing video track (%d) : ",amt_frameCnt);
                  goto Make_AMTFile_err;
              }

            // Write 4 audio tracks
             for(kk=1;kk<5;kk++)
            {
                 call_status = WriteAmtTrackSample(&amtSession_cur,kk,&decompBuffer[ii],3840 );
                 if (call_status != AMT_SUCCESS)
                 {
                      stre.printf("Error writing audio track (frame %d, field 0) : ",amt_frameCnt);
                      goto Make_AMTFile_err;
                 }
            
           }

       }

    // Close tracks

      for(kk=0;kk<5;kk++)
      {
           call_status = CloseAmtTrack(&amtSession_cur, kk);
           if (call_status != AMT_SUCCESS)
           {  stre.printf("Error closing AMT track %d ",kk);  smsmemo->Memo1->Lines->Add(stre);  }
      }


    // Close file    call_status = CloseAmtFile(&amtSession_cur);
        if (call_status != AMT_SUCCESS)
        {  stre = "Error closing Amt file ";  smsmemo->Memo1->Lines->Add(stre);  }

            if (load_status == AMT_SUCCESS)
            {
                load_status = UnloadAmtPlugins();
                if (load_status == AMT_SUCCESS)    stre = "AMT Plugin unloaded ";
                else if (load_status == AMT_COULD_NOT_UNLOAD_PLUGINS) stre ="Unable to unload AMT Plugin ";
                else
                {
                   str1 = GetAmtErrorString(load_status);
                    stre.printf(" Error unloading AMT Plugin %s",str1);
                    smsmemo->Memo1->Lines->Add(stre);
                }
            }

     Make_AMTFile_err:

    }

    The question is : Unload of amt plugins should be made after a clip creation or after program closing ?

    regards

  • Wed, Feb 1 2017 4:38 PM In reply to

    • Vadym
    • Not Ranked
    • Joined on Thu, Apr 17 2014
    • Posts 164
    • Points 2,090
    • Avid Developer Moderator
      Avid Employee

    Re: Error AMT_UNKNOWN_EXCEPTION_RAISED when attempting to reload plugins

    Hi,

    Please obtain the latest AMT SDK from http://www.avid.com/alliance-partner-program/connectivity-program

    The latest version as of now is 2.13.3

    Thanks

  • Mon, Feb 6 2017 9:26 AM In reply to

    • Francesco
    • Not Ranked
    • Joined on Wed, May 16 2012
    • Pisa - Italy
    • Posts 65
    • Points 645

    Re: Error AMT_UNKNOWN_EXCEPTION_RAISED when attempting to reload plugins

    Hi Mr Vadym

    I downloaded latest version of sdk but the error still remain.

    Regards

Page 1 of 1 (3 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller