Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: media/mojo/common/mojo_decoder_buffer_converter.cc

Issue 2518403004: media: Use __func__ instead of __FUNCTION__ (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/clients/mojo_video_decoder.cc ('k') | media/mojo/common/mojo_shared_buffer_video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/common/mojo_decoder_buffer_converter.cc
diff --git a/media/mojo/common/mojo_decoder_buffer_converter.cc b/media/mojo/common/mojo_decoder_buffer_converter.cc
index a7832bafda9827885c7bb2bfa79d33efee1bcd14..0a12aa6067ec6521bb1b98144b7900f4c75b0bb0 100644
--- a/media/mojo/common/mojo_decoder_buffer_converter.cc
+++ b/media/mojo/common/mojo_decoder_buffer_converter.cc
@@ -54,7 +54,7 @@ bool IsPipeReadWriteError(MojoResult result) {
std::unique_ptr<MojoDecoderBufferReader> MojoDecoderBufferReader::Create(
DemuxerStream::Type type,
mojo::ScopedDataPipeProducerHandle* producer_handle) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
std::unique_ptr<mojo::DataPipe> data_pipe = CreateDataPipe(type);
*producer_handle = std::move(data_pipe->producer_handle);
return base::WrapUnique(
@@ -64,32 +64,32 @@ std::unique_ptr<MojoDecoderBufferReader> MojoDecoderBufferReader::Create(
MojoDecoderBufferReader::MojoDecoderBufferReader(
mojo::ScopedDataPipeConsumerHandle consumer_handle)
: consumer_handle_(std::move(consumer_handle)), bytes_read_(0) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
MojoResult result =
pipe_watcher_.Start(consumer_handle_.get(), MOJO_HANDLE_SIGNAL_READABLE,
base::Bind(&MojoDecoderBufferReader::OnPipeReadable,
base::Unretained(this)));
if (result != MOJO_RESULT_OK) {
- DVLOG(1) << __FUNCTION__
+ DVLOG(1) << __func__
<< ": Failed to start watching the pipe. result=" << result;
consumer_handle_.reset();
}
}
MojoDecoderBufferReader::~MojoDecoderBufferReader() {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
}
void MojoDecoderBufferReader::ReadDecoderBuffer(
mojom::DecoderBufferPtr mojo_buffer,
ReadCB read_cb) {
- DVLOG(3) << __FUNCTION__;
+ DVLOG(3) << __func__;
// DecoderBuffer cannot be read if the pipe is already closed.
if (!consumer_handle_.is_valid()) {
DVLOG(1)
- << __FUNCTION__
+ << __func__
<< ": Failed to read DecoderBuffer becuase the pipe is already closed";
std::move(read_cb).Run(nullptr);
return;
@@ -116,12 +116,11 @@ void MojoDecoderBufferReader::ReadDecoderBuffer(
}
void MojoDecoderBufferReader::OnPipeError(MojoResult result) {
- DVLOG(1) << __FUNCTION__ << "(" << result << ")";
+ DVLOG(1) << __func__ << "(" << result << ")";
DCHECK(IsPipeReadWriteError(result));
if (media_buffer_) {
- DVLOG(1) << __FUNCTION__
- << ": reading from data pipe failed. result=" << result
+ DVLOG(1) << __func__ << ": reading from data pipe failed. result=" << result
<< ", buffer size=" << media_buffer_->data_size()
<< ", num_bytes(read)=" << bytes_read_;
DCHECK(read_cb_);
@@ -133,7 +132,7 @@ void MojoDecoderBufferReader::OnPipeError(MojoResult result) {
}
void MojoDecoderBufferReader::OnPipeReadable(MojoResult result) {
- DVLOG(4) << __FUNCTION__ << "(" << result << ")";
+ DVLOG(4) << __func__ << "(" << result << ")";
if (result != MOJO_RESULT_OK)
OnPipeError(result);
@@ -142,7 +141,7 @@ void MojoDecoderBufferReader::OnPipeReadable(MojoResult result) {
}
void MojoDecoderBufferReader::ReadDecoderBufferData() {
- DVLOG(4) << __FUNCTION__;
+ DVLOG(4) << __func__;
DCHECK(media_buffer_);
uint32_t buffer_size =
@@ -175,7 +174,7 @@ void MojoDecoderBufferReader::ReadDecoderBufferData() {
std::unique_ptr<MojoDecoderBufferWriter> MojoDecoderBufferWriter::Create(
DemuxerStream::Type type,
mojo::ScopedDataPipeConsumerHandle* consumer_handle) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
std::unique_ptr<mojo::DataPipe> data_pipe = CreateDataPipe(type);
*consumer_handle = std::move(data_pipe->consumer_handle);
return base::WrapUnique(
@@ -185,31 +184,31 @@ std::unique_ptr<MojoDecoderBufferWriter> MojoDecoderBufferWriter::Create(
MojoDecoderBufferWriter::MojoDecoderBufferWriter(
mojo::ScopedDataPipeProducerHandle producer_handle)
: producer_handle_(std::move(producer_handle)), bytes_written_(0) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
MojoResult result =
pipe_watcher_.Start(producer_handle_.get(), MOJO_HANDLE_SIGNAL_WRITABLE,
base::Bind(&MojoDecoderBufferWriter::OnPipeWritable,
base::Unretained(this)));
if (result != MOJO_RESULT_OK) {
- DVLOG(1) << __FUNCTION__
+ DVLOG(1) << __func__
<< ": Failed to start watching the pipe. result=" << result;
producer_handle_.reset();
}
}
MojoDecoderBufferWriter::~MojoDecoderBufferWriter() {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(1) << __func__;
}
mojom::DecoderBufferPtr MojoDecoderBufferWriter::WriteDecoderBuffer(
const scoped_refptr<DecoderBuffer>& media_buffer) {
- DVLOG(3) << __FUNCTION__;
+ DVLOG(3) << __func__;
// DecoderBuffer cannot be written if the pipe is already closed.
if (!producer_handle_.is_valid()) {
DVLOG(1)
- << __FUNCTION__
+ << __func__
<< ": Failed to write DecoderBuffer becuase the pipe is already closed";
return nullptr;
}
@@ -231,12 +230,11 @@ mojom::DecoderBufferPtr MojoDecoderBufferWriter::WriteDecoderBuffer(
}
void MojoDecoderBufferWriter::OnPipeError(MojoResult result) {
- DVLOG(1) << __FUNCTION__ << "(" << result << ")";
+ DVLOG(1) << __func__ << "(" << result << ")";
DCHECK(IsPipeReadWriteError(result));
if (media_buffer_) {
- DVLOG(1) << __FUNCTION__
- << ": writing to data pipe failed. result=" << result
+ DVLOG(1) << __func__ << ": writing to data pipe failed. result=" << result
<< ", buffer size=" << media_buffer_->data_size()
<< ", num_bytes(written)=" << bytes_written_;
media_buffer_ = nullptr;
@@ -246,7 +244,7 @@ void MojoDecoderBufferWriter::OnPipeError(MojoResult result) {
}
void MojoDecoderBufferWriter::OnPipeWritable(MojoResult result) {
- DVLOG(4) << __FUNCTION__ << "(" << result << ")";
+ DVLOG(4) << __func__ << "(" << result << ")";
if (result != MOJO_RESULT_OK)
OnPipeError(result);
@@ -255,7 +253,7 @@ void MojoDecoderBufferWriter::OnPipeWritable(MojoResult result) {
}
MojoResult MojoDecoderBufferWriter::WriteDecoderBufferData() {
- DVLOG(4) << __FUNCTION__;
+ DVLOG(4) << __func__;
DCHECK(media_buffer_);
uint32_t buffer_size =
« no previous file with comments | « media/mojo/clients/mojo_video_decoder.cc ('k') | media/mojo/common/mojo_shared_buffer_video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698