OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/android/demuxer_stream_player_params.h" | 5 #include "media/base/android/demuxer_stream_player_params.h" |
6 | 6 |
7 namespace media { | 7 namespace media { |
8 | 8 |
9 DemuxerConfigs::DemuxerConfigs() | 9 DemuxerConfigs::DemuxerConfigs() |
10 : audio_codec(kUnknownAudioCodec), | 10 : audio_codec(kUnknownAudioCodec), |
11 audio_channels(0), | 11 audio_channels(0), |
12 audio_sampling_rate(0), | 12 audio_sampling_rate(0), |
13 is_audio_encrypted(false), | 13 is_audio_encrypted(false), |
14 audio_codec_delay_ns(-1), | 14 audio_codec_delay_ns(-1), |
15 audio_seek_preroll_ns(-1), | 15 audio_seek_preroll_ns(-1), |
16 video_codec(kUnknownVideoCodec), | 16 video_codec(kUnknownVideoCodec), |
17 is_video_encrypted(false) {} | 17 is_video_encrypted(false) {} |
18 | 18 |
19 DemuxerConfigs::~DemuxerConfigs() {} | 19 DemuxerConfigs::~DemuxerConfigs() {} |
20 | 20 |
21 AccessUnit::AccessUnit() : is_end_of_stream(false), is_key_frame(false) {} | 21 AccessUnit::AccessUnit() : is_end_of_stream(false), is_key_frame(false) {} |
22 | 22 |
23 AccessUnit::~AccessUnit() {} | 23 AccessUnit::~AccessUnit() {} |
24 | 24 |
25 DemuxerData::DemuxerData() : type(DemuxerStream::UNKNOWN) {} | 25 DemuxerData::DemuxerData() : type(DemuxerStream::UNKNOWN) {} |
26 | 26 |
27 DemuxerData::~DemuxerData() {} | 27 DemuxerData::~DemuxerData() {} |
28 | 28 |
29 } // namespace media | 29 } // namespace media |
30 | |
31 std::ostream& operator<<(std::ostream& os, const media::AccessUnit& au) { | |
32 os << "status:" << au.status << (au.is_end_of_stream ? " EOS" : "") | |
33 << (au.is_key_frame ? " KEY_FRAME" : "") << " pts:" << au.timestamp | |
wolenetz
2015/06/19 22:46:42
nit: it might also be interesting to output dts he
Tima Vaisburd
2015/06/20 02:32:30
Yes, I even have this situation in the unit test :
wolenetz
2015/06/22 21:41:21
You're right. Ignore my comment - we don't need to
| |
34 << " size:" << au.data.size(); | |
wolenetz
2015/06/19 22:46:41
nit: if an AU contains a config change, that would
Tima Vaisburd
2015/06/20 02:32:30
I added operator<< but used is so far in SetDemuxe
wolenetz
2015/06/22 21:41:21
Duplication is ugly; but unless we jump forward to
| |
35 return os; | |
36 } | |
OLD | NEW |