7 Replies Latest reply on Jan 5, 2015 11:38 AM by vivekviga

    Creating UI inside transmitterPlugin.cpp

    vivekviga

      Hi, I had two questions regarding transmitterPLugin. I am trying to create a plugin that would transmit data from premier pro source monitor on to a external hardware device.

      transmit_UI.PNG

      1) I can use the MessageBox to create a normal window from the above code, but how do I create a UI like premier pro has inside the above function ? Is there any documentation on how to create UI using C++ ?

         Or do I need a create a Javascript UI file which is used by the C++ plugin when it loads ?

       

      2) The SDK documentation mentions this :

          transmit_other.PNG

      Clicking on the Transmit Invocation Suite does not give any useful information. I also checked out an earlier post on this https://forums.adobe.com/thread/1179336

      Could Adobe please explain on how can I get the Transmit invocation suite to work. For example ,assume I should create a video filter which if the user adds to the clip, it should

      send the entire timeline to the external hardware, how do I use the SDK example files in order to achieve this ? Should I export a Video_filer plugin and a Transmitter plugin or should

      I add the source code from both these into one ? It would be helpful to understand this workflow since there are no examples related to this in the SDK.

       

      Thanks

        • 1. Re: Creating UI inside transmitterPlugin.cpp
          Bruce Bullis Adobe Employee

          Zac's replies in that earlier thread detail, param by param, how to call the functions in the kPrSDKAcceleratedRenderInvocationSuite. Where did you run into problems, following his directions?

           

          I'm not sure why you'd want users to enable your preview, by applying a video effect; seems confusing.

           

          Larger picture: What are you trying to accomplish? Are you writing support for a specific piece of hardware?

          • 2. Re: Creating UI inside transmitterPlugin.cpp
            vivekviga Level 1

            Zac's replies in that earlier thread detail, param by param, how to call the functions in the kPrSDKAcceleratedRenderInvocationSuite. Where did you run into problems, following his directions?

             

            - The problems with Zac's thread for me are that even though its very well explained, I am not sure where to implement those functions. Since the documentation mentions "An effect or titler with a modal setup dialog could push frames to the output", I dont understand about the process of creating an effect ,using the Transmit Invocation Suite inside this effect and then where do I write the Transmitter code , should it reside inside the effect or as a separate plugin ?

             

            I'm not sure why you'd want users to enable your preview, by applying a video effect; seems confusing.


            - Because the documentation mentioned "An effect or titler with a modal setup dialog could push frames to the output", so I assumed may be I can just create a video effect and trigger my transmitter to send video frames to the hardware. I will explain more on why I thought of using a video effect in the next question.


            Larger picture: What are you trying to accomplish? Are you writing support for a specific piece of hardware?


            - I am trying to send Video frames from the Adobe premiere pro source monitor to Oculus rift DK2 virtual reality device.

            - In under to get that working I thought of using the TransmitterSDK after going through the documentation.

            - I combined the Transmitter SDK and oculus SDK code, but then realized the way I have set it up is wrong.

            - When I just use the Transmitter code, I use the setup dialog at Edit->Preferences->Playback  to  switch to my VR device.

            - When my VR device is turned on, the main problem is I don't get to scrub through premier Pro's timeline, because the VR device is running on directX11,

              inside my code, I am stuck in a while loop,which is trying to render continuously every frame. And hence the moment I connect

              my VR device using this setup Dialog, the preferences windows which is now open gets stuck and I cant get out of it and there by I cannot use

              any UI of premiere pro until I close the preferences window. I don't know how to solve this.

            - So, I thought if I should change my approach for this and try it in a different way where I need not use any Opened Premiere Pro  Panels, so that I can have access to

              the timeline while my code is sending frames to the VR device.

            - When I saw in the documentation that a video effect with a modal setup can be used to push frames to output using the Transmit Invocation suite, I thought

            may be I should try this. Since there was not much documentation regarding this, I was trying different things unable to get anything working as I did not understand

            how to combine the code in VideoFilter.cpp, transmitter.cpp and on how to write the dockable UI for it( the dockable UI part is now solved since you just gave this link

            https://github.com/Adobe-CEP/Samples/tree/master/PProPanel)


            Thanks



            • 3. Re: Creating UI inside transmitterPlugin.cpp
              Bruce Bullis Adobe Employee

              Wow. Crazy workflow!

               

              Zac may know more about using HTML5 (JavaScript) UIs on C++ plug-ins, but most panels are simply JavaScript; I didn't mean to recommend/suggest combining C++ and JavaScript.

               

              All the actual export controller stuff done by panels is through the ExtendScript API.

              • 4. Re: Creating UI inside transmitterPlugin.cpp
                Zac Lam Adobe Employee

                Hi Vivek,

                 

                A transmit plug-in is ideal if you want to send frames live to your device as you view video through the Source and Program Monitors.  You'll get PushVideo() calls to send individual frames to your device.

                 

                On the other hand, if you want to send many frames to your device all at once, then a transmit plug-in isn't for you.  You'd want to use some flavor of export.  Export can be done either via plug-in (if you want the raw pixel data) or ExtendScript (if you want a file in one of the supported export formats).

                 

                So, how do you want to use your Oculus Rift device?

                 

                Zac

                • 5. Re: Creating UI inside transmitterPlugin.cpp
                  vivekviga Level 1

                  Hi Zac,

                   

                  Thank you. I need Premier Pro to be sending all the frames live, also I need to be able to scrub the timeline in Premier while I see the results live inside the rift. But the main issue I face now is that the moment I initialize my VR device I wont be able to control any of Premier Pro's Panels or options. This happens because Oculus SDK uses DX11 and I need to take the image from Premier pro, project this image as texture's for left and right eye spheres and all this code would be running inside a while loop so that my head tracking is working real time, which is why my process is stuck in this loop and Premier wont get the process control until it finishes the loop, but both the process are required at the same time. I am looking into multi threading and having the VR process run on a separate thread, but am still researching and learning about it. It would be of great help if you could provide me with some insights on how to go about this.

                   

                  Thanks    

                  • 6. Re: Creating UI inside transmitterPlugin.cpp
                    Zac Lam Adobe Employee

                    Since you need to scrub the timeline and see the results live, the transmit plug-in is the way to go.

                     

                    The interesting part about your project is that you need to rerender the frame for the head tracking, even if there is no new frame coming from Premiere Pro.  I agree you'll need to put the while loop in a separate thread or process, so that it can continue to loop and handle the head tracking separately.

                     

                    SetupDialog is definitely not the place to run a processing loop.  This is only a place to display user-facing settings and save them.  For the settings dialog, you can use Windows or Mac APIs.

                     

                    During the ActivateDeactivate you can manage hardware access, and could be a possible place to spin off a new high-priority processing thread that takes the frames and handles head tracking.

                    • 7. Re: Creating UI inside transmitterPlugin.cpp
                      vivekviga Level 1

                      Thank you Zac, that gives me a good overview of how to go about it. I will work on it. Thank you very much.