Shaka Player Embedded
media_tests.pb.cc
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: shaka/test/src/media/media_tests.proto
3 
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 extern PROTOBUF_INTERNAL_EXPORT_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto;
16 extern PROTOBUF_INTERNAL_EXPORT_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto;
17 namespace shaka {
18 namespace proto {
20  public:
21  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MediaInfo_Frame> _instance;
24  public:
25  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MediaInfo_Stream> _instance;
28  public:
29  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MediaInfo> _instance;
31 } // namespace proto
32 } // namespace shaka
33 static void InitDefaultsscc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto() {
34  GOOGLE_PROTOBUF_VERIFY_VERSION;
35 
36  {
38  new (ptr) ::shaka::proto::MediaInfo();
39  ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
40  }
42 }
43 
44 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto =
45  {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto}, {
48 
49 static void InitDefaultsscc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto() {
50  GOOGLE_PROTOBUF_VERIFY_VERSION;
51 
52  {
54  new (ptr) ::shaka::proto::MediaInfo_Frame();
55  ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
56  }
58 }
59 
61  {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto}, {}};
62 
63 static void InitDefaultsscc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto() {
64  GOOGLE_PROTOBUF_VERIFY_VERSION;
65 
66  {
68  new (ptr) ::shaka::proto::MediaInfo_Stream();
69  ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
70  }
72 }
73 
75  {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto}, {}};
76 
77 namespace shaka {
78 namespace proto {
79 
80 // ===================================================================
81 
83 }
85  public:
86  using HasBits = decltype(std::declval<MediaInfo_Frame>()._has_bits_);
87  static void set_has_pts(HasBits* has_bits) {
88  (*has_bits)[0] |= 2u;
89  }
90  static void set_has_dts(HasBits* has_bits) {
91  (*has_bits)[0] |= 4u;
92  }
93  static void set_has_duration(HasBits* has_bits) {
94  (*has_bits)[0] |= 8u;
95  }
96  static void set_has_is_encrypted(HasBits* has_bits) {
97  (*has_bits)[0] |= 16u;
98  }
99  static void set_has_data_hash(HasBits* has_bits) {
100  (*has_bits)[0] |= 1u;
101  }
102 };
103 
105  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
106  SharedCtor();
107  // @@protoc_insertion_point(constructor:shaka.proto.MediaInfo.Frame)
108 }
110  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
111  _internal_metadata_(nullptr),
112  _has_bits_(from._has_bits_) {
113  _internal_metadata_.MergeFrom(from._internal_metadata_);
114  data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
115  if (from.has_data_hash()) {
116  data_hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_hash_);
117  }
118  ::memcpy(&pts_, &from.pts_,
119  static_cast<size_t>(reinterpret_cast<char*>(&is_encrypted_) -
120  reinterpret_cast<char*>(&pts_)) + sizeof(is_encrypted_));
121  // @@protoc_insertion_point(copy_constructor:shaka.proto.MediaInfo.Frame)
122 }
123 
124 void MediaInfo_Frame::SharedCtor() {
125  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
126  data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
127  ::memset(&pts_, 0, static_cast<size_t>(
128  reinterpret_cast<char*>(&is_encrypted_) -
129  reinterpret_cast<char*>(&pts_)) + sizeof(is_encrypted_));
130 }
131 
133  // @@protoc_insertion_point(destructor:shaka.proto.MediaInfo.Frame)
134  SharedDtor();
135 }
136 
137 void MediaInfo_Frame::SharedDtor() {
138  data_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
139 }
140 
141 void MediaInfo_Frame::SetCachedSize(int size) const {
142  _cached_size_.Set(size);
143 }
145  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
146  return *internal_default_instance();
147 }
148 
149 
151 // @@protoc_insertion_point(message_clear_start:shaka.proto.MediaInfo.Frame)
152  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
153  // Prevent compiler warnings about cached_has_bits being unused
154  (void) cached_has_bits;
155 
156  cached_has_bits = _has_bits_[0];
157  if (cached_has_bits & 0x00000001u) {
158  data_hash_.ClearNonDefaultToEmptyNoArena();
159  }
160  if (cached_has_bits & 0x0000001eu) {
161  ::memset(&pts_, 0, static_cast<size_t>(
162  reinterpret_cast<char*>(&is_encrypted_) -
163  reinterpret_cast<char*>(&pts_)) + sizeof(is_encrypted_));
164  }
165  _has_bits_.Clear();
166  _internal_metadata_.Clear();
167 }
168 
169 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
170 const char* MediaInfo_Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
171 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
172  _Internal::HasBits has_bits{};
173  while (!ctx->Done(&ptr)) {
174  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
175  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
176  CHK_(ptr);
177  switch (tag >> 3) {
178  // required double pts = 1;
179  case 1:
180  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) {
181  _Internal::set_has_pts(&has_bits);
182  pts_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
183  ptr += sizeof(double);
184  } else goto handle_unusual;
185  continue;
186  // required double dts = 2;
187  case 2:
188  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
189  _Internal::set_has_dts(&has_bits);
190  dts_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
191  ptr += sizeof(double);
192  } else goto handle_unusual;
193  continue;
194  // optional double duration = 3;
195  case 3:
196  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 25)) {
197  _Internal::set_has_duration(&has_bits);
198  duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
199  ptr += sizeof(double);
200  } else goto handle_unusual;
201  continue;
202  // optional bool is_encrypted = 4;
203  case 4:
204  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
206  is_encrypted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
207  CHK_(ptr);
208  } else goto handle_unusual;
209  continue;
210  // required string data_hash = 5;
211  case 5:
212  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
213  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_data_hash(), ptr, ctx);
214  CHK_(ptr);
215  } else goto handle_unusual;
216  continue;
217  default: {
218  handle_unusual:
219  if ((tag & 7) == 4 || tag == 0) {
220  ctx->SetLastTag(tag);
221  goto success;
222  }
223  ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
224  CHK_(ptr != nullptr);
225  continue;
226  }
227  } // switch
228  } // while
229 success:
230  _has_bits_.Or(has_bits);
231  return ptr;
232 failure:
233  ptr = nullptr;
234  goto success;
235 #undef CHK_
236 }
237 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
239  ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
240 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
241  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
242  ::PROTOBUF_NAMESPACE_ID::internal::LiteUnknownFieldSetter unknown_fields_setter(
243  &_internal_metadata_);
244  ::PROTOBUF_NAMESPACE_ID::io::StringOutputStream unknown_fields_output(
245  unknown_fields_setter.buffer());
246  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream unknown_fields_stream(
247  &unknown_fields_output, false);
248  // @@protoc_insertion_point(parse_start:shaka.proto.MediaInfo.Frame)
249  for (;;) {
250  ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
251  tag = p.first;
252  if (!p.second) goto handle_unusual;
253  switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
254  // required double pts = 1;
255  case 1: {
256  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (9 & 0xFF)) {
257  _Internal::set_has_pts(&_has_bits_);
258  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
259  double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
260  input, &pts_)));
261  } else {
262  goto handle_unusual;
263  }
264  break;
265  }
266 
267  // required double dts = 2;
268  case 2: {
269  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) {
270  _Internal::set_has_dts(&_has_bits_);
271  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
272  double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
273  input, &dts_)));
274  } else {
275  goto handle_unusual;
276  }
277  break;
278  }
279 
280  // optional double duration = 3;
281  case 3: {
282  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (25 & 0xFF)) {
283  _Internal::set_has_duration(&_has_bits_);
284  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
285  double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
286  input, &duration_)));
287  } else {
288  goto handle_unusual;
289  }
290  break;
291  }
292 
293  // optional bool is_encrypted = 4;
294  case 4: {
295  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
296  _Internal::set_has_is_encrypted(&_has_bits_);
297  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
298  bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
299  input, &is_encrypted_)));
300  } else {
301  goto handle_unusual;
302  }
303  break;
304  }
305 
306  // required string data_hash = 5;
307  case 5: {
308  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
309  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
310  input, this->mutable_data_hash()));
311  } else {
312  goto handle_unusual;
313  }
314  break;
315  }
316 
317  default: {
318  handle_unusual:
319  if (tag == 0) {
320  goto success;
321  }
322  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SkipField(
323  input, tag, &unknown_fields_stream));
324  break;
325  }
326  }
327  }
328 success:
329  // @@protoc_insertion_point(parse_success:shaka.proto.MediaInfo.Frame)
330  return true;
331 failure:
332  // @@protoc_insertion_point(parse_failure:shaka.proto.MediaInfo.Frame)
333  return false;
334 #undef DO_
335 }
336 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
337 
339  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
340  // @@protoc_insertion_point(serialize_start:shaka.proto.MediaInfo.Frame)
341  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
342  (void) cached_has_bits;
343 
344  cached_has_bits = _has_bits_[0];
345  // required double pts = 1;
346  if (cached_has_bits & 0x00000002u) {
347  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(1, this->pts(), output);
348  }
349 
350  // required double dts = 2;
351  if (cached_has_bits & 0x00000004u) {
352  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->dts(), output);
353  }
354 
355  // optional double duration = 3;
356  if (cached_has_bits & 0x00000008u) {
357  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(3, this->duration(), output);
358  }
359 
360  // optional bool is_encrypted = 4;
361  if (cached_has_bits & 0x00000010u) {
362  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->is_encrypted(), output);
363  }
364 
365  // required string data_hash = 5;
366  if (cached_has_bits & 0x00000001u) {
367  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
368  5, this->data_hash(), output);
369  }
370 
371  output->WriteRaw(_internal_metadata_.unknown_fields().data(),
372  static_cast<int>(_internal_metadata_.unknown_fields().size()));
373  // @@protoc_insertion_point(serialize_end:shaka.proto.MediaInfo.Frame)
374 }
375 
376 size_t MediaInfo_Frame::RequiredFieldsByteSizeFallback() const {
377 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:shaka.proto.MediaInfo.Frame)
378  size_t total_size = 0;
379 
380  if (has_data_hash()) {
381  // required string data_hash = 5;
382  total_size += 1 +
383  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
384  this->data_hash());
385  }
386 
387  if (has_pts()) {
388  // required double pts = 1;
389  total_size += 1 + 8;
390  }
391 
392  if (has_dts()) {
393  // required double dts = 2;
394  total_size += 1 + 8;
395  }
396 
397  return total_size;
398 }
400 // @@protoc_insertion_point(message_byte_size_start:shaka.proto.MediaInfo.Frame)
401  size_t total_size = 0;
402 
403  total_size += _internal_metadata_.unknown_fields().size();
404 
405  if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
406  // required string data_hash = 5;
407  total_size += 1 +
408  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
409  this->data_hash());
410 
411  // required double pts = 1;
412  total_size += 1 + 8;
413 
414  // required double dts = 2;
415  total_size += 1 + 8;
416 
417  } else {
418  total_size += RequiredFieldsByteSizeFallback();
419  }
420  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
421  // Prevent compiler warnings about cached_has_bits being unused
422  (void) cached_has_bits;
423 
424  cached_has_bits = _has_bits_[0];
425  if (cached_has_bits & 0x00000018u) {
426  // optional double duration = 3;
427  if (cached_has_bits & 0x00000008u) {
428  total_size += 1 + 8;
429  }
430 
431  // optional bool is_encrypted = 4;
432  if (cached_has_bits & 0x00000010u) {
433  total_size += 1 + 1;
434  }
435 
436  }
437  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
438  SetCachedSize(cached_size);
439  return total_size;
440 }
441 
443  const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
444  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const MediaInfo_Frame*>(
445  &from));
446 }
447 
449 // @@protoc_insertion_point(class_specific_merge_from_start:shaka.proto.MediaInfo.Frame)
450  GOOGLE_DCHECK_NE(&from, this);
451  _internal_metadata_.MergeFrom(from._internal_metadata_);
452  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
453  (void) cached_has_bits;
454 
455  cached_has_bits = from._has_bits_[0];
456  if (cached_has_bits & 0x0000001fu) {
457  if (cached_has_bits & 0x00000001u) {
458  _has_bits_[0] |= 0x00000001u;
459  data_hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_hash_);
460  }
461  if (cached_has_bits & 0x00000002u) {
462  pts_ = from.pts_;
463  }
464  if (cached_has_bits & 0x00000004u) {
465  dts_ = from.dts_;
466  }
467  if (cached_has_bits & 0x00000008u) {
468  duration_ = from.duration_;
469  }
470  if (cached_has_bits & 0x00000010u) {
471  is_encrypted_ = from.is_encrypted_;
472  }
473  _has_bits_[0] |= cached_has_bits;
474  }
475 }
476 
478 // @@protoc_insertion_point(class_specific_copy_from_start:shaka.proto.MediaInfo.Frame)
479  if (&from == this) return;
480  Clear();
481  MergeFrom(from);
482 }
483 
485  if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
486  return true;
487 }
488 
489 void MediaInfo_Frame::InternalSwap(MediaInfo_Frame* other) {
490  using std::swap;
491  _internal_metadata_.Swap(&other->_internal_metadata_);
492  swap(_has_bits_[0], other->_has_bits_[0]);
493  data_hash_.Swap(&other->data_hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
494  GetArenaNoVirtual());
495  swap(pts_, other->pts_);
496  swap(dts_, other->dts_);
497  swap(duration_, other->duration_);
498  swap(is_encrypted_, other->is_encrypted_);
499 }
500 
501 std::string MediaInfo_Frame::GetTypeName() const {
502  return "shaka.proto.MediaInfo.Frame";
503 }
504 
505 
506 // ===================================================================
507 
509 }
511  public:
512  using HasBits = decltype(std::declval<MediaInfo_Stream>()._has_bits_);
513  static void set_has_time_scale_num(HasBits* has_bits) {
514  (*has_bits)[0] |= 2u;
515  }
516  static void set_has_time_scale_den(HasBits* has_bits) {
517  (*has_bits)[0] |= 4u;
518  }
519  static void set_has_is_video(HasBits* has_bits) {
520  (*has_bits)[0] |= 8u;
521  }
522  static void set_has_extra_data_hash(HasBits* has_bits) {
523  (*has_bits)[0] |= 1u;
524  }
525  static void set_has_sar_num(HasBits* has_bits) {
526  (*has_bits)[0] |= 16u;
527  }
528  static void set_has_sar_den(HasBits* has_bits) {
529  (*has_bits)[0] |= 32u;
530  }
531 };
532 
534  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
535  SharedCtor();
536  // @@protoc_insertion_point(constructor:shaka.proto.MediaInfo.Stream)
537 }
539  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
540  _internal_metadata_(nullptr),
541  _has_bits_(from._has_bits_) {
542  _internal_metadata_.MergeFrom(from._internal_metadata_);
543  extra_data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
544  if (from.has_extra_data_hash()) {
545  extra_data_hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_data_hash_);
546  }
547  ::memcpy(&time_scale_num_, &from.time_scale_num_,
548  static_cast<size_t>(reinterpret_cast<char*>(&sar_den_) -
549  reinterpret_cast<char*>(&time_scale_num_)) + sizeof(sar_den_));
550  // @@protoc_insertion_point(copy_constructor:shaka.proto.MediaInfo.Stream)
551 }
552 
553 void MediaInfo_Stream::SharedCtor() {
554  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
555  extra_data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
556  ::memset(&time_scale_num_, 0, static_cast<size_t>(
557  reinterpret_cast<char*>(&sar_den_) -
558  reinterpret_cast<char*>(&time_scale_num_)) + sizeof(sar_den_));
559 }
560 
562  // @@protoc_insertion_point(destructor:shaka.proto.MediaInfo.Stream)
563  SharedDtor();
564 }
565 
566 void MediaInfo_Stream::SharedDtor() {
567  extra_data_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
568 }
569 
570 void MediaInfo_Stream::SetCachedSize(int size) const {
571  _cached_size_.Set(size);
572 }
574  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
575  return *internal_default_instance();
576 }
577 
578 
580 // @@protoc_insertion_point(message_clear_start:shaka.proto.MediaInfo.Stream)
581  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
582  // Prevent compiler warnings about cached_has_bits being unused
583  (void) cached_has_bits;
584 
585  cached_has_bits = _has_bits_[0];
586  if (cached_has_bits & 0x00000001u) {
587  extra_data_hash_.ClearNonDefaultToEmptyNoArena();
588  }
589  if (cached_has_bits & 0x0000003eu) {
590  ::memset(&time_scale_num_, 0, static_cast<size_t>(
591  reinterpret_cast<char*>(&sar_den_) -
592  reinterpret_cast<char*>(&time_scale_num_)) + sizeof(sar_den_));
593  }
594  _has_bits_.Clear();
595  _internal_metadata_.Clear();
596 }
597 
598 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
599 const char* MediaInfo_Stream::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
600 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
601  _Internal::HasBits has_bits{};
602  while (!ctx->Done(&ptr)) {
603  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
604  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
605  CHK_(ptr);
606  switch (tag >> 3) {
607  // required uint32 time_scale_num = 1;
608  case 1:
609  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
611  time_scale_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
612  CHK_(ptr);
613  } else goto handle_unusual;
614  continue;
615  // required uint32 time_scale_den = 2;
616  case 2:
617  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
619  time_scale_den_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
620  CHK_(ptr);
621  } else goto handle_unusual;
622  continue;
623  // required bool is_video = 3;
624  case 3:
625  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
626  _Internal::set_has_is_video(&has_bits);
627  is_video_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
628  CHK_(ptr);
629  } else goto handle_unusual;
630  continue;
631  // required string extra_data_hash = 4;
632  case 4:
633  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
634  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_extra_data_hash(), ptr, ctx);
635  CHK_(ptr);
636  } else goto handle_unusual;
637  continue;
638  // required uint32 sar_num = 5;
639  case 5:
640  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
641  _Internal::set_has_sar_num(&has_bits);
642  sar_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
643  CHK_(ptr);
644  } else goto handle_unusual;
645  continue;
646  // required uint32 sar_den = 6;
647  case 6:
648  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
649  _Internal::set_has_sar_den(&has_bits);
650  sar_den_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
651  CHK_(ptr);
652  } else goto handle_unusual;
653  continue;
654  default: {
655  handle_unusual:
656  if ((tag & 7) == 4 || tag == 0) {
657  ctx->SetLastTag(tag);
658  goto success;
659  }
660  ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
661  CHK_(ptr != nullptr);
662  continue;
663  }
664  } // switch
665  } // while
666 success:
667  _has_bits_.Or(has_bits);
668  return ptr;
669 failure:
670  ptr = nullptr;
671  goto success;
672 #undef CHK_
673 }
674 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
676  ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
677 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
678  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
679  ::PROTOBUF_NAMESPACE_ID::internal::LiteUnknownFieldSetter unknown_fields_setter(
680  &_internal_metadata_);
681  ::PROTOBUF_NAMESPACE_ID::io::StringOutputStream unknown_fields_output(
682  unknown_fields_setter.buffer());
683  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream unknown_fields_stream(
684  &unknown_fields_output, false);
685  // @@protoc_insertion_point(parse_start:shaka.proto.MediaInfo.Stream)
686  for (;;) {
687  ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
688  tag = p.first;
689  if (!p.second) goto handle_unusual;
690  switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
691  // required uint32 time_scale_num = 1;
692  case 1: {
693  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
695  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
696  ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>(
697  input, &time_scale_num_)));
698  } else {
699  goto handle_unusual;
700  }
701  break;
702  }
703 
704  // required uint32 time_scale_den = 2;
705  case 2: {
706  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
708  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
709  ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>(
710  input, &time_scale_den_)));
711  } else {
712  goto handle_unusual;
713  }
714  break;
715  }
716 
717  // required bool is_video = 3;
718  case 3: {
719  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
720  _Internal::set_has_is_video(&_has_bits_);
721  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
722  bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
723  input, &is_video_)));
724  } else {
725  goto handle_unusual;
726  }
727  break;
728  }
729 
730  // required string extra_data_hash = 4;
731  case 4: {
732  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
733  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
734  input, this->mutable_extra_data_hash()));
735  } else {
736  goto handle_unusual;
737  }
738  break;
739  }
740 
741  // required uint32 sar_num = 5;
742  case 5: {
743  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
744  _Internal::set_has_sar_num(&_has_bits_);
745  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
746  ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>(
747  input, &sar_num_)));
748  } else {
749  goto handle_unusual;
750  }
751  break;
752  }
753 
754  // required uint32 sar_den = 6;
755  case 6: {
756  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
757  _Internal::set_has_sar_den(&_has_bits_);
758  DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
759  ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>(
760  input, &sar_den_)));
761  } else {
762  goto handle_unusual;
763  }
764  break;
765  }
766 
767  default: {
768  handle_unusual:
769  if (tag == 0) {
770  goto success;
771  }
772  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SkipField(
773  input, tag, &unknown_fields_stream));
774  break;
775  }
776  }
777  }
778 success:
779  // @@protoc_insertion_point(parse_success:shaka.proto.MediaInfo.Stream)
780  return true;
781 failure:
782  // @@protoc_insertion_point(parse_failure:shaka.proto.MediaInfo.Stream)
783  return false;
784 #undef DO_
785 }
786 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
787 
789  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
790  // @@protoc_insertion_point(serialize_start:shaka.proto.MediaInfo.Stream)
791  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
792  (void) cached_has_bits;
793 
794  cached_has_bits = _has_bits_[0];
795  // required uint32 time_scale_num = 1;
796  if (cached_has_bits & 0x00000002u) {
797  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(1, this->time_scale_num(), output);
798  }
799 
800  // required uint32 time_scale_den = 2;
801  if (cached_has_bits & 0x00000004u) {
802  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(2, this->time_scale_den(), output);
803  }
804 
805  // required bool is_video = 3;
806  if (cached_has_bits & 0x00000008u) {
807  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->is_video(), output);
808  }
809 
810  // required string extra_data_hash = 4;
811  if (cached_has_bits & 0x00000001u) {
812  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
813  4, this->extra_data_hash(), output);
814  }
815 
816  // required uint32 sar_num = 5;
817  if (cached_has_bits & 0x00000010u) {
818  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(5, this->sar_num(), output);
819  }
820 
821  // required uint32 sar_den = 6;
822  if (cached_has_bits & 0x00000020u) {
823  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(6, this->sar_den(), output);
824  }
825 
826  output->WriteRaw(_internal_metadata_.unknown_fields().data(),
827  static_cast<int>(_internal_metadata_.unknown_fields().size()));
828  // @@protoc_insertion_point(serialize_end:shaka.proto.MediaInfo.Stream)
829 }
830 
831 size_t MediaInfo_Stream::RequiredFieldsByteSizeFallback() const {
832 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:shaka.proto.MediaInfo.Stream)
833  size_t total_size = 0;
834 
835  if (has_extra_data_hash()) {
836  // required string extra_data_hash = 4;
837  total_size += 1 +
838  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
839  this->extra_data_hash());
840  }
841 
842  if (has_time_scale_num()) {
843  // required uint32 time_scale_num = 1;
844  total_size += 1 +
845  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
846  this->time_scale_num());
847  }
848 
849  if (has_time_scale_den()) {
850  // required uint32 time_scale_den = 2;
851  total_size += 1 +
852  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
853  this->time_scale_den());
854  }
855 
856  if (has_is_video()) {
857  // required bool is_video = 3;
858  total_size += 1 + 1;
859  }
860 
861  if (has_sar_num()) {
862  // required uint32 sar_num = 5;
863  total_size += 1 +
864  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
865  this->sar_num());
866  }
867 
868  if (has_sar_den()) {
869  // required uint32 sar_den = 6;
870  total_size += 1 +
871  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
872  this->sar_den());
873  }
874 
875  return total_size;
876 }
878 // @@protoc_insertion_point(message_byte_size_start:shaka.proto.MediaInfo.Stream)
879  size_t total_size = 0;
880 
881  total_size += _internal_metadata_.unknown_fields().size();
882 
883  if (((_has_bits_[0] & 0x0000003f) ^ 0x0000003f) == 0) { // All required fields are present.
884  // required string extra_data_hash = 4;
885  total_size += 1 +
886  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
887  this->extra_data_hash());
888 
889  // required uint32 time_scale_num = 1;
890  total_size += 1 +
891  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
892  this->time_scale_num());
893 
894  // required uint32 time_scale_den = 2;
895  total_size += 1 +
896  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
897  this->time_scale_den());
898 
899  // required bool is_video = 3;
900  total_size += 1 + 1;
901 
902  // required uint32 sar_num = 5;
903  total_size += 1 +
904  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
905  this->sar_num());
906 
907  // required uint32 sar_den = 6;
908  total_size += 1 +
909  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
910  this->sar_den());
911 
912  } else {
913  total_size += RequiredFieldsByteSizeFallback();
914  }
915  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
916  // Prevent compiler warnings about cached_has_bits being unused
917  (void) cached_has_bits;
918 
919  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
920  SetCachedSize(cached_size);
921  return total_size;
922 }
923 
925  const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
926  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const MediaInfo_Stream*>(
927  &from));
928 }
929 
931 // @@protoc_insertion_point(class_specific_merge_from_start:shaka.proto.MediaInfo.Stream)
932  GOOGLE_DCHECK_NE(&from, this);
933  _internal_metadata_.MergeFrom(from._internal_metadata_);
934  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
935  (void) cached_has_bits;
936 
937  cached_has_bits = from._has_bits_[0];
938  if (cached_has_bits & 0x0000003fu) {
939  if (cached_has_bits & 0x00000001u) {
940  _has_bits_[0] |= 0x00000001u;
941  extra_data_hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_data_hash_);
942  }
943  if (cached_has_bits & 0x00000002u) {
944  time_scale_num_ = from.time_scale_num_;
945  }
946  if (cached_has_bits & 0x00000004u) {
947  time_scale_den_ = from.time_scale_den_;
948  }
949  if (cached_has_bits & 0x00000008u) {
950  is_video_ = from.is_video_;
951  }
952  if (cached_has_bits & 0x00000010u) {
953  sar_num_ = from.sar_num_;
954  }
955  if (cached_has_bits & 0x00000020u) {
956  sar_den_ = from.sar_den_;
957  }
958  _has_bits_[0] |= cached_has_bits;
959  }
960 }
961 
963 // @@protoc_insertion_point(class_specific_copy_from_start:shaka.proto.MediaInfo.Stream)
964  if (&from == this) return;
965  Clear();
966  MergeFrom(from);
967 }
968 
970  if ((_has_bits_[0] & 0x0000003f) != 0x0000003f) return false;
971  return true;
972 }
973 
974 void MediaInfo_Stream::InternalSwap(MediaInfo_Stream* other) {
975  using std::swap;
976  _internal_metadata_.Swap(&other->_internal_metadata_);
977  swap(_has_bits_[0], other->_has_bits_[0]);
978  extra_data_hash_.Swap(&other->extra_data_hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
979  GetArenaNoVirtual());
980  swap(time_scale_num_, other->time_scale_num_);
981  swap(time_scale_den_, other->time_scale_den_);
982  swap(is_video_, other->is_video_);
983  swap(sar_num_, other->sar_num_);
984  swap(sar_den_, other->sar_den_);
985 }
986 
987 std::string MediaInfo_Stream::GetTypeName() const {
988  return "shaka.proto.MediaInfo.Stream";
989 }
990 
991 
992 // ===================================================================
993 
997 }
999  public:
1000  using HasBits = decltype(std::declval<MediaInfo>()._has_bits_);
1001  static void set_has_mime(HasBits* has_bits) {
1002  (*has_bits)[0] |= 1u;
1003  }
1004  static const ::shaka::proto::MediaInfo_Stream& stream(const MediaInfo* msg);
1005  static void set_has_stream(HasBits* has_bits) {
1006  (*has_bits)[0] |= 2u;
1007  }
1008 };
1009 
1010 const ::shaka::proto::MediaInfo_Stream&
1012  return *msg->stream_;
1013 }
1015  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
1016  SharedCtor();
1017  // @@protoc_insertion_point(constructor:shaka.proto.MediaInfo)
1018 }
1020  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
1021  _internal_metadata_(nullptr),
1022  _has_bits_(from._has_bits_),
1023  frames_(from.frames_) {
1024  _internal_metadata_.MergeFrom(from._internal_metadata_);
1025  mime_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1026  if (from.has_mime()) {
1027  mime_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.mime_);
1028  }
1029  if (from.has_stream()) {
1030  stream_ = new ::shaka::proto::MediaInfo_Stream(*from.stream_);
1031  } else {
1032  stream_ = nullptr;
1033  }
1034  // @@protoc_insertion_point(copy_constructor:shaka.proto.MediaInfo)
1035 }
1036 
1037 void MediaInfo::SharedCtor() {
1038  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
1039  mime_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1040  stream_ = nullptr;
1041 }
1042 
1044  // @@protoc_insertion_point(destructor:shaka.proto.MediaInfo)
1045  SharedDtor();
1046 }
1047 
1048 void MediaInfo::SharedDtor() {
1049  mime_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1050  if (this != internal_default_instance()) delete stream_;
1051 }
1052 
1053 void MediaInfo::SetCachedSize(int size) const {
1054  _cached_size_.Set(size);
1055 }
1057  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto.base);
1058  return *internal_default_instance();
1059 }
1060 
1061 
1063 // @@protoc_insertion_point(message_clear_start:shaka.proto.MediaInfo)
1064  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1065  // Prevent compiler warnings about cached_has_bits being unused
1066  (void) cached_has_bits;
1067 
1068  frames_.Clear();
1069  cached_has_bits = _has_bits_[0];
1070  if (cached_has_bits & 0x00000003u) {
1071  if (cached_has_bits & 0x00000001u) {
1072  mime_.ClearNonDefaultToEmptyNoArena();
1073  }
1074  if (cached_has_bits & 0x00000002u) {
1075  GOOGLE_DCHECK(stream_ != nullptr);
1076  stream_->Clear();
1077  }
1078  }
1079  _has_bits_.Clear();
1080  _internal_metadata_.Clear();
1081 }
1082 
1083 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1084 const char* MediaInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1085 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1086  _Internal::HasBits has_bits{};
1087  while (!ctx->Done(&ptr)) {
1088  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1089  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1090  CHK_(ptr);
1091  switch (tag >> 3) {
1092  // required string mime = 1;
1093  case 1:
1094  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1095  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_mime(), ptr, ctx);
1096  CHK_(ptr);
1097  } else goto handle_unusual;
1098  continue;
1099  // repeated .shaka.proto.MediaInfo.Frame frames = 2;
1100  case 2:
1101  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1102  ptr -= 1;
1103  do {
1104  ptr += 1;
1105  ptr = ctx->ParseMessage(add_frames(), ptr);
1106  CHK_(ptr);
1107  if (!ctx->DataAvailable(ptr)) break;
1108  } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
1109  } else goto handle_unusual;
1110  continue;
1111  // required .shaka.proto.MediaInfo.Stream stream = 3;
1112  case 3:
1113  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1114  ptr = ctx->ParseMessage(mutable_stream(), ptr);
1115  CHK_(ptr);
1116  } else goto handle_unusual;
1117  continue;
1118  default: {
1119  handle_unusual:
1120  if ((tag & 7) == 4 || tag == 0) {
1121  ctx->SetLastTag(tag);
1122  goto success;
1123  }
1124  ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1125  CHK_(ptr != nullptr);
1126  continue;
1127  }
1128  } // switch
1129  } // while
1130 success:
1131  _has_bits_.Or(has_bits);
1132  return ptr;
1133 failure:
1134  ptr = nullptr;
1135  goto success;
1136 #undef CHK_
1137 }
1138 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1140  ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1141 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1142  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1143  ::PROTOBUF_NAMESPACE_ID::internal::LiteUnknownFieldSetter unknown_fields_setter(
1144  &_internal_metadata_);
1145  ::PROTOBUF_NAMESPACE_ID::io::StringOutputStream unknown_fields_output(
1146  unknown_fields_setter.buffer());
1147  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream unknown_fields_stream(
1148  &unknown_fields_output, false);
1149  // @@protoc_insertion_point(parse_start:shaka.proto.MediaInfo)
1150  for (;;) {
1151  ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1152  tag = p.first;
1153  if (!p.second) goto handle_unusual;
1154  switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1155  // required string mime = 1;
1156  case 1: {
1157  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1158  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1159  input, this->mutable_mime()));
1160  } else {
1161  goto handle_unusual;
1162  }
1163  break;
1164  }
1165 
1166  // repeated .shaka.proto.MediaInfo.Frame frames = 2;
1167  case 2: {
1168  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
1169  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1170  input, add_frames()));
1171  } else {
1172  goto handle_unusual;
1173  }
1174  break;
1175  }
1176 
1177  // required .shaka.proto.MediaInfo.Stream stream = 3;
1178  case 3: {
1179  if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
1180  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1181  input, mutable_stream()));
1182  } else {
1183  goto handle_unusual;
1184  }
1185  break;
1186  }
1187 
1188  default: {
1189  handle_unusual:
1190  if (tag == 0) {
1191  goto success;
1192  }
1193  DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SkipField(
1194  input, tag, &unknown_fields_stream));
1195  break;
1196  }
1197  }
1198  }
1199 success:
1200  // @@protoc_insertion_point(parse_success:shaka.proto.MediaInfo)
1201  return true;
1202 failure:
1203  // @@protoc_insertion_point(parse_failure:shaka.proto.MediaInfo)
1204  return false;
1205 #undef DO_
1206 }
1207 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1208 
1210  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1211  // @@protoc_insertion_point(serialize_start:shaka.proto.MediaInfo)
1212  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1213  (void) cached_has_bits;
1214 
1215  cached_has_bits = _has_bits_[0];
1216  // required string mime = 1;
1217  if (cached_has_bits & 0x00000001u) {
1218  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1219  1, this->mime(), output);
1220  }
1221 
1222  // repeated .shaka.proto.MediaInfo.Frame frames = 2;
1223  for (unsigned int i = 0,
1224  n = static_cast<unsigned int>(this->frames_size()); i < n; i++) {
1225  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessage(
1226  2,
1227  this->frames(static_cast<int>(i)),
1228  output);
1229  }
1230 
1231  // required .shaka.proto.MediaInfo.Stream stream = 3;
1232  if (cached_has_bits & 0x00000002u) {
1233  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessage(
1234  3, _Internal::stream(this), output);
1235  }
1236 
1237  output->WriteRaw(_internal_metadata_.unknown_fields().data(),
1238  static_cast<int>(_internal_metadata_.unknown_fields().size()));
1239  // @@protoc_insertion_point(serialize_end:shaka.proto.MediaInfo)
1240 }
1241 
1242 size_t MediaInfo::RequiredFieldsByteSizeFallback() const {
1243 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:shaka.proto.MediaInfo)
1244  size_t total_size = 0;
1245 
1246  if (has_mime()) {
1247  // required string mime = 1;
1248  total_size += 1 +
1249  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1250  this->mime());
1251  }
1252 
1253  if (has_stream()) {
1254  // required .shaka.proto.MediaInfo.Stream stream = 3;
1255  total_size += 1 +
1256  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1257  *stream_);
1258  }
1259 
1260  return total_size;
1261 }
1262 size_t MediaInfo::ByteSizeLong() const {
1263 // @@protoc_insertion_point(message_byte_size_start:shaka.proto.MediaInfo)
1264  size_t total_size = 0;
1265 
1266  total_size += _internal_metadata_.unknown_fields().size();
1267 
1268  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
1269  // required string mime = 1;
1270  total_size += 1 +
1271  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1272  this->mime());
1273 
1274  // required .shaka.proto.MediaInfo.Stream stream = 3;
1275  total_size += 1 +
1276  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1277  *stream_);
1278 
1279  } else {
1280  total_size += RequiredFieldsByteSizeFallback();
1281  }
1282  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1283  // Prevent compiler warnings about cached_has_bits being unused
1284  (void) cached_has_bits;
1285 
1286  // repeated .shaka.proto.MediaInfo.Frame frames = 2;
1287  {
1288  unsigned int count = static_cast<unsigned int>(this->frames_size());
1289  total_size += 1UL * count;
1290  for (unsigned int i = 0; i < count; i++) {
1291  total_size +=
1292  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1293  this->frames(static_cast<int>(i)));
1294  }
1295  }
1296 
1297  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1298  SetCachedSize(cached_size);
1299  return total_size;
1300 }
1301 
1303  const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1304  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const MediaInfo*>(
1305  &from));
1306 }
1307 
1308 void MediaInfo::MergeFrom(const MediaInfo& from) {
1309 // @@protoc_insertion_point(class_specific_merge_from_start:shaka.proto.MediaInfo)
1310  GOOGLE_DCHECK_NE(&from, this);
1311  _internal_metadata_.MergeFrom(from._internal_metadata_);
1312  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1313  (void) cached_has_bits;
1314 
1315  frames_.MergeFrom(from.frames_);
1316  cached_has_bits = from._has_bits_[0];
1317  if (cached_has_bits & 0x00000003u) {
1318  if (cached_has_bits & 0x00000001u) {
1319  _has_bits_[0] |= 0x00000001u;
1320  mime_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.mime_);
1321  }
1322  if (cached_has_bits & 0x00000002u) {
1323  mutable_stream()->::shaka::proto::MediaInfo_Stream::MergeFrom(from.stream());
1324  }
1325  }
1326 }
1327 
1328 void MediaInfo::CopyFrom(const MediaInfo& from) {
1329 // @@protoc_insertion_point(class_specific_copy_from_start:shaka.proto.MediaInfo)
1330  if (&from == this) return;
1331  Clear();
1332  MergeFrom(from);
1333 }
1334 
1336  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
1337  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->frames())) return false;
1338  if (has_stream()) {
1339  if (!this->stream_->IsInitialized()) return false;
1340  }
1341  return true;
1342 }
1343 
1344 void MediaInfo::InternalSwap(MediaInfo* other) {
1345  using std::swap;
1346  _internal_metadata_.Swap(&other->_internal_metadata_);
1347  swap(_has_bits_[0], other->_has_bits_[0]);
1348  CastToBase(&frames_)->InternalSwap(CastToBase(&other->frames_));
1349  mime_.Swap(&other->mime_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1350  GetArenaNoVirtual());
1351  swap(stream_, other->stream_);
1352 }
1353 
1354 std::string MediaInfo::GetTypeName() const {
1355  return "shaka.proto.MediaInfo";
1356 }
1357 
1358 
1359 // @@protoc_insertion_point(namespace_scope)
1360 } // namespace proto
1361 } // namespace shaka
1362 PROTOBUF_NAMESPACE_OPEN
1363 template<> PROTOBUF_NOINLINE ::shaka::proto::MediaInfo_Frame* Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo_Frame >(Arena* arena) {
1364  return Arena::CreateInternal< ::shaka::proto::MediaInfo_Frame >(arena);
1365 }
1366 template<> PROTOBUF_NOINLINE ::shaka::proto::MediaInfo_Stream* Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo_Stream >(Arena* arena) {
1367  return Arena::CreateInternal< ::shaka::proto::MediaInfo_Stream >(arena);
1368 }
1369 template<> PROTOBUF_NOINLINE ::shaka::proto::MediaInfo* Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo >(Arena* arena) {
1370  return Arena::CreateInternal< ::shaka::proto::MediaInfo >(arena);
1371 }
1372 PROTOBUF_NAMESPACE_CLOSE
1373 
1374 // @@protoc_insertion_point(global_scope)
1375 #include <google/protobuf/port_undef.inc>
size_t ByteSizeLong() const final
std::string * mutable_mime()
static const MediaInfo * internal_default_instance()
decltype(std::declval< MediaInfo_Frame >()._has_bits_) HasBits
static void InitAsDefaultInstance()
::PROTOBUF_NAMESPACE_ID::uint32 time_scale_den() const
size_t ByteSizeLong() const final
std::string * mutable_extra_data_hash()
#define DO_(EXPRESSION)
friend void swap(MediaInfo &a, MediaInfo &b)
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed< MediaInfo > _instance
::PROTOBUF_NAMESPACE_ID::uint32 sar_num() const
static const MediaInfo_Frame & default_instance()
const ::shaka::proto::MediaInfo_Stream & stream() const
static const MediaInfo_Stream & default_instance()
std::string GetTypeName() const final
size_t ByteSizeLong() const final
static void set_has_is_encrypted(HasBits *has_bits)
decltype(std::declval< MediaInfo_Stream >()._has_bits_) HasBits
static void set_has_time_scale_den(HasBits *has_bits)
std::string GetTypeName() const final
PROTOBUF_INTERNAL_EXPORT_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo< 0 > scc_info_MediaInfo_Stream_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto
static void set_has_duration(HasBits *has_bits)
std::string GetTypeName() const final
void MergeFrom(const MediaInfo_Frame &from)
static void set_has_data_hash(HasBits *has_bits)
void SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream *output) const final
bool MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream *input) final
void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite &from) final
static const MediaInfo & default_instance()
void MergeFrom(const MediaInfo_Stream &from)
::shaka::proto::MediaInfo_Stream * mutable_stream()
const std::string & extra_data_hash() const
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
static void set_has_time_scale_num(HasBits *has_bits)
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed< MediaInfo_Frame > _instance
void CopyFrom(const MediaInfo &from)
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::shaka::proto::MediaInfo_Frame > & frames() const
const std::string & mime() const
PROTOBUF_NOINLINE ::shaka::proto::MediaInfo_Stream * Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo_Stream >(Arena *arena)
PROTOBUF_INTERNAL_EXPORT_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo< 0 > scc_info_MediaInfo_Frame_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto
static void set_has_sar_num(HasBits *has_bits)
::PROTOBUF_NAMESPACE_ID::uint32 time_scale_num() const
void CopyFrom(const MediaInfo_Frame &from)
friend void swap(MediaInfo_Frame &a, MediaInfo_Frame &b)
PROTOBUF_NOINLINE ::shaka::proto::MediaInfo * Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo >(Arena *arena)
::PROTOBUF_NAMESPACE_ID::uint32 sar_den() const
class shaka::proto::MediaInfo_FrameDefaultTypeInternal _MediaInfo_Frame_default_instance_
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
static void set_has_stream(HasBits *has_bits)
void swap(shared_lock< Mutex > &a, shared_lock< Mutex > &b)
Definition: shared_lock.h:161
static const MediaInfo_Stream * internal_default_instance()
static void set_has_is_video(HasBits *has_bits)
decltype(std::declval< MediaInfo >()._has_bits_) HasBits
bool IsInitialized() const final
static void set_has_pts(HasBits *has_bits)
bool IsInitialized() const final
static void set_has_dts(HasBits *has_bits)
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
bool MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream *input) final
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::shaka::proto::MediaInfo_Frame * Arena::CreateMaybeMessage< ::shaka::proto::MediaInfo_Frame >(Arena *arena)
void SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream *output) const final
void MergeFrom(const MediaInfo &from)
bool MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream *input) final
::shaka::proto::MediaInfo_Frame * add_frames()
bool IsInitialized() const final
const std::string & data_hash() const
static const ::shaka::proto::MediaInfo_Stream & stream(const MediaInfo *msg)
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo< 2 > scc_info_MediaInfo_shaka_2ftest_2fsrc_2fmedia_2fmedia_5ftests_2eproto
void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite &from) final
static const MediaInfo_Frame * internal_default_instance()
static void set_has_mime(HasBits *has_bits)
void SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream *output) const final
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed< MediaInfo_Stream > _instance
void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite &from) final
static void set_has_sar_den(HasBits *has_bits)
static void set_has_extra_data_hash(HasBits *has_bits)
class shaka::proto::MediaInfo_StreamDefaultTypeInternal _MediaInfo_Stream_default_instance_
friend void swap(MediaInfo_Stream &a, MediaInfo_Stream &b)
void CopyFrom(const MediaInfo_Stream &from)
class shaka::proto::MediaInfoDefaultTypeInternal _MediaInfo_default_instance_