Fix compilation errors after manifest update
Manifest was updated in CL 7debbbe19b158ea7377e229a17ec1d3d9d19d1b8 to point to Chromium LGKR CL 253526. There are some API refactoring in base, which result in some code changes in our packager source. Change-Id: I52bf5a8a4f8fe0ebc566677efcd572332db8f618
This commit is contained in:
parent
895ff32202
commit
b9f1996b68
|
@ -102,7 +102,7 @@ bool GetMuxerOptions(MuxerOptions* muxer_options) {
|
|||
// Create a temp file if needed.
|
||||
if (muxer_options->single_segment && muxer_options->temp_file_name.empty()) {
|
||||
base::FilePath path;
|
||||
if (!file_util::CreateTemporaryFile(&path)) {
|
||||
if (!base::CreateTemporaryFile(&path)) {
|
||||
LOG(ERROR) << "Failed to create a temporary file.";
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
Description:
|
||||
This directory is included to resolve base/metrics/stats_table.cc dependency
|
||||
on ipc/ipc_descriptors.h.
|
||||
|
||||
File(s):
|
||||
ipc/ipc_descritors.h
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef IPC_IPC_DESCRIPTORS_H_
|
||||
#define IPC_IPC_DESCRIPTORS_H_
|
||||
|
||||
// This is a list of global descriptor keys to be used with the
|
||||
// base::GlobalDescriptors object (see base/posix/global_descriptors.h)
|
||||
enum {
|
||||
kPrimaryIPCChannel = 0,
|
||||
kStatsTableSharedMemFd,
|
||||
|
||||
// The first key that can be use to register descriptors.
|
||||
kIPCDescriptorMax
|
||||
|
||||
};
|
||||
|
||||
#endif // IPC_IPC_DESCRIPTORS_H_
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "media/base/status.h"
|
||||
|
||||
namespace media {
|
||||
|
@ -48,8 +49,8 @@ class BufferWriter {
|
|||
void Swap(BufferWriter* buffer) { buf_.swap(buffer->buf_); }
|
||||
void Clear() { buf_.clear(); }
|
||||
size_t Size() const { return buf_.size(); }
|
||||
// Return underlying buffer. Behavior is undefined if the buffer size is 0.
|
||||
const uint8* Buffer() const { return &buf_[0]; }
|
||||
// Return underlying buffer. Return NULL if the buffer is empty.
|
||||
const uint8* Buffer() const { return vector_as_array(&buf_); }
|
||||
|
||||
// Write the buffer to file. |file| should not be NULL.
|
||||
// Returns OK on success. The internal buffer will be cleared after writing.
|
||||
|
|
|
@ -36,9 +36,11 @@ namespace media {
|
|||
|
||||
class BufferWriterTest : public testing::Test {
|
||||
public:
|
||||
BufferWriterTest()
|
||||
: writer_(new BufferWriter(kReservedBufferCapacity)),
|
||||
reader_(new BufferReader(writer_->Buffer(), kReservedBufferCapacity)) {}
|
||||
BufferWriterTest() : writer_(new BufferWriter(kReservedBufferCapacity)) {}
|
||||
|
||||
void CreateReader() {
|
||||
reader_.reset(new BufferReader(writer_->Buffer(), writer_->Size()));
|
||||
}
|
||||
|
||||
bool ReadInt(uint8* v) { return reader_->Read1(v); }
|
||||
bool ReadInt(uint16* v) { return reader_->Read2(v); }
|
||||
|
@ -61,6 +63,8 @@ class BufferWriterTest : public testing::Test {
|
|||
writer_->AppendInt(max);
|
||||
writer_->AppendInt(val);
|
||||
ASSERT_EQ(sizeof(min) + sizeof(max) + sizeof(val), writer_->Size());
|
||||
|
||||
CreateReader();
|
||||
ReadAndExpect(min);
|
||||
ReadAndExpect(max);
|
||||
ReadAndExpect(val);
|
||||
|
@ -86,6 +90,8 @@ TEST_F(BufferWriterTest, AppendNBytes) {
|
|||
// Write the least significant four bytes and verify the result.
|
||||
writer_->AppendNBytes(kuint64, sizeof(uint32));
|
||||
ASSERT_EQ(sizeof(uint32), writer_->Size());
|
||||
|
||||
CreateReader();
|
||||
ReadAndExpect(static_cast<uint32>(kuint64 & 0xFFFFFFFF));
|
||||
}
|
||||
|
||||
|
@ -100,6 +106,7 @@ TEST_F(BufferWriterTest, AppendVector) {
|
|||
writer_->AppendVector(v);
|
||||
ASSERT_EQ(sizeof(kuint8Array), writer_->Size());
|
||||
|
||||
CreateReader();
|
||||
std::vector<uint8> data_read;
|
||||
ASSERT_TRUE(reader_->ReadToVector(&data_read, sizeof(kuint8Array)));
|
||||
ASSERT_EQ(v, data_read);
|
||||
|
@ -109,6 +116,7 @@ TEST_F(BufferWriterTest, AppendArray) {
|
|||
writer_->AppendArray(kuint8Array, sizeof(kuint8Array));
|
||||
ASSERT_EQ(sizeof(kuint8Array), writer_->Size());
|
||||
|
||||
CreateReader();
|
||||
std::vector<uint8> data_read;
|
||||
ASSERT_TRUE(reader_->ReadToVector(&data_read, sizeof(kuint8Array)));
|
||||
for (size_t i = 0; i < sizeof(kuint8Array); ++i)
|
||||
|
@ -124,6 +132,7 @@ TEST_F(BufferWriterTest, AppendBufferWriter) {
|
|||
ASSERT_EQ(sizeof(kuint16) + sizeof(kint64) + sizeof(kuint32),
|
||||
writer_->Size());
|
||||
|
||||
CreateReader();
|
||||
ASSERT_NO_FATAL_FAILURE(ReadAndExpect(kuint16));
|
||||
ASSERT_NO_FATAL_FAILURE(ReadAndExpect(kint64));
|
||||
ASSERT_NO_FATAL_FAILURE(ReadAndExpect(kuint32));
|
||||
|
@ -139,7 +148,7 @@ TEST_F(BufferWriterTest, Swap) {
|
|||
ASSERT_EQ(sizeof(kuint16) + sizeof(kint64), writer_->Size());
|
||||
ASSERT_EQ(sizeof(kuint32), local_writer.Size());
|
||||
|
||||
reader_.reset(new BufferReader(writer_->Buffer(), writer_->Size()));
|
||||
CreateReader();
|
||||
ASSERT_NO_FATAL_FAILURE(ReadAndExpect(kuint16));
|
||||
ASSERT_NO_FATAL_FAILURE(ReadAndExpect(kint64));
|
||||
}
|
||||
|
@ -153,7 +162,7 @@ TEST_F(BufferWriterTest, Clear) {
|
|||
|
||||
TEST_F(BufferWriterTest, WriteToFile) {
|
||||
base::FilePath path;
|
||||
ASSERT_TRUE(file_util::CreateTemporaryFile(&path));
|
||||
ASSERT_TRUE(base::CreateTemporaryFile(&path));
|
||||
LOG(INFO) << "Created temporary file: " << path.value();
|
||||
|
||||
// Append an array to buffer and then write to the temporary file.
|
||||
|
|
|
@ -108,9 +108,9 @@ void TestFile(MediaContainerName expected, const base::FilePath& filename) {
|
|||
// so use file length if file less than 8192 bytes (http://crbug.com/243885).
|
||||
int read_size = sizeof(buffer);
|
||||
int64 actual_size;
|
||||
if (file_util::GetFileSize(filename, &actual_size) && actual_size < read_size)
|
||||
if (base::GetFileSize(filename, &actual_size) && actual_size < read_size)
|
||||
read_size = actual_size;
|
||||
int read = file_util::ReadFile(filename, buffer, read_size);
|
||||
int read = base::ReadFile(filename, buffer, read_size);
|
||||
|
||||
// Now verify the type.
|
||||
EXPECT_EQ(expected,
|
||||
|
|
|
@ -50,7 +50,7 @@ bool StartFakePrng() {
|
|||
|
||||
// Open deterministic random data file and set the OpenSSL PRNG.
|
||||
g_rand_source_fp =
|
||||
file_util::OpenFile(GetTestDataFilePath(kFakePrngDataFile), "rb");
|
||||
base::OpenFile(GetTestDataFilePath(kFakePrngDataFile), "rb");
|
||||
if (!g_rand_source_fp) {
|
||||
LOG(ERROR) << "Cannot open " << kFakePrngDataFile;
|
||||
return false;
|
||||
|
@ -61,7 +61,7 @@ bool StartFakePrng() {
|
|||
|
||||
void StopFakePrng() {
|
||||
if (g_rand_source_fp) {
|
||||
file_util::CloseFile(g_rand_source_fp);
|
||||
base::CloseFile(g_rand_source_fp);
|
||||
g_rand_source_fp = NULL;
|
||||
} else {
|
||||
LOG(WARNING) << "Fake PRNG not started.";
|
||||
|
|
|
@ -33,7 +33,7 @@ static void CheckHttpGet(const std::string& url,
|
|||
HTTPFetcher fetcher;
|
||||
std::string response;
|
||||
ASSERT_OK(fetcher.Get(url, &response));
|
||||
RemoveChars(response, "\r\n\t ", &response);
|
||||
base::RemoveChars(response, "\r\n\t ", &response);
|
||||
EXPECT_EQ(expected_response, response);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ static void CheckHttpPost(const std::string& url, const std::string& data,
|
|||
HTTPFetcher fetcher;
|
||||
std::string response;
|
||||
ASSERT_OK(fetcher.Post(url, data, &response));
|
||||
RemoveChars(response, "\r\n\t ", &response);
|
||||
base::RemoveChars(response, "\r\n\t ", &response);
|
||||
EXPECT_EQ(expected_response, response);
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
'dependencies': [
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gmock.gyp:gmock',
|
||||
'../../third_party/openssl/openssl.gyp:openssl',
|
||||
'../file/file.gyp:file',
|
||||
'../test/media_test.gyp:media_test_support',
|
||||
'base',
|
||||
|
|
|
@ -177,7 +177,7 @@ void WidevineEncryptorSource::FillRequest(const std::string& content_id,
|
|||
DCHECK(request);
|
||||
|
||||
std::string content_id_base64_string;
|
||||
CHECK(base::Base64Encode(content_id, &content_id_base64_string));
|
||||
base::Base64Encode(content_id, &content_id_base64_string);
|
||||
|
||||
base::DictionaryValue request_dict;
|
||||
request_dict.SetString("content_id", content_id_base64_string);
|
||||
|
@ -218,10 +218,10 @@ Status WidevineEncryptorSource::SignRequest(const std::string& request,
|
|||
|
||||
// Encode request and signature using Base64 encoding.
|
||||
std::string request_base64_string;
|
||||
CHECK(base::Base64Encode(request, &request_base64_string));
|
||||
base::Base64Encode(request, &request_base64_string);
|
||||
|
||||
std::string signature_base64_string;
|
||||
CHECK(base::Base64Encode(signature, &signature_base64_string));
|
||||
base::Base64Encode(signature, &signature_base64_string);
|
||||
|
||||
base::DictionaryValue signed_request_dict;
|
||||
signed_request_dict.SetString("request", request_base64_string);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "media/event/vod_media_info_dump_muxer_listener.h"
|
||||
#include "media/file/file.h"
|
||||
#include "media/base/muxer_options.h"
|
||||
|
@ -61,7 +62,7 @@ scoped_refptr<StreamInfo> CreateVideoStreamInfo(
|
|||
param.width,
|
||||
param.height,
|
||||
param.nalu_length_size,
|
||||
¶m.extra_data[0],
|
||||
vector_as_array(¶m.extra_data),
|
||||
param.extra_data.size(),
|
||||
param.is_encrypted));
|
||||
}
|
||||
|
@ -152,7 +153,7 @@ class VodMediaInfoDumpMuxerListenerTest : public ::testing::Test {
|
|||
virtual ~VodMediaInfoDumpMuxerListenerTest() {}
|
||||
|
||||
virtual void SetUp() OVERRIDE {
|
||||
ASSERT_TRUE(file_util::CreateTemporaryFile(&temp_file_path_));
|
||||
ASSERT_TRUE(base::CreateTemporaryFile(&temp_file_path_));
|
||||
DLOG(INFO) << "Created temp file: " << temp_file_path_.value();
|
||||
|
||||
temp_file_ = File::Open(temp_file_path_.value().c_str(), "w");
|
||||
|
|
|
@ -64,7 +64,7 @@ TEST_F(LocalFileTest, Write) {
|
|||
// Read file using file_util API.
|
||||
std::string read_data(kDataSize, 0);
|
||||
ASSERT_EQ(kDataSize,
|
||||
file_util::ReadFile(test_file_path_, &read_data[0], kDataSize));
|
||||
base::ReadFile(test_file_path_, &read_data[0], kDataSize));
|
||||
|
||||
// Compare data written and read.
|
||||
EXPECT_EQ(data_, read_data);
|
||||
|
|
|
@ -16,14 +16,14 @@ LocalFile::LocalFile(const char* name, const char* mode)
|
|||
|
||||
bool LocalFile::Open() {
|
||||
internal_file_ =
|
||||
file_util::OpenFile(base::FilePath(file_name()), file_mode_.c_str());
|
||||
base::OpenFile(base::FilePath(file_name()), file_mode_.c_str());
|
||||
return (internal_file_ != NULL);
|
||||
}
|
||||
|
||||
bool LocalFile::Close() {
|
||||
bool result = true;
|
||||
if (internal_file_) {
|
||||
result = file_util::CloseFile(internal_file_);
|
||||
result = base::CloseFile(internal_file_);
|
||||
internal_file_ = NULL;
|
||||
}
|
||||
delete this;
|
||||
|
@ -52,7 +52,7 @@ int64 LocalFile::Size() {
|
|||
}
|
||||
|
||||
int64 file_size;
|
||||
if (!file_util::GetFileSize(base::FilePath(file_name()), &file_size)) {
|
||||
if (!base::GetFileSize(base::FilePath(file_name()), &file_size)) {
|
||||
LOG(ERROR) << "Cannot get file size.";
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ ChunkInfoIterator::ChunkInfoIterator(const SampleToChunk& sample_to_chunk)
|
|||
if (iterator_ != chunk_info_table_.end())
|
||||
current_chunk_ = iterator_->first_chunk;
|
||||
}
|
||||
ChunkInfoIterator::~ChunkInfoIterator() {}
|
||||
|
||||
bool ChunkInfoIterator::AdvanceChunk() {
|
||||
++current_chunk_;
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace mp4 {
|
|||
class ChunkInfoIterator {
|
||||
public:
|
||||
explicit ChunkInfoIterator(const SampleToChunk& sample_to_chunk);
|
||||
~ChunkInfoIterator();
|
||||
|
||||
// Advance the properties to refer to the next chunk. Return status
|
||||
// indicating whether the chunk is still valid.
|
||||
|
|
|
@ -16,6 +16,7 @@ CompositionOffsetIterator::CompositionOffsetIterator(
|
|||
: sample_index_(0),
|
||||
composition_offset_table_(composition_time_to_sample.composition_offset),
|
||||
iterator_(composition_offset_table_.begin()) {}
|
||||
CompositionOffsetIterator::~CompositionOffsetIterator() {}
|
||||
|
||||
bool CompositionOffsetIterator::AdvanceSample() {
|
||||
++sample_index_;
|
||||
|
|
|
@ -23,6 +23,7 @@ class CompositionOffsetIterator {
|
|||
public:
|
||||
explicit CompositionOffsetIterator(
|
||||
const CompositionTimeToSample& composition_time_to_sample);
|
||||
~CompositionOffsetIterator();
|
||||
|
||||
// Advance the properties to refer to the next sample. Return status
|
||||
// indicating whether the sample is still valid.
|
||||
|
|
|
@ -18,6 +18,7 @@ DecodingTimeIterator::DecodingTimeIterator(
|
|||
: sample_index_(0),
|
||||
decoding_time_table_(decoding_time_to_sample.decoding_time),
|
||||
iterator_(decoding_time_table_.begin()) {}
|
||||
DecodingTimeIterator::~DecodingTimeIterator() {}
|
||||
|
||||
bool DecodingTimeIterator::AdvanceSample() {
|
||||
++sample_index_;
|
||||
|
|
|
@ -23,6 +23,7 @@ class DecodingTimeIterator {
|
|||
public:
|
||||
explicit DecodingTimeIterator(
|
||||
const DecodingTimeToSample& decoding_time_to_sample);
|
||||
~DecodingTimeIterator();
|
||||
|
||||
// Advance the properties to refer to the next sample. Return status
|
||||
// indicating whether the sample is still valid.
|
||||
|
|
|
@ -16,6 +16,7 @@ SyncSampleIterator::SyncSampleIterator(const SyncSample& sync_sample)
|
|||
sync_sample_vector_(sync_sample.sample_number),
|
||||
iterator_(sync_sample_vector_.begin()),
|
||||
is_empty_(iterator_ == sync_sample_vector_.end()) {}
|
||||
SyncSampleIterator::~SyncSampleIterator() {}
|
||||
|
||||
bool SyncSampleIterator::AdvanceSample() {
|
||||
if (iterator_ != sync_sample_vector_.end() && sample_number_ == *iterator_)
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace mp4 {
|
|||
class SyncSampleIterator {
|
||||
public:
|
||||
explicit SyncSampleIterator(const SyncSample& sync_sample);
|
||||
~SyncSampleIterator();
|
||||
|
||||
// Advance the properties to refer to the next sample. Return status
|
||||
// indicating whether the sample is still valid.
|
||||
|
|
|
@ -51,8 +51,7 @@ class PackagerTest : public ::testing::TestWithParam<const char*> {
|
|||
public:
|
||||
virtual void SetUp() OVERRIDE {
|
||||
// Create a test directory for testing, will be deleted after test.
|
||||
ASSERT_TRUE(
|
||||
file_util::CreateNewTempDirectory("packager_", &test_directory_));
|
||||
ASSERT_TRUE(base::CreateNewTempDirectory("packager_", &test_directory_));
|
||||
|
||||
options_.segment_duration = kSegmentDurationInSeconds;
|
||||
options_.fragment_duration = kFragmentDurationInSecodns;
|
||||
|
|
|
@ -23,7 +23,7 @@ base::FilePath GetTestDataFilePath(const std::string& name) {
|
|||
|
||||
std::vector<uint8> ReadTestDataFile(const std::string& name) {
|
||||
std::string buffer;
|
||||
CHECK(file_util::ReadFileToString(GetTestDataFilePath(name), &buffer));
|
||||
CHECK(base::ReadFileToString(GetTestDataFilePath(name), &buffer));
|
||||
return std::vector<uint8>(buffer.begin(), buffer.end());
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ base::FilePath GetSchemaPath() {
|
|||
|
||||
std::string GetPathContent(const base::FilePath& file_path) {
|
||||
std::string content;
|
||||
bool file_read_to_string = file_util::ReadFileToString(file_path, &content);
|
||||
bool file_read_to_string = base::ReadFileToString(file_path, &content);
|
||||
DCHECK(file_read_to_string);
|
||||
return content;
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ void ExpectMpdToEqualExpectedOutputFile(
|
|||
const std::string& mpd_string,
|
||||
const std::string& expected_output_file) {
|
||||
std::string expected_mpd;
|
||||
ASSERT_TRUE(file_util::ReadFileToString(
|
||||
GetTestDataFilePath(expected_output_file), &expected_mpd))
|
||||
ASSERT_TRUE(base::ReadFileToString(GetTestDataFilePath(expected_output_file),
|
||||
&expected_mpd))
|
||||
<< "Failed to read: " << expected_output_file;
|
||||
|
||||
// Adding extra << here to get a formatted output.
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
Description:
|
||||
This directory is included to resolve gyp dependency on *.isolate when parsing
|
||||
base.gyp. Although the involved target is supposed to compiled off, gyp
|
||||
still tries to locate the included *.isolate. Refer below for the dependency
|
||||
chain.
|
||||
|
||||
Dependency Chain:
|
||||
base/base.gyp <= base/base_unittests.isolate <= base/base.isolate
|
||||
<= build/linux/system.isolate <= net/third_party/nss/ssl.isolate
|
||||
<= net/third_party/nss/ssl_base.isolate
|
||||
|
||||
File(s):
|
||||
net/third_party/nss/ssl_base.isolate
|
||||
net/third_party/nss/ssl.isolate
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
{
|
||||
'conditions': [
|
||||
['OS=="mac" and component=="shared_library"', {
|
||||
'variables': {
|
||||
'isolate_dependency_tracked': [
|
||||
'<(PRODUCT_DIR)/libcrssl.dylib',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['OS=="win" and component=="shared_library"', {
|
||||
'variables': {
|
||||
'isolate_dependency_tracked': [
|
||||
'<(PRODUCT_DIR)/crssl.dll',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'includes': [
|
||||
'ssl_base.isolate',
|
||||
],
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
# This is what is included by base_unittests.
|
||||
{
|
||||
'conditions': [
|
||||
['OS=="linux" and component=="shared_library" and use_openssl==0', {
|
||||
'variables': {
|
||||
'isolate_dependency_tracked': [
|
||||
'<(PRODUCT_DIR)/lib/libcrssl.so',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit a6772271f71672e889776bfe49ec4efd9da036df
|
||||
Subproject commit 74de57c951aedebc5dfe26a27604353432392b98
|
|
@ -1 +1 @@
|
|||
Subproject commit e39fea897879c8004609e382d1e568a85c3ab345
|
||||
Subproject commit e49b610806e6ba6063384ffd7f45d5b7cd561e65
|
|
@ -1 +1 @@
|
|||
Subproject commit 8f54aac19a36d72ea630c813cae51c81a3cc0d78
|
||||
Subproject commit bab551292a524df842435aded34751e598bfe30d
|
|
@ -1 +1 @@
|
|||
Subproject commit 793f69bbc09792052636dbe6038678b24d68e11b
|
||||
Subproject commit 4bb2a15a7a77d11fb1d36b077c926b740f50c8da
|
Loading…
Reference in New Issue