We convert ASN1 time via std::tm to int64_t representing milliseconds-since-epoch. We do not use time_t since that cannot store milliseconds, and expires for 32-bit platforms in 2038 also for seconds.
Conversion via std::tm might might seem silly, but actually doesn't add any complexity.
One would expect tm -> seconds-since-epoch to already exist on the standard library. There is mktime, but it uses localtime (and sets an environment variable, and has the 2038 problem).
The ASN1 TIME parsing is limited to what is required by RFC 5280.
BUG=webrtc:5150
R=hbos@webrtc.org, nisse@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1468273004 .
Cr-Commit-Position: refs/heads/master@{#10854}
Related to issues discussed in the referenced bug but does not solve that bug's main problem.
BUG=webrtc:4776
Review URL: https://codereview.webrtc.org/1485673003
Cr-Commit-Position: refs/heads/master@{#10852}
Reason for revert:
Speculative revert since a downstream test started failing with this.
Original issue's description:
> Add _decoder CHECK to VCMGenericDecoder constructor.
>
> This should never be using a null decoder, but it looks like it's
> crashing out in the field. Adding a CHECK to see if it catches any
> interesting stack traces.
>
> Also making the _decoder pointer const to show that it should never be
> changing.
>
> BUG=chromium:563299
> R=stefan@webrtc.org
>
> Committed: a443ec1a75TBR=stefan@webrtc.org,pbos@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:563299
Review URL: https://codereview.webrtc.org/1490703002
Cr-Commit-Position: refs/heads/master@{#10851}
The callback keeps a reference to an object until the callback goes out of scope.
Review URL: https://codereview.webrtc.org/1487493002
Cr-Commit-Position: refs/heads/master@{#10847}
This should never be using a null decoder, but it looks like it's
crashing out in the field. Adding a CHECK to see if it catches any
interesting stack traces.
Also making the _decoder pointer const to show that it should never be
changing.
BUG=chromium:563299
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1485713002 .
Cr-Commit-Position: refs/heads/master@{#10843}
Chromium implements AudioProcessorInterface::GetStats(), but other
clients may not. The existing stats were getting overwritten with
default AudioProcessorStats values in that case.
Now, we only overwrite the stats if the track has an
AudioProcessorInterface. Also, move signal level out of
SetAudioProcessingStats() to avoid the "don't set if it's -1" pattern.
Review URL: https://codereview.webrtc.org/1469803004
Cr-Commit-Position: refs/heads/master@{#10831}
-Renamed the TimeToFrequency and FrequencyToTime functions.
-Moved the windowing from the TimeToFrequency function.
-Simplified the EchoSubtraction function.
Note that the aec state is still an input to the EchoSubtraction function, and it currently needs to be that in order to support the output of the debug file. The longer-term goal is, however, to order the state into substates. This will simplify the parameter lists to the EchoCancellation function as well as replace the aec state as a parameter
BUG=webrtc:5201
Review URL: https://codereview.webrtc.org/1456123003
Cr-Commit-Position: refs/heads/master@{#10830}
In https://codereview.webrtc.org/1481493004/ some duplicated headers
were left to make it possible to update downstream without breakage.
Now that's done and we can remove these to avoid confusion.
BUG=webrtc:5095
TBR=henrik.lundin@webrtc.org, kwiberg@webrtc.org
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
NOTRY=True
Review URL: https://codereview.webrtc.org/1477423002
Cr-Commit-Position: refs/heads/master@{#10829}
Multiple decoders were used for the same payload type in this test case,
causing CHECK failures when configuring.
BUG=webrtc:5249
TBR=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1484443003 .
Cr-Commit-Position: refs/heads/master@{#10825}
Created rtcp::Psfb abstract class between rtcp::Pli and rtcp::RtcpPacket to hold common data for Feedback Message.
BUG=webrtc:5260
Review URL: https://codereview.webrtc.org/1446513002
Cr-Commit-Position: refs/heads/master@{#10823}
Prevents double-initialization of decoders due to resolution changes
between initial database settings and first incoming frame.
BUG=webrtc:5251
R=mflodman@webrtc.org
Review URL: https://codereview.webrtc.org/1474193002 .
Cr-Commit-Position: refs/heads/master@{#10822}
Also adds a RTC_CHECK in VideoReceiveStream that verifies that decoders
aren't null, since this will attempt to deregister a codec which would
previously fail with an obscure stack trace not indicating what actually
was wrong.
BUG=webrtc:5249
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1479793002 .
Cr-Commit-Position: refs/heads/master@{#10821}
Mostly moved code around in WebRtcVoiceEngine:
- Added new internal class WebRtcVoiceCodecs for static codec functions and the CodecPrefs.
- ConstructCodecs() -> WebRtcVoiceCodecs::SupportedCodecs().
- FindWebRtcCodec -> WebRtcVoiceCodecs::ToCodecInst().
- WebRtcVoiceMediaChannel::SetRecvCodecsInternal() folded into WebRtcVoiceMediaChannel::SetRecvCodecs() (slight logic change).
- Change to how SetRecPayloadType() is implemented in fakewebrtcvoiceengine.h (lines 460-470).
BUG=webrtc:4690
Review URL: https://codereview.webrtc.org/1461333002
Cr-Commit-Position: refs/heads/master@{#10819}
Also changes presubmit script to not run cpplint on objc dirs.
BUG=
Review URL: https://codereview.webrtc.org/1467173006
Cr-Commit-Position: refs/heads/master@{#10815}
Seconds and fractions parts of the ntp time presented with two values, but used as one.
This helper structure can make that use more clear.
(initially introduced into rtp_rtcp as https://codereview.webrtc.org/1435833003)
BUG=webrtc:5260
Review URL: https://codereview.webrtc.org/1482593002
Cr-Commit-Position: refs/heads/master@{#10814}
The webrtc/ rule required a ^ to avoid matching e.g. talk/app/webrtc.
Also modify my subscriptions a bit.
R=kjellander@webrtc.org
TEST=verified with depot_tools/watchlists.py
NOTRY=true
Review URL: https://codereview.webrtc.org/1473983002
Cr-Commit-Position: refs/heads/master@{#10813}
* Move PlatformThread to rtc::.
* Remove ::CreateThread factory method.
* Make non-scoped_ptr from a lot of invocations.
* Make Start/Stop void.
* Remove rtc::Thread priorities, which were unused and would collide.
* Add ::IsRunning() to PlatformThread.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1476453002 .
Cr-Commit-Position: refs/heads/master@{#10812}
Enable cpplint and have it use a whitelist that also checks
in subdirectories.
Move the cpplint check so it runs before the pylint check
since that one always run and increases the time to errors
for cpplint.
Fix all cpplint errors in webrtc/video_engine.
BUG=webrtc:5149
TESTED=Fixed issues reported by:
find webrtc/video_engine -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.
R=pbos@chromium.org, phoglund@chromium.orgTBR=pbos@webrtc.org, phoglund@webrtc.org
Review URL: https://codereview.webrtc.org/1481723003 .
Cr-Commit-Position: refs/heads/master@{#10808}