Commit 51afa769 authored by Chandan Padhi's avatar Chandan Padhi Committed by Commit Bot

media: Use int64 as mojom equivalent type for off_t

This CL replaces uint64 with int64 as mojom type for off_t
in BitstreamBuffer mojom struct.

Bug: 732253
Change-Id: Ie9434832c2556efd43ed7269a30dc49565ddf02c
Reviewed-on: https://chromium-review.googlesource.com/567908Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Chandan Padhi <c.padhi@samsung.com>
Cr-Commit-Position: refs/heads/master@{#486027}
parent d325a838
......@@ -24,7 +24,7 @@ struct BitstreamBuffer {
int32 id;
handle<shared_buffer> memory_handle;
uint32 size;
uint64 offset;
int64 offset;
mojo.common.mojom.TimeDelta timestamp;
string key_id;
string iv;
......
......@@ -102,7 +102,8 @@ bool StructTraits<
return false;
media::BitstreamBuffer bitstream_buffer(
input.id(), memory_handle, input.size(), input.offset(), timestamp);
input.id(), memory_handle, input.size(),
base::checked_cast<off_t>(input.offset()), timestamp);
bitstream_buffer.SetDecryptConfig(
media::DecryptConfig(key_id, iv, subsamples));
*output = bitstream_buffer;
......
......@@ -34,8 +34,8 @@ struct StructTraits<media::mojom::BitstreamBufferDataView,
return base::checked_cast<uint32_t>(input.size());
}
static uint64_t offset(const media::BitstreamBuffer& input) {
return input.offset();
static int64_t offset(const media::BitstreamBuffer& input) {
return base::checked_cast<int64_t>(input.offset());
}
static base::TimeDelta timestamp(const media::BitstreamBuffer& input) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment