2014-02-14 23:21:05 +00:00
|
|
|
// Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2013-11-27 02:40:36 +00:00
|
|
|
//
|
|
|
|
// Overloads operator== for mp4 boxes, mainly used for testing.
|
|
|
|
|
2014-04-10 21:42:38 +00:00
|
|
|
#ifndef MEDIA_FORMATS_MP4_BOX_DEFINITIONS_COMPARISON_H_
|
|
|
|
#define MEDIA_FORMATS_MP4_BOX_DEFINITIONS_COMPARISON_H_
|
2013-11-27 02:40:36 +00:00
|
|
|
|
2014-10-01 22:10:21 +00:00
|
|
|
#include "packager/media/formats/mp4/box_definitions.h"
|
2013-11-27 02:40:36 +00:00
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace edash_packager {
|
2013-11-27 02:40:36 +00:00
|
|
|
namespace media {
|
2015-12-21 18:34:21 +00:00
|
|
|
|
|
|
|
inline bool operator==(const SubsampleEntry& lhs, const SubsampleEntry& rhs) {
|
|
|
|
return lhs.clear_bytes == rhs.clear_bytes &&
|
|
|
|
lhs.cipher_bytes == rhs.cipher_bytes;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
namespace mp4 {
|
|
|
|
|
|
|
|
inline bool operator==(const FileType& lhs, const FileType& rhs) {
|
|
|
|
return lhs.major_brand == rhs.major_brand &&
|
|
|
|
lhs.minor_version == rhs.minor_version &&
|
|
|
|
lhs.compatible_brands == rhs.compatible_brands;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ProtectionSystemSpecificHeader& lhs,
|
|
|
|
const ProtectionSystemSpecificHeader& rhs) {
|
|
|
|
return lhs.system_id == rhs.system_id && lhs.data == rhs.data;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleAuxiliaryInformationOffset& lhs,
|
|
|
|
const SampleAuxiliaryInformationOffset& rhs) {
|
|
|
|
return lhs.offsets == rhs.offsets;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleAuxiliaryInformationSize& lhs,
|
|
|
|
const SampleAuxiliaryInformationSize& rhs) {
|
|
|
|
return lhs.default_sample_info_size == rhs.default_sample_info_size &&
|
|
|
|
lhs.sample_count == rhs.sample_count &&
|
|
|
|
lhs.sample_info_sizes == rhs.sample_info_sizes;
|
|
|
|
}
|
|
|
|
|
2015-12-21 18:34:21 +00:00
|
|
|
inline bool operator==(const SampleEncryptionEntry& lhs,
|
|
|
|
const SampleEncryptionEntry& rhs) {
|
|
|
|
return lhs.initialization_vector == rhs.initialization_vector &&
|
|
|
|
lhs.subsamples == rhs.subsamples;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleEncryption& lhs,
|
|
|
|
const SampleEncryption& rhs) {
|
|
|
|
return lhs.iv_size == rhs.iv_size &&
|
|
|
|
lhs.sample_encryption_entries == rhs.sample_encryption_entries;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
inline bool operator==(const OriginalFormat& lhs, const OriginalFormat& rhs) {
|
|
|
|
return lhs.format == rhs.format;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SchemeType& lhs, const SchemeType& rhs) {
|
|
|
|
return lhs.type == rhs.type && lhs.version == rhs.version;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackEncryption& lhs, const TrackEncryption& rhs) {
|
|
|
|
return lhs.is_encrypted == rhs.is_encrypted &&
|
|
|
|
lhs.default_iv_size == rhs.default_iv_size &&
|
|
|
|
lhs.default_kid == rhs.default_kid;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SchemeInfo& lhs, const SchemeInfo& rhs) {
|
|
|
|
return lhs.track_encryption == rhs.track_encryption;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ProtectionSchemeInfo& lhs,
|
|
|
|
const ProtectionSchemeInfo& rhs) {
|
|
|
|
return lhs.format == rhs.format && lhs.type == rhs.type &&
|
|
|
|
lhs.info == rhs.info;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MovieHeader& lhs, const MovieHeader& rhs) {
|
|
|
|
return lhs.creation_time == rhs.creation_time &&
|
|
|
|
lhs.modification_time == rhs.modification_time &&
|
|
|
|
lhs.timescale == rhs.timescale && lhs.duration == rhs.duration &&
|
|
|
|
lhs.rate == rhs.rate && lhs.volume == rhs.volume &&
|
|
|
|
lhs.next_track_id == rhs.next_track_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackHeader& lhs, const TrackHeader& rhs) {
|
|
|
|
return lhs.creation_time == rhs.creation_time &&
|
|
|
|
lhs.modification_time == rhs.modification_time &&
|
|
|
|
lhs.track_id == rhs.track_id && lhs.duration == rhs.duration &&
|
|
|
|
lhs.layer == rhs.layer && lhs.alternate_group == rhs.alternate_group &&
|
|
|
|
lhs.volume == rhs.volume && lhs.width == rhs.width &&
|
|
|
|
lhs.height == rhs.height;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleDescription& lhs,
|
|
|
|
const SampleDescription& rhs) {
|
|
|
|
return lhs.type == rhs.type && lhs.video_entries == rhs.video_entries &&
|
|
|
|
lhs.audio_entries == rhs.audio_entries;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const DecodingTime& lhs, const DecodingTime& rhs) {
|
|
|
|
return lhs.sample_count == rhs.sample_count &&
|
|
|
|
lhs.sample_delta == rhs.sample_delta;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const DecodingTimeToSample& lhs,
|
|
|
|
const DecodingTimeToSample& rhs) {
|
|
|
|
return lhs.decoding_time == rhs.decoding_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CompositionOffset& lhs,
|
|
|
|
const CompositionOffset& rhs) {
|
|
|
|
return lhs.sample_count == rhs.sample_count &&
|
|
|
|
lhs.sample_offset == rhs.sample_offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CompositionTimeToSample& lhs,
|
|
|
|
const CompositionTimeToSample& rhs) {
|
|
|
|
return lhs.composition_offset == rhs.composition_offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ChunkInfo& lhs, const ChunkInfo& rhs) {
|
|
|
|
return lhs.first_chunk == rhs.first_chunk &&
|
|
|
|
lhs.samples_per_chunk == rhs.samples_per_chunk &&
|
|
|
|
lhs.sample_description_index == rhs.sample_description_index;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleToChunk& lhs, const SampleToChunk& rhs) {
|
|
|
|
return lhs.chunk_info == rhs.chunk_info;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleSize& lhs, const SampleSize& rhs) {
|
|
|
|
return lhs.sample_size == rhs.sample_size &&
|
|
|
|
lhs.sample_count == rhs.sample_count && lhs.sizes == rhs.sizes;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CompactSampleSize& lhs,
|
|
|
|
const CompactSampleSize& rhs) {
|
|
|
|
return lhs.field_size == rhs.field_size && lhs.sizes == rhs.sizes;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ChunkLargeOffset& lhs,
|
|
|
|
const ChunkLargeOffset& rhs) {
|
|
|
|
return lhs.offsets == rhs.offsets;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SyncSample& lhs, const SyncSample& rhs) {
|
|
|
|
return lhs.sample_number == rhs.sample_number;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleTable& lhs, const SampleTable& rhs) {
|
|
|
|
return lhs.description == rhs.description &&
|
|
|
|
lhs.decoding_time_to_sample == rhs.decoding_time_to_sample &&
|
|
|
|
lhs.composition_time_to_sample == rhs.composition_time_to_sample &&
|
|
|
|
lhs.sample_to_chunk == rhs.sample_to_chunk &&
|
|
|
|
lhs.sample_size == rhs.sample_size &&
|
|
|
|
lhs.chunk_large_offset == rhs.chunk_large_offset &&
|
|
|
|
lhs.sync_sample == rhs.sync_sample;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const EditListEntry& lhs, const EditListEntry& rhs) {
|
|
|
|
return lhs.segment_duration == rhs.segment_duration &&
|
|
|
|
lhs.media_time == rhs.media_time &&
|
|
|
|
lhs.media_rate_integer == rhs.media_rate_integer &&
|
|
|
|
lhs.media_rate_fraction == rhs.media_rate_fraction;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const EditList& lhs, const EditList& rhs) {
|
|
|
|
return lhs.edits == rhs.edits;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Edit& lhs, const Edit& rhs) {
|
|
|
|
return lhs.list == rhs.list;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const HandlerReference& lhs,
|
|
|
|
const HandlerReference& rhs) {
|
2015-12-21 23:10:17 +00:00
|
|
|
return lhs.handler_type == rhs.handler_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Language& lhs,
|
|
|
|
const Language& rhs) {
|
|
|
|
return lhs.code == rhs.code;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const PrivFrame& lhs, const PrivFrame& rhs) {
|
|
|
|
return lhs.owner == rhs.owner && lhs.value == rhs.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ID3v2& lhs, const ID3v2& rhs) {
|
|
|
|
return lhs.language == rhs.language && lhs.private_frame == rhs.private_frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Metadata& lhs, const Metadata& rhs) {
|
|
|
|
return lhs.handler == rhs.handler && lhs.id3v2 == rhs.id3v2;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
2015-10-27 00:52:57 +00:00
|
|
|
inline bool operator==(const CodecConfigurationRecord& lhs,
|
|
|
|
const CodecConfigurationRecord& rhs) {
|
2013-11-27 02:40:36 +00:00
|
|
|
return lhs.data == rhs.data;
|
|
|
|
}
|
|
|
|
|
2015-12-15 00:07:51 +00:00
|
|
|
inline bool operator==(const PixelAspectRatio& lhs,
|
|
|
|
const PixelAspectRatio& rhs) {
|
2013-11-27 02:40:36 +00:00
|
|
|
return lhs.h_spacing == rhs.h_spacing && lhs.v_spacing == rhs.v_spacing;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const VideoSampleEntry& lhs,
|
|
|
|
const VideoSampleEntry& rhs) {
|
|
|
|
return lhs.format == rhs.format &&
|
|
|
|
lhs.data_reference_index == rhs.data_reference_index &&
|
|
|
|
lhs.width == rhs.width && lhs.height == rhs.height &&
|
|
|
|
lhs.pixel_aspect == rhs.pixel_aspect && lhs.sinf == rhs.sinf &&
|
2015-10-27 00:52:57 +00:00
|
|
|
lhs.codec_config_record == rhs.codec_config_record;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ESDescriptor& lhs, const ESDescriptor& rhs) {
|
|
|
|
return lhs.esid() == rhs.esid() && lhs.object_type() == rhs.object_type() &&
|
2016-01-04 18:57:05 +00:00
|
|
|
lhs.max_bitrate() == rhs.max_bitrate() &&
|
|
|
|
lhs.avg_bitrate() == rhs.avg_bitrate() &&
|
2013-11-27 02:40:36 +00:00
|
|
|
lhs.decoder_specific_info() == rhs.decoder_specific_info();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const ElementaryStreamDescriptor& lhs,
|
|
|
|
const ElementaryStreamDescriptor& rhs) {
|
|
|
|
return lhs.es_descriptor == rhs.es_descriptor;
|
|
|
|
}
|
|
|
|
|
2015-12-15 00:07:51 +00:00
|
|
|
inline bool operator==(const DTSSpecific& lhs,
|
|
|
|
const DTSSpecific& rhs) {
|
2016-01-04 18:57:05 +00:00
|
|
|
return lhs.sampling_frequency == rhs.sampling_frequency &&
|
|
|
|
lhs.max_bitrate == rhs.max_bitrate &&
|
|
|
|
lhs.avg_bitrate == rhs.avg_bitrate &&
|
|
|
|
lhs.pcm_sample_depth == rhs.pcm_sample_depth &&
|
|
|
|
lhs.extra_data == rhs.extra_data;
|
2015-12-07 19:56:07 +00:00
|
|
|
}
|
|
|
|
|
2016-01-08 23:56:33 +00:00
|
|
|
inline bool operator==(const AC3Specific& lhs,
|
|
|
|
const AC3Specific& rhs) {
|
|
|
|
return lhs.data == rhs.data;
|
|
|
|
}
|
|
|
|
|
2016-01-15 21:40:44 +00:00
|
|
|
inline bool operator==(const EC3Specific& lhs,
|
|
|
|
const EC3Specific& rhs) {
|
|
|
|
return lhs.data == rhs.data;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
inline bool operator==(const AudioSampleEntry& lhs,
|
|
|
|
const AudioSampleEntry& rhs) {
|
|
|
|
return lhs.format == rhs.format &&
|
|
|
|
lhs.data_reference_index == rhs.data_reference_index &&
|
|
|
|
lhs.channelcount == rhs.channelcount &&
|
|
|
|
lhs.samplesize == rhs.samplesize && lhs.samplerate == rhs.samplerate &&
|
2016-01-08 23:56:33 +00:00
|
|
|
lhs.sinf == rhs.sinf && lhs.esds == rhs.esds && lhs.ddts == rhs.ddts &&
|
2016-01-15 21:40:44 +00:00
|
|
|
lhs.dac3 == rhs.dac3 && lhs.dec3 == rhs.dec3;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
2015-11-23 23:12:04 +00:00
|
|
|
inline bool operator==(const WebVTTConfigurationBox& lhs,
|
|
|
|
const WebVTTConfigurationBox& rhs) {
|
|
|
|
return lhs.config == rhs.config;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const WebVTTSourceLabelBox& lhs,
|
|
|
|
const WebVTTSourceLabelBox& rhs) {
|
|
|
|
return lhs.source_label == rhs.source_label;
|
|
|
|
}
|
|
|
|
|
2016-02-03 23:58:35 +00:00
|
|
|
inline bool operator==(const TextSampleEntry& lhs, const TextSampleEntry& rhs) {
|
2015-11-23 23:12:04 +00:00
|
|
|
return lhs.config == rhs.config && lhs.label == rhs.label;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
inline bool operator==(const MediaHeader& lhs, const MediaHeader& rhs) {
|
|
|
|
return lhs.creation_time == rhs.creation_time &&
|
|
|
|
lhs.modification_time == rhs.modification_time &&
|
|
|
|
lhs.timescale == rhs.timescale && lhs.duration == rhs.duration &&
|
2015-12-21 23:10:17 +00:00
|
|
|
lhs.language == rhs.language;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const VideoMediaHeader& lhs,
|
|
|
|
const VideoMediaHeader& rhs) {
|
|
|
|
return lhs.graphicsmode == rhs.graphicsmode &&
|
|
|
|
lhs.opcolor_red == rhs.opcolor_red &&
|
|
|
|
lhs.opcolor_green == rhs.opcolor_green &&
|
|
|
|
lhs.opcolor_blue == rhs.opcolor_blue;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SoundMediaHeader& lhs,
|
|
|
|
const SoundMediaHeader& rhs) {
|
|
|
|
return lhs.balance == rhs.balance;
|
|
|
|
}
|
|
|
|
|
2015-11-23 23:12:04 +00:00
|
|
|
inline bool operator==(const SubtitleMediaHeader& lhs,
|
|
|
|
const SubtitleMediaHeader& rhs) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
inline bool operator==(const DataEntryUrl& lhs, const DataEntryUrl& rhs) {
|
|
|
|
return lhs.flags == rhs.flags && lhs.location == rhs.location;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const DataReference& lhs, const DataReference& rhs) {
|
|
|
|
return lhs.data_entry == rhs.data_entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const DataInformation& lhs, const DataInformation& rhs) {
|
|
|
|
return lhs.dref == rhs.dref;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MediaInformation& lhs,
|
|
|
|
const MediaInformation& rhs) {
|
|
|
|
return lhs.dinf == rhs.dinf && lhs.sample_table == rhs.sample_table &&
|
|
|
|
lhs.vmhd == rhs.vmhd && lhs.smhd == rhs.smhd;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Media& lhs, const Media& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.handler == rhs.handler &&
|
|
|
|
lhs.information == rhs.information;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Track& lhs, const Track& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.media == rhs.media &&
|
2015-12-21 18:34:21 +00:00
|
|
|
lhs.edit == rhs.edit && lhs.sample_encryption == rhs.sample_encryption;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MovieExtendsHeader& lhs,
|
|
|
|
const MovieExtendsHeader& rhs) {
|
|
|
|
return lhs.fragment_duration == rhs.fragment_duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackExtends& lhs, const TrackExtends& rhs) {
|
|
|
|
return lhs.track_id == rhs.track_id &&
|
|
|
|
lhs.default_sample_description_index ==
|
|
|
|
rhs.default_sample_description_index &&
|
|
|
|
lhs.default_sample_duration == rhs.default_sample_duration &&
|
|
|
|
lhs.default_sample_size == rhs.default_sample_size &&
|
|
|
|
lhs.default_sample_flags == rhs.default_sample_flags;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MovieExtends& lhs, const MovieExtends& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.tracks == rhs.tracks;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const Movie& lhs, const Movie& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.extends == rhs.extends &&
|
|
|
|
lhs.tracks == rhs.tracks && lhs.pssh == rhs.pssh;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackFragmentDecodeTime& lhs,
|
|
|
|
const TrackFragmentDecodeTime& rhs) {
|
|
|
|
return lhs.decode_time == rhs.decode_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MovieFragmentHeader& lhs,
|
|
|
|
const MovieFragmentHeader& rhs) {
|
|
|
|
return lhs.sequence_number == rhs.sequence_number;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackFragmentHeader& lhs,
|
|
|
|
const TrackFragmentHeader& rhs) {
|
|
|
|
return lhs.flags == rhs.flags && lhs.track_id == rhs.track_id &&
|
|
|
|
lhs.sample_description_index == rhs.sample_description_index &&
|
|
|
|
lhs.default_sample_duration == rhs.default_sample_duration &&
|
|
|
|
lhs.default_sample_size == rhs.default_sample_size &&
|
|
|
|
lhs.default_sample_flags == rhs.default_sample_flags;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const TrackFragmentRun& lhs,
|
|
|
|
const TrackFragmentRun& rhs) {
|
|
|
|
return lhs.flags == rhs.flags && lhs.sample_count == rhs.sample_count &&
|
|
|
|
lhs.data_offset == rhs.data_offset &&
|
|
|
|
lhs.sample_flags == rhs.sample_flags &&
|
|
|
|
lhs.sample_sizes == rhs.sample_sizes &&
|
|
|
|
lhs.sample_durations == rhs.sample_durations &&
|
|
|
|
lhs.sample_composition_time_offsets ==
|
|
|
|
rhs.sample_composition_time_offsets;
|
|
|
|
}
|
|
|
|
|
2014-03-24 21:09:58 +00:00
|
|
|
inline bool operator==(const SampleToGroupEntry& lhs,
|
|
|
|
const SampleToGroupEntry& rhs) {
|
|
|
|
return lhs.sample_count == rhs.sample_count &&
|
|
|
|
lhs.group_description_index == rhs.group_description_index;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleToGroup& lhs,
|
|
|
|
const SampleToGroup& rhs) {
|
|
|
|
return lhs.grouping_type == rhs.grouping_type &&
|
|
|
|
lhs.grouping_type_parameter == rhs.grouping_type_parameter &&
|
|
|
|
lhs.entries == rhs.entries;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CencSampleEncryptionInfoEntry& lhs,
|
|
|
|
const CencSampleEncryptionInfoEntry& rhs) {
|
|
|
|
return lhs.is_encrypted == rhs.is_encrypted &&
|
|
|
|
lhs.iv_size == rhs.iv_size &&
|
|
|
|
lhs.key_id == rhs.key_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SampleGroupDescription& lhs,
|
|
|
|
const SampleGroupDescription& rhs) {
|
|
|
|
return lhs.grouping_type == rhs.grouping_type &&
|
|
|
|
lhs.entries == rhs.entries;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
inline bool operator==(const TrackFragment& lhs, const TrackFragment& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.runs == rhs.runs &&
|
|
|
|
lhs.decode_time == rhs.decode_time &&
|
|
|
|
lhs.auxiliary_offset == rhs.auxiliary_offset &&
|
2015-12-21 18:34:21 +00:00
|
|
|
lhs.auxiliary_size == rhs.auxiliary_size &&
|
|
|
|
lhs.sample_encryption == rhs.sample_encryption;
|
2013-11-27 02:40:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const MovieFragment& lhs, const MovieFragment& rhs) {
|
|
|
|
return lhs.header == rhs.header && lhs.tracks == rhs.tracks &&
|
|
|
|
lhs.pssh == rhs.pssh;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SegmentReference& lhs,
|
|
|
|
const SegmentReference& rhs) {
|
|
|
|
return lhs.reference_type == rhs.reference_type &&
|
|
|
|
lhs.referenced_size == rhs.referenced_size &&
|
|
|
|
lhs.subsegment_duration == rhs.subsegment_duration &&
|
|
|
|
lhs.starts_with_sap == rhs.starts_with_sap &&
|
|
|
|
lhs.sap_type == rhs.sap_type &&
|
|
|
|
lhs.sap_delta_time == rhs.sap_delta_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const SegmentIndex& lhs, const SegmentIndex& rhs) {
|
|
|
|
return lhs.reference_id == rhs.reference_id &&
|
|
|
|
lhs.timescale == rhs.timescale &&
|
|
|
|
lhs.earliest_presentation_time == rhs.earliest_presentation_time &&
|
|
|
|
lhs.first_offset == rhs.first_offset &&
|
|
|
|
lhs.references == rhs.references;
|
|
|
|
}
|
|
|
|
|
2015-11-23 23:12:04 +00:00
|
|
|
inline bool operator==(const CueSourceIDBox& lhs,
|
|
|
|
const CueSourceIDBox& rhs) {
|
|
|
|
return lhs.source_id == rhs.source_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CueTimeBox& lhs,
|
|
|
|
const CueTimeBox& rhs) {
|
|
|
|
return lhs.cue_current_time == rhs.cue_current_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CueIDBox& lhs,
|
|
|
|
const CueIDBox& rhs) {
|
|
|
|
return lhs.cue_id == rhs.cue_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CueSettingsBox& lhs,
|
|
|
|
const CueSettingsBox& rhs) {
|
|
|
|
return lhs.settings == rhs.settings;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const CuePayloadBox& lhs,
|
|
|
|
const CuePayloadBox& rhs) {
|
|
|
|
return lhs.cue_text == rhs.cue_text;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const VTTEmptyCueBox& lhs, const VTTEmptyCueBox& rhs) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const VTTAdditionalTextBox& lhs,
|
|
|
|
const VTTAdditionalTextBox& rhs) {
|
|
|
|
return lhs.cue_additional_text == rhs.cue_additional_text;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator==(const VTTCueBox& lhs,
|
|
|
|
const VTTCueBox& rhs) {
|
|
|
|
return lhs.cue_source_id == rhs.cue_source_id && lhs.cue_id == rhs.cue_id &&
|
|
|
|
lhs.cue_time == rhs.cue_time && lhs.cue_settings == rhs.cue_settings &&
|
|
|
|
lhs.cue_payload == rhs.cue_payload;
|
|
|
|
}
|
|
|
|
|
2013-11-27 02:40:36 +00:00
|
|
|
} // namespace mp4
|
|
|
|
} // namespace media
|
2014-09-19 20:41:13 +00:00
|
|
|
} // namespace edash_packager
|
2013-11-27 02:40:36 +00:00
|
|
|
|
2014-04-10 21:42:38 +00:00
|
|
|
#endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_COMPARISON_H_
|