...
enum SegmentAlignment {
enum CipherMode {
required uint32 length = 1; /* Number of bytes in sample */ required sint64 time_position = 2; /* Position in stream in nanoseconds */ required sint64 sample_duration = 3; /* Frame/sample duration in nanoseconds */ required uint32 stream_id = 4; /* stream id (unique ID for ES, as defined in attachSource()) */ optional uint32 sample_rate = 5; /* Samples per second for audio segments */ optional uint32 channels_num = 6; /* Number of channels for audio segments */ optional uint32 width = 7; /* Frame width in pixels for video segments */ optional uint32 height = 8; /* Frame height in pixels for video segments */ optional SegmentAlignment segment_alignment = 9; /* Segment alignment can be specified for H264/H265, will use NAL if not set */ optional bytes extra_data = 10; /* Buffer containing extradata */ optional bytes media_key_session_id = 11; /* Buffer containing key session ID to use for decryption */ optional bytes key_id = 12; /* Buffer containing Key ID to use for decryption */ optional bytes init_vector = 13; /* Buffer containing the initialization vector for decryption */ optional uint32 init_with_last_15 = 14; /* initWithLast15 value for decryption */ optional repeated SubsamplePair sub_sample_info = 15; /* If present, use gather/scatter decryption based on this list of clear/encrypted byte lengths. */ /* If not present and content is encrypted then entire media segment needs decryption (unless */ /* cipher_mode indicates pattern encryption in which case crypt/skip byte block value specify */ /* the encryption pattern) */ optional bytes codec_data = 16; /* Buffer containing updated codec data for video segments */ optional CipherMode cipher_mode = 17; /* Block cipher mode of operation when common encryption used */optional uint32 crypt_byte_block = 18; /* Crypt byte block value for CBCS cipher mode pattern */ optional uint32 skip_byte_block = 19; /* Skip byte block value for CBCS cipher mode pattern */ }message SubsamplePair { required uint32_t num_clear_bytes = 1; /* How many of next bytes in sequence are clear */ required uint32_t num_encrypted_bytes = 2; /* How many of next bytes in sequence are encrypted */ } |
...