This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
/
VideoStream.java
3611 lines (3426 loc) · 99 KB
/
VideoStream.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/video/transcoder/v1beta1/resources.proto
package com.google.cloud.video.transcoder.v1beta1;
/**
*
*
* <pre>
* Video stream resource.
* </pre>
*
* Protobuf type {@code google.cloud.video.transcoder.v1beta1.VideoStream}
*/
public final class VideoStream extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.video.transcoder.v1beta1.VideoStream)
VideoStreamOrBuilder {
private static final long serialVersionUID = 0L;
// Use VideoStream.newBuilder() to construct.
private VideoStream(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private VideoStream() {
codec_ = "";
profile_ = "";
tune_ = "";
preset_ = "";
pixelFormat_ = "";
rateControlMode_ = "";
entropyCoder_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new VideoStream();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private VideoStream(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
codec_ = s;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
profile_ = s;
break;
}
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
tune_ = s;
break;
}
case 34:
{
java.lang.String s = input.readStringRequireUtf8();
preset_ = s;
break;
}
case 40:
{
heightPixels_ = input.readInt32();
break;
}
case 48:
{
widthPixels_ = input.readInt32();
break;
}
case 58:
{
java.lang.String s = input.readStringRequireUtf8();
pixelFormat_ = s;
break;
}
case 64:
{
bitrateBps_ = input.readInt32();
break;
}
case 74:
{
java.lang.String s = input.readStringRequireUtf8();
rateControlMode_ = s;
break;
}
case 80:
{
enableTwoPass_ = input.readBool();
break;
}
case 88:
{
crfLevel_ = input.readInt32();
break;
}
case 96:
{
vbvSizeBits_ = input.readInt32();
break;
}
case 104:
{
vbvFullnessBits_ = input.readInt32();
break;
}
case 112:
{
allowOpenGop_ = input.readBool();
break;
}
case 120:
{
gopModeCase_ = 15;
gopMode_ = input.readInt32();
break;
}
case 130:
{
com.google.protobuf.Duration.Builder subBuilder = null;
if (gopModeCase_ == 16) {
subBuilder = ((com.google.protobuf.Duration) gopMode_).toBuilder();
}
gopMode_ =
input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.Duration) gopMode_);
gopMode_ = subBuilder.buildPartial();
}
gopModeCase_ = 16;
break;
}
case 138:
{
java.lang.String s = input.readStringRequireUtf8();
entropyCoder_ = s;
break;
}
case 144:
{
bPyramid_ = input.readBool();
break;
}
case 152:
{
bFrameCount_ = input.readInt32();
break;
}
case 161:
{
frameRate_ = input.readDouble();
break;
}
case 169:
{
aqStrength_ = input.readDouble();
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.video.transcoder.v1beta1.ResourcesProto
.internal_static_google_cloud_video_transcoder_v1beta1_VideoStream_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.video.transcoder.v1beta1.ResourcesProto
.internal_static_google_cloud_video_transcoder_v1beta1_VideoStream_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.video.transcoder.v1beta1.VideoStream.class,
com.google.cloud.video.transcoder.v1beta1.VideoStream.Builder.class);
}
private int gopModeCase_ = 0;
private java.lang.Object gopMode_;
public enum GopModeCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
GOP_FRAME_COUNT(15),
GOP_DURATION(16),
GOPMODE_NOT_SET(0);
private final int value;
private GopModeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static GopModeCase valueOf(int value) {
return forNumber(value);
}
public static GopModeCase forNumber(int value) {
switch (value) {
case 15:
return GOP_FRAME_COUNT;
case 16:
return GOP_DURATION;
case 0:
return GOPMODE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public GopModeCase getGopModeCase() {
return GopModeCase.forNumber(gopModeCase_);
}
public static final int CODEC_FIELD_NUMBER = 1;
private volatile java.lang.Object codec_;
/**
*
*
* <pre>
* Codec type. The default is `"h264"`.
* Supported codecs:
* - 'h264'
* - 'h265'
* - 'vp9'
* </pre>
*
* <code>string codec = 1;</code>
*
* @return The codec.
*/
@java.lang.Override
public java.lang.String getCodec() {
java.lang.Object ref = codec_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
codec_ = s;
return s;
}
}
/**
*
*
* <pre>
* Codec type. The default is `"h264"`.
* Supported codecs:
* - 'h264'
* - 'h265'
* - 'vp9'
* </pre>
*
* <code>string codec = 1;</code>
*
* @return The bytes for codec.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCodecBytes() {
java.lang.Object ref = codec_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
codec_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROFILE_FIELD_NUMBER = 2;
private volatile java.lang.Object profile_;
/**
*
*
* <pre>
* Enforce specified codec profile. The default is `"high"`.
* Supported codec profiles:
* - 'baseline'
* - 'main'
* - 'high'
* </pre>
*
* <code>string profile = 2;</code>
*
* @return The profile.
*/
@java.lang.Override
public java.lang.String getProfile() {
java.lang.Object ref = profile_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
profile_ = s;
return s;
}
}
/**
*
*
* <pre>
* Enforce specified codec profile. The default is `"high"`.
* Supported codec profiles:
* - 'baseline'
* - 'main'
* - 'high'
* </pre>
*
* <code>string profile = 2;</code>
*
* @return The bytes for profile.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProfileBytes() {
java.lang.Object ref = profile_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
profile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TUNE_FIELD_NUMBER = 3;
private volatile java.lang.Object tune_;
/**
*
*
* <pre>
* Enforce specified codec tune.
* </pre>
*
* <code>string tune = 3;</code>
*
* @return The tune.
*/
@java.lang.Override
public java.lang.String getTune() {
java.lang.Object ref = tune_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tune_ = s;
return s;
}
}
/**
*
*
* <pre>
* Enforce specified codec tune.
* </pre>
*
* <code>string tune = 3;</code>
*
* @return The bytes for tune.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTuneBytes() {
java.lang.Object ref = tune_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
tune_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRESET_FIELD_NUMBER = 4;
private volatile java.lang.Object preset_;
/**
*
*
* <pre>
* Enforce specified codec preset. The default is `"veryfast"`.
* </pre>
*
* <code>string preset = 4;</code>
*
* @return The preset.
*/
@java.lang.Override
public java.lang.String getPreset() {
java.lang.Object ref = preset_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
preset_ = s;
return s;
}
}
/**
*
*
* <pre>
* Enforce specified codec preset. The default is `"veryfast"`.
* </pre>
*
* <code>string preset = 4;</code>
*
* @return The bytes for preset.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPresetBytes() {
java.lang.Object ref = preset_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
preset_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HEIGHT_PIXELS_FIELD_NUMBER = 5;
private int heightPixels_;
/**
*
*
* <pre>
* The height of the video in pixels. Must be an even integer.
* When not specified, the height is adjusted to match the specified width and
* input aspect ratio. If both are omitted, the input height is used.
* </pre>
*
* <code>int32 height_pixels = 5;</code>
*
* @return The heightPixels.
*/
@java.lang.Override
public int getHeightPixels() {
return heightPixels_;
}
public static final int WIDTH_PIXELS_FIELD_NUMBER = 6;
private int widthPixels_;
/**
*
*
* <pre>
* The width of the video in pixels. Must be an even integer.
* When not specified, the width is adjusted to match the specified height and
* input aspect ratio. If both are omitted, the input width is used.
* </pre>
*
* <code>int32 width_pixels = 6;</code>
*
* @return The widthPixels.
*/
@java.lang.Override
public int getWidthPixels() {
return widthPixels_;
}
public static final int PIXEL_FORMAT_FIELD_NUMBER = 7;
private volatile java.lang.Object pixelFormat_;
/**
*
*
* <pre>
* Pixel format to use. The default is `"yuv420p"`.
* Supported pixel formats:
* - 'yuv420p' pixel format.
* - 'yuv422p' pixel format.
* - 'yuv444p' pixel format.
* - 'yuv420p10' 10-bit HDR pixel format.
* - 'yuv422p10' 10-bit HDR pixel format.
* - 'yuv444p10' 10-bit HDR pixel format.
* - 'yuv420p12' 12-bit HDR pixel format.
* - 'yuv422p12' 12-bit HDR pixel format.
* - 'yuv444p12' 12-bit HDR pixel format.
* </pre>
*
* <code>string pixel_format = 7;</code>
*
* @return The pixelFormat.
*/
@java.lang.Override
public java.lang.String getPixelFormat() {
java.lang.Object ref = pixelFormat_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pixelFormat_ = s;
return s;
}
}
/**
*
*
* <pre>
* Pixel format to use. The default is `"yuv420p"`.
* Supported pixel formats:
* - 'yuv420p' pixel format.
* - 'yuv422p' pixel format.
* - 'yuv444p' pixel format.
* - 'yuv420p10' 10-bit HDR pixel format.
* - 'yuv422p10' 10-bit HDR pixel format.
* - 'yuv444p10' 10-bit HDR pixel format.
* - 'yuv420p12' 12-bit HDR pixel format.
* - 'yuv422p12' 12-bit HDR pixel format.
* - 'yuv444p12' 12-bit HDR pixel format.
* </pre>
*
* <code>string pixel_format = 7;</code>
*
* @return The bytes for pixelFormat.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPixelFormatBytes() {
java.lang.Object ref = pixelFormat_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
pixelFormat_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BITRATE_BPS_FIELD_NUMBER = 8;
private int bitrateBps_;
/**
*
*
* <pre>
* Required. The video bitrate in bits per second. Must be between 1 and 1,000,000,000.
* </pre>
*
* <code>int32 bitrate_bps = 8 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bitrateBps.
*/
@java.lang.Override
public int getBitrateBps() {
return bitrateBps_;
}
public static final int RATE_CONTROL_MODE_FIELD_NUMBER = 9;
private volatile java.lang.Object rateControlMode_;
/**
*
*
* <pre>
* Specify the `rate_control_mode`. The default is `"vbr"`.
* Supported rate control modes:
* - 'vbr' - variable bitrate
* - 'crf' - constant rate factor
* </pre>
*
* <code>string rate_control_mode = 9;</code>
*
* @return The rateControlMode.
*/
@java.lang.Override
public java.lang.String getRateControlMode() {
java.lang.Object ref = rateControlMode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rateControlMode_ = s;
return s;
}
}
/**
*
*
* <pre>
* Specify the `rate_control_mode`. The default is `"vbr"`.
* Supported rate control modes:
* - 'vbr' - variable bitrate
* - 'crf' - constant rate factor
* </pre>
*
* <code>string rate_control_mode = 9;</code>
*
* @return The bytes for rateControlMode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRateControlModeBytes() {
java.lang.Object ref = rateControlMode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
rateControlMode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENABLE_TWO_PASS_FIELD_NUMBER = 10;
private boolean enableTwoPass_;
/**
*
*
* <pre>
* Use two-pass encoding strategy to achieve better video quality.
* `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`.
* </pre>
*
* <code>bool enable_two_pass = 10;</code>
*
* @return The enableTwoPass.
*/
@java.lang.Override
public boolean getEnableTwoPass() {
return enableTwoPass_;
}
public static final int CRF_LEVEL_FIELD_NUMBER = 11;
private int crfLevel_;
/**
*
*
* <pre>
* Target CRF level. Must be between 10 and 36, where 10 is the highest
* quality and 36 is the most efficient compression. The default is 21.
* </pre>
*
* <code>int32 crf_level = 11;</code>
*
* @return The crfLevel.
*/
@java.lang.Override
public int getCrfLevel() {
return crfLevel_;
}
public static final int VBV_SIZE_BITS_FIELD_NUMBER = 12;
private int vbvSizeBits_;
/**
*
*
* <pre>
* Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater
* than zero. The default is equal to `VideoStream.bitrate_bps`.
* </pre>
*
* <code>int32 vbv_size_bits = 12;</code>
*
* @return The vbvSizeBits.
*/
@java.lang.Override
public int getVbvSizeBits() {
return vbvSizeBits_;
}
public static final int VBV_FULLNESS_BITS_FIELD_NUMBER = 13;
private int vbvFullnessBits_;
/**
*
*
* <pre>
* Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must
* be greater than zero. The default is equal to 90% of
* `VideoStream.vbv_size_bits`.
* </pre>
*
* <code>int32 vbv_fullness_bits = 13;</code>
*
* @return The vbvFullnessBits.
*/
@java.lang.Override
public int getVbvFullnessBits() {
return vbvFullnessBits_;
}
public static final int ALLOW_OPEN_GOP_FIELD_NUMBER = 14;
private boolean allowOpenGop_;
/**
*
*
* <pre>
* Specifies whether an open Group of Pictures (GOP) structure should be
* allowed or not. The default is `false`.
* </pre>
*
* <code>bool allow_open_gop = 14;</code>
*
* @return The allowOpenGop.
*/
@java.lang.Override
public boolean getAllowOpenGop() {
return allowOpenGop_;
}
public static final int GOP_FRAME_COUNT_FIELD_NUMBER = 15;
/**
*
*
* <pre>
* Select the GOP size based on the specified frame count. Must be greater
* than zero.
* </pre>
*
* <code>int32 gop_frame_count = 15;</code>
*
* @return The gopFrameCount.
*/
@java.lang.Override
public int getGopFrameCount() {
if (gopModeCase_ == 15) {
return (java.lang.Integer) gopMode_;
}
return 0;
}
public static final int GOP_DURATION_FIELD_NUMBER = 16;
/**
*
*
* <pre>
* Select the GOP size based on the specified duration. The default is
* `"3s"`.
* </pre>
*
* <code>.google.protobuf.Duration gop_duration = 16;</code>
*
* @return Whether the gopDuration field is set.
*/
@java.lang.Override
public boolean hasGopDuration() {
return gopModeCase_ == 16;
}
/**
*
*
* <pre>
* Select the GOP size based on the specified duration. The default is
* `"3s"`.
* </pre>
*
* <code>.google.protobuf.Duration gop_duration = 16;</code>
*
* @return The gopDuration.
*/
@java.lang.Override
public com.google.protobuf.Duration getGopDuration() {
if (gopModeCase_ == 16) {
return (com.google.protobuf.Duration) gopMode_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
/**
*
*
* <pre>
* Select the GOP size based on the specified duration. The default is
* `"3s"`.
* </pre>
*
* <code>.google.protobuf.Duration gop_duration = 16;</code>
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGopDurationOrBuilder() {
if (gopModeCase_ == 16) {
return (com.google.protobuf.Duration) gopMode_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
public static final int ENTROPY_CODER_FIELD_NUMBER = 17;
private volatile java.lang.Object entropyCoder_;
/**
*
*
* <pre>
* The entropy coder to use. The default is `"cabac"`.
* Supported entropy coders:
* - 'cavlc'
* - 'cabac'
* </pre>
*
* <code>string entropy_coder = 17;</code>
*
* @return The entropyCoder.
*/
@java.lang.Override
public java.lang.String getEntropyCoder() {
java.lang.Object ref = entropyCoder_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
entropyCoder_ = s;
return s;
}
}
/**
*
*
* <pre>
* The entropy coder to use. The default is `"cabac"`.
* Supported entropy coders:
* - 'cavlc'
* - 'cabac'
* </pre>
*
* <code>string entropy_coder = 17;</code>
*
* @return The bytes for entropyCoder.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEntropyCoderBytes() {
java.lang.Object ref = entropyCoder_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
entropyCoder_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int B_PYRAMID_FIELD_NUMBER = 18;
private boolean bPyramid_;
/**
*
*
* <pre>
* Allow B-pyramid for reference frame selection. This may not be supported
* on all decoders. The default is `false`.
* </pre>
*
* <code>bool b_pyramid = 18;</code>
*
* @return The bPyramid.
*/
@java.lang.Override
public boolean getBPyramid() {
return bPyramid_;
}
public static final int B_FRAME_COUNT_FIELD_NUMBER = 19;
private int bFrameCount_;
/**
*
*
* <pre>
* The number of consecutive B-frames. Must be greater than or equal to zero.
* Must be less than `VideoStream.gop_frame_count` if set. The default is 0.
* </pre>
*
* <code>int32 b_frame_count = 19;</code>
*
* @return The bFrameCount.
*/
@java.lang.Override
public int getBFrameCount() {
return bFrameCount_;
}
public static final int FRAME_RATE_FIELD_NUMBER = 20;
private double frameRate_;
/**
*
*
* <pre>
* Required. The target video frame rate in frames per second (FPS). Must be less than
* or equal to 120. Will default to the input frame rate if larger than the
* input frame rate. The API will generate an output FPS that is divisible by
* the input FPS, and smaller or equal to the target FPS.
* The following table shows the computed video FPS given the target FPS (in
* parenthesis) and input FPS (in the first column):
* ```
* | | (30) | (60) | (25) | (50) |
* |--------|--------|--------|------|------|
* | 240 | Fail | Fail | Fail | Fail |
* | 120 | 30 | 60 | 20 | 30 |
* | 100 | 25 | 50 | 20 | 30 |
* | 50 | 25 | 50 | 20 | 30 |
* | 60 | 30 | 60 | 20 | 30 |
* | 59.94 | 29.97 | 59.94 | 20 | 30 |
* | 48 | 24 | 48 | 20 | 30 |
* | 30 | 30 | 30 | 20 | 30 |
* | 25 | 25 | 25 | 20 | 30 |
* | 24 | 24 | 24 | 20 | 30 |
* | 23.976 | 23.976 | 23.976 | 20 | 30 |
* | 15 | 15 | 15 | 20 | 30 |
* | 12 | 12 | 12 | 20 | 30 |
* | 10 | 10 | 10 | 20 | 30 |
* ```
* </pre>
*
* <code>double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The frameRate.
*/
@java.lang.Override
public double getFrameRate() {
return frameRate_;
}
public static final int AQ_STRENGTH_FIELD_NUMBER = 21;
private double aqStrength_;
/**
*
*
* <pre>
* Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and
* 1, where 0 disables the quantizer and 1 maximizes the quantizer. A
* higher value equals a lower bitrate but smoother image. The default is 0.
* </pre>
*
* <code>double aq_strength = 21;</code>