Index: services/media/framework_ffmpeg/ffmpeg_formatting.cc |
diff --git a/services/media/framework_ffmpeg/ffmpeg_formatting.cc b/services/media/framework_ffmpeg/ffmpeg_formatting.cc |
index 2367311601861e9ec1cc2e31079d226311ed6d5d..322cab6eb716361176be2150c22cdec72ca00a05 100644 |
--- a/services/media/framework_ffmpeg/ffmpeg_formatting.cc |
+++ b/services/media/framework_ffmpeg/ffmpeg_formatting.cc |
@@ -18,13 +18,12 @@ const char* safe(const char* s) { |
return s == nullptr ? "<nullptr>" : s; |
} |
-std::ostream& operator<<( |
- std::ostream& os, |
- const struct AVCodecTag *const *value) { |
+std::ostream& operator<<(std::ostream& os, |
+ const struct AVCodecTag* const* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else if (*value == nullptr) { |
- return os << "&<nullptr>" << std::endl; |
+ return os << "&<nullptr>" << std::endl; |
} else { |
os << std::endl; |
} |
@@ -35,7 +34,7 @@ std::ostream& operator<<( |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVInputFormat *value) { |
+std::ostream& operator<<(std::ostream& os, const AVInputFormat* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -47,14 +46,14 @@ std::ostream& operator<<(std::ostream& os, const AVInputFormat *value) { |
os << begl << "const char *long_name: " << value->long_name << std::endl; |
os << begl << "int flags: " << AVFMTFlags(value->flags); |
os << begl << "const char *extensions: " << safe(value->extensions) |
- << std::endl; |
+ << std::endl; |
os << begl << "const AVCodecTag * const *codec_tag: " << value->codec_tag; |
os << begl << "const char *mime_type: " << safe(value->mime_type) |
- << std::endl; |
+ << std::endl; |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVOutputFormat *value) { |
+std::ostream& operator<<(std::ostream& os, const AVOutputFormat* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -64,11 +63,11 @@ std::ostream& operator<<(std::ostream& os, const AVOutputFormat *value) { |
os << indent; |
os << begl << "const char *name: " << safe(value->name) << std::endl; |
os << begl << "const char *long_name: " << safe(value->long_name) |
- << std::endl; |
+ << std::endl; |
os << begl << "const char *mime_type: " << safe(value->mime_type) |
- << std::endl; |
+ << std::endl; |
os << begl << "const char *extensions: " << safe(value->extensions) |
- << std::endl; |
+ << std::endl; |
os << begl << "AVCodecID audio_codec: " << value->audio_codec; |
os << begl << "AVCodecID video_codec: " << value->video_codec; |
os << begl << "AVCodecID subtitle_codec: " << value->subtitle_codec; |
@@ -77,7 +76,7 @@ std::ostream& operator<<(std::ostream& os, const AVOutputFormat *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVIOContext *value) { |
+std::ostream& operator<<(std::ostream& os, const AVIOContext* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -97,7 +96,7 @@ std::ostream& operator<<(std::ostream& os, AVFMTCTXFlags value) { |
} |
} |
-std::ostream& operator<<(std::ostream& os, const AVRational *value) { |
+std::ostream& operator<<(std::ostream& os, const AVRational* value) { |
if (value == nullptr) { |
return os << "<none>" << std::endl; |
} else { |
@@ -111,7 +110,7 @@ std::ostream& operator<<(std::ostream& os, const AVRational *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const int *value) { |
+std::ostream& operator<<(std::ostream& os, const int* value) { |
if (value == nullptr) { |
return os << "<none>" << std::endl; |
} else { |
@@ -125,7 +124,7 @@ std::ostream& operator<<(std::ostream& os, const int *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const uint64_t *value) { |
+std::ostream& operator<<(std::ostream& os, const uint64_t* value) { |
if (value == nullptr) { |
return os << "<none>" << std::endl; |
} else { |
@@ -139,7 +138,7 @@ std::ostream& operator<<(std::ostream& os, const uint64_t *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVSampleFormat *value) { |
+std::ostream& operator<<(std::ostream& os, const AVSampleFormat* value) { |
if (value == nullptr) { |
return os << "<none>" << std::endl; |
} else { |
@@ -153,7 +152,7 @@ std::ostream& operator<<(std::ostream& os, const AVSampleFormat *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVCodec *value) { |
+std::ostream& operator<<(std::ostream& os, const AVCodec* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -163,21 +162,21 @@ std::ostream& operator<<(std::ostream& os, const AVCodec *value) { |
os << indent; |
os << begl << "const char *name: " << safe(value->name) << std::endl; |
os << begl << "const char *long_name: " << safe(value->long_name) |
- << std::endl; |
+ << std::endl; |
os << begl << "AVMediaType type: " << value->type; |
os << begl << "AVCodecID id: " << value->id; |
os << begl << "int capabilities: " << value->capabilities << std::endl; |
- os << begl << "AVRational *supported_framerates: " |
- << value->supported_framerates; |
- os << begl << "const int *supported_samplerates: " |
- << value->supported_samplerates; |
+ os << begl |
+ << "AVRational *supported_framerates: " << value->supported_framerates; |
+ os << begl |
+ << "const int *supported_samplerates: " << value->supported_samplerates; |
os << begl << "const AVSampleFormat *sample_fmts: " << value->sample_fmts; |
os << begl << "const uint64_t *channel_layouts: " << value->channel_layouts; |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVCodecContext *value) { |
+std::ostream& operator<<(std::ostream& os, const AVCodecContext* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -203,14 +202,16 @@ std::ostream& operator<<(std::ostream& os, const AVCodecContext *value) { |
os << begl << "int block_align: " << value->block_align << std::endl; |
os << begl << "int cutoff: " << value->cutoff << std::endl; |
os << begl << "uint64_t channel_layout: " << value->channel_layout |
- << std::endl; |
- os << begl << "uint64_t request_channel_layout: " |
- << value->request_channel_layout << std::endl; |
- os << begl << "AVAudioServiceType audio_service_type: " |
- << value->audio_service_type << std::endl; |
- os << begl << "AVSampleFormat request_sample_fmt: " |
- << value->request_sample_fmt; |
- os << begl << "int profile: " << value->profile << std::endl; |
+ << std::endl; |
+ os << begl |
+ << "uint64_t request_channel_layout: " << value->request_channel_layout |
+ << std::endl; |
+ os << begl |
+ << "AVAudioServiceType audio_service_type: " << value->audio_service_type |
+ << std::endl; |
+ os << begl |
+ << "AVSampleFormat request_sample_fmt: " << value->request_sample_fmt; |
+ os << begl << "int profile: " << value->profile << std::endl; |
return os << outdent; |
} |
@@ -218,7 +219,7 @@ std::ostream& operator<<(std::ostream& os, const AVRational& value) { |
return os << value.num << "/" << value.den << std::endl; |
} |
-std::ostream& operator<<(std::ostream& os, const AVStream *value) { |
+std::ostream& operator<<(std::ostream& os, const AVStream* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -235,14 +236,14 @@ std::ostream& operator<<(std::ostream& os, const AVStream *value) { |
os << begl << "int64_t nb_frames: " << value->nb_frames << std::endl; |
os << begl << "int disposition: " << AV_DISPOSITIONFlags(value->disposition); |
os << begl << "AVDiscard discard: " << value->discard; |
- os << begl << "AVRational sample_aspect_ratio: " |
- << value->sample_aspect_ratio; |
+ os << begl |
+ << "AVRational sample_aspect_ratio: " << value->sample_aspect_ratio; |
os << begl << "AVDictionary *metadata: " << value->metadata; |
os << begl << "AVRational avg_frame_rate: " << value->avg_frame_rate; |
os << begl << "AVPacket attached_pic: " << &value->attached_pic; |
os << begl << "int nb_side_data: " << value->nb_side_data << std::endl; |
- os << begl << "AVPacketSideData side_data: " << |
- AVPacketSideDataArray(value->side_data, value->nb_side_data); |
+ os << begl << "AVPacketSideData side_data: " |
+ << AVPacketSideDataArray(value->side_data, value->nb_side_data); |
os << begl << "int event_flags: " << AVSTREAM_EVENTFlags(value->event_flags); |
return os << outdent; |
} |
@@ -353,7 +354,7 @@ std::ostream& operator<<(std::ostream& os, AV_DISPOSITIONFlags value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVBufferRef *value) { |
+std::ostream& operator<<(std::ostream& os, const AVBufferRef* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -362,14 +363,15 @@ std::ostream& operator<<(std::ostream& os, const AVBufferRef *value) { |
os << indent; |
os << begl << "AVBuffer *buffer: " |
- << (value->buffer == nullptr ? "<nullptr>" : "TODO") << std::endl; |
- os << begl << "uint8_t *data: " |
- << (value->data == nullptr ? "<nullptr>" : "<opaque>") << std::endl; |
+ << (value->buffer == nullptr ? "<nullptr>" : "TODO") << std::endl; |
+ os << begl |
+ << "uint8_t *data: " << (value->data == nullptr ? "<nullptr>" : "<opaque>") |
+ << std::endl; |
os << begl << "int size: " << value->size << std::endl; |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVFrame *value) { |
+std::ostream& operator<<(std::ostream& os, const AVFrame* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -416,8 +418,8 @@ std::ostream& operator<<(std::ostream& os, const AVFrame *value) { |
} |
os << begl << "uint8_t **extended_data: " |
- << (value->extended_data == nullptr ? "<nullptr>" : "<opaque>") |
- << std::endl; |
+ << (value->extended_data == nullptr ? "<nullptr>" : "<opaque>") |
+ << std::endl; |
os << begl << "int width: " << value->width << std::endl; |
os << begl << "int height: " << value->height << std::endl; |
os << begl << "int nb_samples: " << value->nb_samples << std::endl; |
@@ -450,7 +452,7 @@ std::ostream& operator<<(std::ostream& os, const AVFrame *value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVPacket *value) { |
+std::ostream& operator<<(std::ostream& os, const AVPacket* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -461,8 +463,9 @@ std::ostream& operator<<(std::ostream& os, const AVPacket *value) { |
os << begl << "AVBufferRef *buf: " << value->buf; |
os << begl << "int64_t pts: " << value->pts << std::endl; |
os << begl << "int64_t dts: " << value->dts << std::endl; |
- os << begl << "uint8_t *data: " |
- << (value->data == nullptr ? "<nullptr>" : "<opaque>") << std::endl; |
+ os << begl |
+ << "uint8_t *data: " << (value->data == nullptr ? "<nullptr>" : "<opaque>") |
+ << std::endl; |
os << begl << "int size: " << value->size << std::endl; |
os << begl << "int stream_index: " << value->stream_index << std::endl; |
os << begl << "int flags: " << value->flags << std::endl; |
@@ -470,12 +473,12 @@ std::ostream& operator<<(std::ostream& os, const AVPacket *value) { |
os << begl << "int side_data_elems: " << value->side_data_elems << std::endl; |
os << begl << "int duration: " << value->duration << std::endl; |
os << begl << "int64_t pos: " << value->pos << std::endl; |
- os << begl << "int64_t convergence_duration: " |
- << value->convergence_duration << std::endl; |
+ os << begl << "int64_t convergence_duration: " << value->convergence_duration |
+ << std::endl; |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVPacketSideData *value) { |
+std::ostream& operator<<(std::ostream& os, const AVPacketSideData* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -499,7 +502,7 @@ std::ostream& operator<<(std::ostream& os, const AVPacketSideDataArray& value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVProgram *value) { |
+std::ostream& operator<<(std::ostream& os, const AVProgram* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -523,7 +526,7 @@ std::ostream& operator<<(std::ostream& os, const AVProgramArray& value) { |
return os << outdent; |
} |
-std::ostream& operator<<(std::ostream& os, const AVChapter *value) { |
+std::ostream& operator<<(std::ostream& os, const AVChapter* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -549,14 +552,14 @@ std::ostream& operator<<(std::ostream& os, const AVChapterArray& value) { |
std::ostream& operator<<(std::ostream& os, AVCodecID value) { |
return os << avcodec_get_name(value) << " (" << static_cast<int>(value) << ")" |
- << std::endl; |
+ << std::endl; |
} |
-std::ostream& operator<<(std::ostream& os, const AVDictionary *value) { |
+std::ostream& operator<<(std::ostream& os, const AVDictionary* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} |
- AVDictionaryEntry *entry = |
+ AVDictionaryEntry* entry = |
av_dict_get(value, "", nullptr, AV_DICT_IGNORE_SUFFIX); |
if (entry == nullptr) { |
return os << "<empty>" << std::endl; |
@@ -581,7 +584,7 @@ std::ostream& operator<<(std::ostream& os, AVFMT_EVENTFlags value) { |
return os << "AVFMT_EVENT_FLAG_METADATA_UPDATED" << std::endl; |
} else { |
return os << "<UNKNOWN AVFMT_EVENT_FLAG_: " << value.flags_ << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -595,7 +598,7 @@ std::ostream& operator<<(std::ostream& os, AVSTREAM_EVENTFlags value) { |
return os << "AVSTREAM_EVENT_FLAG_METADATA_UPDATED" << std::endl; |
} else { |
return os << "<UNKNOWN AVSTREAM_EVENT_FLAG_: " << value.flags_ << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -609,7 +612,7 @@ std::ostream& operator<<(std::ostream& os, AVFMT_AVOID_NEG_TSFlags value) { |
return os << "AVFMT_AVOID_NEG_TS_MAKE_ZERO" << std::endl; |
default: |
return os << "<UNKNOWN AVFMT_AVOID_NEG_TS_: " << value.flags_ << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -631,7 +634,7 @@ std::ostream& operator<<(std::ostream& os, AVMediaType value) { |
return os << "AVMEDIA_TYPE_NB" << std::endl; |
default: |
return os << "<UNKNOWN AVMediaType: " << static_cast<int>(value) << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -663,7 +666,7 @@ std::ostream& operator<<(std::ostream& os, AVSampleFormat value) { |
return os << "AV_SAMPLE_FMT_NB" << std::endl; |
default: |
return os << "<UNKNOWN AVSampleFormat: " << static_cast<int>(value) << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -695,7 +698,7 @@ std::ostream& operator<<(std::ostream& os, AVColorSpace value) { |
return os << "AVCOL_SPC_NB" << std::endl; |
default: |
return os << "<UNKNOWN AVColorSpace: " << static_cast<int>(value) << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -717,7 +720,7 @@ std::ostream& operator<<(std::ostream& os, enum AVDiscard value) { |
return os << "AVDISCARD_ALL" << std::endl; |
default: |
return os << "<UNKNOWN AVDISCARD_: " << static_cast<int>(value) << ">" |
- << std::endl; |
+ << std::endl; |
} |
} |
@@ -731,11 +734,11 @@ std::ostream& operator<<(std::ostream& os, AVDurationEstimationMethod value) { |
return os << "AVFMT_DURATION_FROM_BITRATE" << std::endl; |
default: |
return os << "<UNKNOWN AVDurationEstimationMethod: " |
- << static_cast<int>(value) << ">" << std::endl; |
+ << static_cast<int>(value) << ">" << std::endl; |
} |
} |
-std::ostream& operator<<(std::ostream& os, const AVFormatContext *value) { |
+std::ostream& operator<<(std::ostream& os, const AVFormatContext* value) { |
if (value == nullptr) { |
return os << "<nullptr>" << std::endl; |
} else { |
@@ -748,8 +751,8 @@ std::ostream& operator<<(std::ostream& os, const AVFormatContext *value) { |
os << begl << "AVIOContext *pb: " << value->pb; |
os << begl << "int ctx_flags: " << AVFMTCTXFlags(value->ctx_flags); |
os << begl << "unsigned int nb_streams: " << value->nb_streams << std::endl; |
- os << begl << "AVStream **streams: " |
- << AVStreamArray(value->streams, value->nb_streams); |
+ os << begl << "AVStream **streams: " << AVStreamArray(value->streams, |
+ value->nb_streams); |
os << begl << "char filename[1024]: " << value->filename << std::endl; |
os << begl << "int64_t start_time: " << value->start_time << std::endl; |
os << begl << "int64_t duration: " << value->duration << std::endl; |
@@ -759,44 +762,44 @@ std::ostream& operator<<(std::ostream& os, const AVFormatContext *value) { |
os << begl << "int flags: " << AVFMTFlags(value->flags); |
os << begl << "int64_t probesize: " << value->probesize << std::endl; |
os << begl << "unsigned int nb_programs: " << value->nb_programs << std::endl; |
- os << begl << "AVProgram **programs: " |
- << AVProgramArray(value->programs, value->nb_programs); |
+ os << begl << "AVProgram **programs: " << AVProgramArray(value->programs, |
+ value->nb_programs); |
os << begl << "AVCodecID video_codec_id: " << value->video_codec_id; |
os << begl << "AVCodecID audio_codec_id: " << value->audio_codec_id; |
os << begl << "AVCodecID subtitle_codec_id: " << value->subtitle_codec_id; |
- os << begl << "unsigned int max_index_size: " |
- << value->max_index_size << std::endl; |
- os << begl << "unsigned int max_picture_buffer: " |
- << value->max_picture_buffer << std::endl; |
+ os << begl << "unsigned int max_index_size: " << value->max_index_size |
+ << std::endl; |
+ os << begl << "unsigned int max_picture_buffer: " << value->max_picture_buffer |
+ << std::endl; |
os << begl << "unsigned int nb_chapters: " << value->nb_chapters << std::endl; |
- os << begl << "AVChapter **chapters: " |
- << AVChapterArray(value->chapters, value->nb_chapters); |
+ os << begl << "AVChapter **chapters: " << AVChapterArray(value->chapters, |
+ value->nb_chapters); |
os << begl << "AVDictionary *metadata: " << value->metadata; |
os << begl << "int64_t start_time_realtime: " << value->start_time_realtime |
- << std::endl; |
+ << std::endl; |
os << begl << "int fps_probe_size: " << value->fps_probe_size << std::endl; |
- os << begl << "int error_recognition: " |
- << value->error_recognition << std::endl; |
- os << begl << "int64_t max_interleave_delta: " |
- << value->max_interleave_delta << std::endl; |
- os << begl << "int strict_std_compliance: " |
- << value->strict_std_compliance << std::endl; |
+ os << begl << "int error_recognition: " << value->error_recognition |
+ << std::endl; |
+ os << begl << "int64_t max_interleave_delta: " << value->max_interleave_delta |
+ << std::endl; |
+ os << begl << "int strict_std_compliance: " << value->strict_std_compliance |
+ << std::endl; |
os << begl << "int event_flags: " << AVFMT_EVENTFlags(value->flags); |
os << begl << "int max_ts_probe: " << value->max_ts_probe << std::endl; |
os << begl << "int avoid_negative_ts: " |
- << AVFMT_AVOID_NEG_TSFlags(value->avoid_negative_ts); |
+ << AVFMT_AVOID_NEG_TSFlags(value->avoid_negative_ts); |
os << begl << "int ts_id: " << value->ts_id << std::endl; |
os << begl << "int audio_preload: " << value->audio_preload << std::endl; |
- os << begl << "int max_chunk_duration: " |
- << value->max_chunk_duration << std::endl; |
+ os << begl << "int max_chunk_duration: " << value->max_chunk_duration |
+ << std::endl; |
os << begl << "int max_chunk_size: " << value->max_chunk_size << std::endl; |
os << begl << "int use_wallclock_as_timestamps: " |
- << value->use_wallclock_as_timestamps << std::endl; |
+ << value->use_wallclock_as_timestamps << std::endl; |
os << begl << "int avio_flags: " << value->avio_flags << std::endl; |
os << begl << "AVDurationEstimationMethod duration_estimation_method: " |
- << value->duration_estimation_method; |
+ << value->duration_estimation_method; |
os << begl << "int64_t skip_initial_bytes: " << value->skip_initial_bytes |
- << std::endl; |
+ << std::endl; |
os << begl << "TODO(dalesat): more" << std::endl; |
return os << outdent; |
} |