Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

C++ plug-in – problem rendering audio waveforms for a growing clip

Community Beginner ,
Apr 25, 2018 Apr 25, 2018

Hi,


I’m writing a C++ plug-in for Premiere Pro CC.


I’ve based the plug-in on the example project SDK_Custom_Import, which is provided with the plug-in SDK.


In my plug-in, I’ve set the flags:


importInfo->canProvidePeakAudio = kPrTrue;

importInfo->avoidAudioConform = kPrTrue;


and


fileInfo8->accessModes |= kRandomAccessImport


This allows me to manually render the waveforms on-demand via the imGetPeakAudio case-statement.


In Premiere’s setting: Edit > Preferences > Media > Automatically refresh growing files. I have set the minimum refresh rate of 10 seconds.


I would like to import a growing, 20 minute clip with uncompressed audio at 48KHz. In my importer, I’m adding a 20 minute clip to the timeline, and back-filling video and audio as the clip grows (i.e. I’ve created a static length clip which is being slowly populated).


I can hear the audio as it is added, and I can render the waveforms correctly. My only problem is that the waveforms are not being updated/redrawn on the timeline. I was hoping that by setting the growing file refresh to 10 seconds (Edit > Preferences > Media > Automatically refresh growing files), that the timeline would automatically redraw every 10 seconds.


If I manually resize the timeline at 10 second intervals to coincide with the growing file refresh, it forces the latest audio waveforms to be redrawn, which renders the latest audio waveform growth.


Is there any code flag, or menu setting, to schedule an automatic timeline redraw at the 10 second growing file refresh interval?


Or can I amend my plug-in to force a timeline redraw at regular intervals?


Any help you can provide is much appreciated.


Many thanks, Andy.

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Moved... you need to ask programming questions in the programming forum... Mod]

TOPICS
SDK
986
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Apr 27, 2018 Apr 27, 2018

Hi,

Issue finally fixed. I just needed to set flag fileInfo8->mayBeGrowing = 1; and now it all works.

Thanks for all your help, Andy.

Translate
Community Beginner ,
Apr 26, 2018 Apr 26, 2018

Please, any pointers or advice would be very much appreciated

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 26, 2018 Apr 26, 2018

Zac, who normally responds to such questions, is out on sabbatical. I've asked that a PPro dev respond to your enquiry, directly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 27, 2018 Apr 27, 2018

Thanks Bruce, it is appreciated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 27, 2018 Apr 27, 2018

Hi,

After further research, what I'm really after is a call to flush the audio-waveform cache, which will trigger case imGetPeakAudio: within xImportEntry.

I've emulated a basic timeline redraw by showing/hiding audio waveforms, and also calling ::InvalidateRect(hwnd, NULL, TRUE) with Premiere's main window handle. Both of these render cached audio waveforms.

With a growing clip, I'd like a way to refresh the audio-waveform cache via imGetPeakAudio, so timeline redraws will display the latest waveform data.

So far, the only way I've managed to achieve this is by manually resizing the timeline window via Premiere's GUI.

Many thanks, Andy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 27, 2018 Apr 27, 2018

Hi,

Issue finally fixed. I just needed to set flag fileInfo8->mayBeGrowing = 1; and now it all works.

Thanks for all your help, Andy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 27, 2018 Apr 27, 2018
LATEST

Great to hear!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines