| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 if (validUTF8) | 138 if (validUTF8) |
| 139 m_fragments.append(std::make_pair(name, value)); | 139 m_fragments.append(std::make_pair(name, value)); |
| 140 | 140 |
| 141 offset = parameterEnd + 1; | 141 offset = parameterEnd + 1; |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 void MediaFragmentURIParser::parseTimeFragment() | 145 void MediaFragmentURIParser::parseTimeFragment() |
| 146 { | 146 { |
| 147 ASSERT(m_timeFormat == None); | 147 DCHECK_EQ(m_timeFormat, None); |
| 148 | 148 |
| 149 if (m_fragments.isEmpty()) | 149 if (m_fragments.isEmpty()) |
| 150 parseFragments(); | 150 parseFragments(); |
| 151 | 151 |
| 152 m_timeFormat = Invalid; | 152 m_timeFormat = Invalid; |
| 153 | 153 |
| 154 for (unsigned i = 0; i < m_fragments.size(); ++i) { | 154 for (unsigned i = 0; i < m_fragments.size(); ++i) { |
| 155 std::pair<String, String>& fragment = m_fragments[i]; | 155 std::pair<String, String>& fragment = m_fragments[i]; |
| 156 | 156 |
| 157 ASSERT(fragment.first.is8Bit()); | 157 DCHECK(fragment.first.is8Bit()); |
| 158 ASSERT(fragment.second.is8Bit()); | 158 DCHECK(fragment.second.is8Bit()); |
| 159 | 159 |
| 160 // http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#na
ming-time | 160 // http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#na
ming-time |
| 161 // Temporal clipping is denoted by the name t, and specified as an inter
val with a begin | 161 // Temporal clipping is denoted by the name t, and specified as an inter
val with a begin |
| 162 // time and an end time | 162 // time and an end time |
| 163 if (fragment.first != "t") | 163 if (fragment.first != "t") |
| 164 continue; | 164 continue; |
| 165 | 165 |
| 166 // http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#np
t-time | 166 // http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#np
t-time |
| 167 // Temporal clipping can be specified either as Normal Play Time (npt) R
FC 2326, as SMPTE timecodes, | 167 // Temporal clipping can be specified either as Normal Play Time (npt) R
FC 2326, as SMPTE timecodes, |
| 168 // SMPTE, or as real-world clock time (clock) RFC 2326. Begin and end ti
mes are always specified | 168 // SMPTE, or as real-world clock time (clock) RFC 2326. Begin and end ti
mes are always specified |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 if (offset < length && timeString[offset] == '.') | 305 if (offset < length && timeString[offset] == '.') |
| 306 fraction = collectFraction(timeString, length, offset).toDouble(); | 306 fraction = collectFraction(timeString, length, offset).toDouble(); |
| 307 | 307 |
| 308 time = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + fr
action; | 308 time = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + fr
action; |
| 309 return true; | 309 return true; |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace blink | 312 } // namespace blink |
| OLD | NEW |