Skip to content

Commit

Permalink
Adding Sequence.createCaptionTrack and CAPTION_FORMAT constants, Sequ…
Browse files Browse the repository at this point in the history
…ence.exportAsMediaDirect workAreaType (#124)

* Adding Sequence.createCaptionTrack and CAPTION_FORMAT constants

See https://ppro-scripting.docsforadobe.dev/sequence/sequence.html?highlight=createcaptiontrack#sequence-createcaptiontrack
Untested yet

* Proposing exportAsMediaDirect WorkAreaType enum

see docs https://ppro-scripting.docsforadobe.dev/sequence/sequence.html#sequence-exportasmediadirect
  • Loading branch information
myselfhimself authored Apr 16, 2024
1 parent 701727e commit 4763068
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion Premiere/15.0/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ type SampleRateOption = 48000 | 96000
type BitsPerSampleOption = 16 | 24
type SDKEventType = "warning" | "info" | "error"

declare enum WorkAreaType {
ENCODE_ENTIRE = 0,
ENCODE_IN_TO_OUT = 1,
ENCODE_WORK_AREA = 2
}

declare enum TIME_FORMAT {
TIMEDISPLAY_24Timecode = 100,
TIMEDISPLAY_25Timecode = 101,
Expand Down Expand Up @@ -78,6 +84,41 @@ declare class SequenceSettings {
* A sequence.
*/
declare class Sequence {
/**
* Subtitle (Default)
*/
static readonly CAPTION_FORMAT_SUBTITLE: number

/**
* CEA-608
*/
static readonly CAPTION_FORMAT_608: number

/**
* CEA-708
*/
static readonly CAPTION_FORMAT_708: number

/**
* Teletext
*/
static readonly CAPTION_FORMAT_TELETEXT: number

/**
* EBU Subtitle
*/
static readonly CAPTION_FORMAT_OPEN_EBU: number

/**
* OP-42
*/
static readonly CAPTION_FORMAT_OP42: number

/**
* OP-47
*/
static readonly CAPTION_FORMAT_OP47: number

/**
*
*/
Expand Down Expand Up @@ -176,6 +217,14 @@ declare class Sequence {
*/
clone(): Sequence

/**
* Creates a caption track in the active sequence using caption data from a project item.
* @param projectItem A captions source clip (e.g. .srt)
* @param startAtTime Offset in seconds from start of sequence
* @param captionsFormat (Optional, defaults to subtitle) Caption format of the new track (see table below).
*/
createCaptionTrack(projectItem: ProjectItem, startAtTime: number, captionFormat: number): Sequence

/**
* Creates a new sequence from the source sequence's in and out points.
* @param ignoreMapping If True the current selection, not track targeting, will determine
Expand All @@ -198,7 +247,7 @@ declare class Sequence {
* @param presetPath The .epr file to use.
* @param workAreaType Optional work area specifier.
*/
exportAsMediaDirect(outputFilePath: string, presetPath: string, workAreaType?: number): string
exportAsMediaDirect(outputFilePath: string, presetPath: string, workAreaType?: WorkAreaType): string

/**
* Exports the sequence (and its constituent media) as a new PPro project.
Expand Down

0 comments on commit 4763068

Please sign in to comment.