@@ -49,6 +49,14 @@ public class ZencoderJob {
49
49
50
50
private List <ZencoderNotification > notifications = new ArrayList <ZencoderNotification >();
51
51
52
+ /**
53
+ * According to <a href="zencoder API documentation">https://app.zencoder.com/docs/api/encoding</a> pass_through is
54
+ * "Optional information to store alongside this job".<br/>
55
+ * When pass_through field is provided during job submission it becomes available in job notification
56
+ * callback from the service.
57
+ */
58
+ private String passThrough ;
59
+
52
60
53
61
public ZencoderJob (String inputPath ) {
54
62
this .inputPath = inputPath ;
@@ -92,6 +100,12 @@ public Document createXML() throws ParserConfigurationException {
92
100
download_connections .setTextContent ("" + this .downloadConnections );
93
101
root .appendChild (download_connections );
94
102
103
+ if (getPassThrough () != null ) {
104
+ Node passThroughNode = document .createElement ("pass_through" );
105
+ passThroughNode .setTextContent (this .getPassThrough ());
106
+ root .appendChild (passThroughNode );
107
+ }
108
+
95
109
Node test = document .createElement ("test" );
96
110
test .setTextContent ((this .isTest ? "1" : "0" ));
97
111
root .appendChild (test );
@@ -163,7 +177,11 @@ public int getDownloadConnections() {
163
177
return downloadConnections ;
164
178
}
165
179
166
- public boolean isTest () {
180
+ public String getPassThrough () {
181
+ return passThrough ;
182
+ }
183
+
184
+ public boolean isTest () {
167
185
return isTest ;
168
186
}
169
187
@@ -198,4 +216,8 @@ public void addNotification(ZencoderNotification item) {
198
216
public void deleteNotification (ZencoderNotification item ) {
199
217
this .notifications .remove (item );
200
218
}
219
+
220
+ public void setPassThrough (String passThrough ) {
221
+ this .passThrough = passThrough ;
222
+ }
201
223
}
0 commit comments