webrtc/video
Markus Handell ad5037b4a8 Reland "Refactor the PlatformThread API."
This reverts commit 793bac569f.

Reason for revert: rare compilation error fixed

Original change's description:
> Revert "Refactor the PlatformThread API."
>
> This reverts commit c89fdd716c.
>
> Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
> See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?
>
> Original change's description:
> > Refactor the PlatformThread API.
> >
> > PlatformThread's API is using old style function pointers, causes
> > casting, is unintuitive and forces artificial call sequences, and
> > is additionally possible to misuse in release mode.
> >
> > Fix this by an API face lift:
> > 1. The class is turned into a handle, which can be empty.
> > 2. The only way of getting a non-empty PlatformThread is by calling
> > SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> > code reader.
> > 3. Handles can be Finalized, which works differently for joinable and
> > detached threads:
> >   a) Handles for detached threads are simply closed where applicable.
> >   b) Joinable threads are joined before handles are closed.
> > 4. The destructor finalizes handles. No explicit call is needed.
> >
> > Fixed: webrtc:12727
> > Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> > Commit-Queue: Markus Handell <handellm@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33923}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=handellm@webrtc.org
>
> Bug: webrtc:12727
> Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33936}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:12727
Change-Id: Ifd6f44eac72fed84474277a1be03eb84d2f4376e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33950}
2021-05-07 14:14:43 +00:00
..
adaptation Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
end_to_end_tests Reland "Remove Invoke from VideoChannel::FillBitrateInfo." 2021-05-03 15:16:34 +00:00
g3doc Fix documentation owners formating 2021-04-23 11:07:28 +00:00
test Stop using VideoBitrateAllocationObserver in VideoStreamEncoder. 2020-10-07 18:01:13 +00:00
alignment_adjuster_unittest.cc AlignmentAdjuster: take reduced layers into account for default downscaling. 2021-01-19 16:59:11 +00:00
alignment_adjuster.cc AlignmentAdjuster: take reduced layers into account for default downscaling. 2021-01-19 16:59:11 +00:00
alignment_adjuster.h AlignmentAdjuster: take reduced layers into account for default downscaling. 2021-01-19 16:59:11 +00:00
buffered_frame_decryptor_unittest.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
buffered_frame_decryptor.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
buffered_frame_decryptor.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
BUILD.gn Move h264_profile_level_id and vp9_profile to api/video_codecs 2021-04-20 09:42:05 +00:00
call_stats2_unittest.cc [Battery]: Delay start of CallStats. 2021-02-11 12:00:05 +00:00
call_stats2.cc [Battery]: Delay start of CallStats. 2021-02-11 12:00:05 +00:00
call_stats2.h [Battery]: Delay start of CallStats. 2021-02-11 12:00:05 +00:00
call_stats_unittest.cc In video/ replace mock macros with unified MOCK_METHOD macro 2020-05-14 18:12:40 +00:00
call_stats.cc Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
call_stats.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
cpu_scaling_tests.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
DEPS Delete interface class VideoCaptureExternal 2019-04-09 08:18:20 +00:00
encoder_bitrate_adjuster_unittest.cc Fixes incorrect feedback to EncoderBitrateAdjuster [perf note] 2021-03-24 12:08:23 +00:00
encoder_bitrate_adjuster.cc Fixes incorrect feedback to EncoderBitrateAdjuster [perf note] 2021-03-24 12:08:23 +00:00
encoder_bitrate_adjuster.h Fixes incorrect feedback to EncoderBitrateAdjuster [perf note] 2021-03-24 12:08:23 +00:00
encoder_overshoot_detector_unittest.cc Replace DataSize and DataRate factories with newer versions 2020-02-18 16:09:50 +00:00
encoder_overshoot_detector.cc Track both "network" and "media" rate in EncoderOvershootDetector 2019-04-01 13:10:49 +00:00
encoder_overshoot_detector.h Track both "network" and "media" rate in EncoderOvershootDetector 2019-04-01 13:10:49 +00:00
encoder_rtcp_feedback_unittest.cc Delete media transport integration. 2019-11-26 19:19:36 +00:00
encoder_rtcp_feedback.cc Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
encoder_rtcp_feedback.h Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
frame_dumping_decoder.cc Adds VideoDecoder::GetDecoderInfo() 2021-01-14 13:33:22 +00:00
frame_dumping_decoder.h Simplify the VideoFrameDumpingDecoder API. 2019-08-21 09:49:02 +00:00
frame_encode_metadata_writer_unittest.cc Deprecate the raw-pointer constructor of EncodedImage. 2020-09-23 12:51:30 +00:00
frame_encode_metadata_writer.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
frame_encode_metadata_writer.h Ignore RTPFragmentationHeader when rewriting H264 SPS 2020-07-27 09:42:25 +00:00
full_stack_tests_plot.py Reformat python files checked by pylint (part 1/2). 2020-10-30 10:13:11 +00:00
full_stack_tests.cc Move h264_profile_level_id and vp9_profile to api/video_codecs 2021-04-20 09:42:05 +00:00
OWNERS Remove wildcard ownership for build files. 2020-02-19 14:05:46 +00:00
pc_full_stack_tests.cc Move h264_profile_level_id and vp9_profile to api/video_codecs 2021-04-20 09:42:05 +00:00
picture_id_tests.cc Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
quality_limitation_reason_tracker_unittest.cc Always pass arguments to INSTANTIATE_TEST_SUITE_P. 2019-09-30 12:52:07 +00:00
quality_limitation_reason_tracker.cc Implement QualityLimitationReasonTracker and expose "reason". 2019-05-28 16:23:55 +00:00
quality_limitation_reason_tracker.h Add qualityLimitationResolutionChanges stat 2019-09-09 15:22:57 +00:00
quality_scaling_tests.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
quality_threshold_unittest.cc
quality_threshold.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
quality_threshold.h Remove clang:find_bad_constructs suppression from call:call. 2018-08-29 11:57:00 +00:00
receive_statistics_proxy2_unittest.cc Move ReceiveStatisticsProxy stats variables to the worker thread. 2020-05-10 20:43:40 +00:00
receive_statistics_proxy2.cc Remove dependency from RtpRtcp on the Module interface. 2020-06-04 08:11:21 +00:00
receive_statistics_proxy2.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
receive_statistics_proxy_unittest.cc Revert "Preparation for ReceiveStatisticsProxy lock reduction." 2020-04-07 19:50:20 +00:00
receive_statistics_proxy.cc Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
receive_statistics_proxy.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
report_block_stats_unittest.cc ReportBlockStatsTest: Remove usage of RTCPReportBlock (no longer used). 2019-08-02 08:58:36 +00:00
report_block_stats.cc Simplify ReportBlockStats 2019-08-01 14:09:23 +00:00
report_block_stats.h Simplify ReportBlockStats 2019-08-01 14:09:23 +00:00
rtp_streams_synchronizer2.cc Fix for unbounded increase in audio delay when no audio packets are flowing in 2020-09-15 15:54:54 +00:00
rtp_streams_synchronizer2.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
rtp_streams_synchronizer.cc Fix for unbounded increase in audio delay when no audio packets are flowing in 2020-09-15 15:54:54 +00:00
rtp_streams_synchronizer.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
rtp_video_stream_receiver2_unittest.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
rtp_video_stream_receiver2.cc Store RtpPacketReceived::arrival_time as Timestamp. 2021-05-05 16:22:33 +00:00
rtp_video_stream_receiver2.h Update last received keyframe packet timestamp on all packets with the same RTP timestamp. 2021-04-19 15:55:15 +00:00
rtp_video_stream_receiver_frame_transformer_delegate_unittest.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
rtp_video_stream_receiver_frame_transformer_delegate.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_video_stream_receiver_frame_transformer_delegate.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_video_stream_receiver_unittest.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
rtp_video_stream_receiver.cc Store RtpPacketReceived::arrival_time as Timestamp. 2021-05-05 16:22:33 +00:00
rtp_video_stream_receiver.h Update last received keyframe packet timestamp on all packets with the same RTP timestamp. 2021-04-19 15:55:15 +00:00
screenshare_loopback.cc Cleanup setting VideoQualityTestFixtureInterface::Param struct 2020-07-08 13:53:57 +00:00
send_delay_stats_unittest.cc Add directive to make webrtc metrics optional. 2019-12-09 13:55:50 +00:00
send_delay_stats.cc Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
send_delay_stats.h Handle OnPacketSent on the network thread via MediaChannel. 2021-04-19 16:59:48 +00:00
send_statistics_proxy_unittest.cc Remove unused members in tests. 2021-04-12 07:21:03 +00:00
send_statistics_proxy.cc Reland "Remove Invoke from VideoChannel::FillBitrateInfo." 2021-05-03 15:16:34 +00:00
send_statistics_proxy.h Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
stats_counter_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
stats_counter.cc Make fewer copies when using StringBuilder. 2018-09-24 09:39:19 +00:00
stats_counter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
stream_synchronization_unittest.cc Fix for unbounded increase in audio delay when no audio packets are flowing in 2020-09-15 15:54:54 +00:00
stream_synchronization.cc Make AV sync robust to failures to set a desired minimum delay 2020-09-09 15:44:47 +00:00
stream_synchronization.h Make AV sync robust to failures to set a desired minimum delay 2020-09-09 15:44:47 +00:00
sv_loopback.cc Cleanup setting VideoQualityTestFixtureInterface::Param struct 2020-07-08 13:53:57 +00:00
transport_adapter.cc Remove clang:find_bad_constructs suppression from call:call. 2018-08-29 11:57:00 +00:00
transport_adapter.h Format almost everything. 2019-07-08 13:45:15 +00:00
video_analyzer.cc Reland "Refactor the PlatformThread API." 2021-05-07 14:14:43 +00:00
video_analyzer.h Reland "Refactor the PlatformThread API." 2021-05-07 14:14:43 +00:00
video_loopback_main.cc Rewrite video_loopback to use new mac capturer. 2019-03-06 14:37:33 +00:00
video_loopback_main.mm Rewrite video_loopback to use new mac capturer. 2019-03-06 14:37:33 +00:00
video_loopback.cc Cleanup setting VideoQualityTestFixtureInterface::Param struct 2020-07-08 13:53:57 +00:00
video_loopback.h Rewrite video_loopback to use new mac capturer. 2019-03-06 14:37:33 +00:00
video_quality_observer2.cc Move processing of frame meta data for OnFrame/OnRenderedFrame to the worker thread 2020-05-10 11:47:52 +00:00
video_quality_observer2.h Move processing of frame meta data for OnFrame/OnRenderedFrame to the worker thread 2020-05-10 11:47:52 +00:00
video_quality_observer.cc Revert "Preparation for ReceiveStatisticsProxy lock reduction." 2020-04-07 19:50:20 +00:00
video_quality_observer.h Get WebRTC.Video.ReceivedPacketsLostInPercent from ReceiveStatistics 2019-08-02 12:38:34 +00:00
video_quality_test.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
video_quality_test.h Add and refactor functionality into rtc_base/win 2020-10-29 20:39:10 +00:00
video_receive_stream2_unittest.cc Use Timestamp to represent packet receive timestamps 2021-05-04 13:16:54 +00:00
video_receive_stream2.cc Move h264_profile_level_id and vp9_profile to api/video_codecs 2021-04-20 09:42:05 +00:00
video_receive_stream2.h VideoReceiveStream2: AV1 encoded sink support. 2021-04-08 20:07:22 +00:00
video_receive_stream_unittest.cc Use Timestamp to represent packet receive timestamps 2021-05-04 13:16:54 +00:00
video_receive_stream.cc Reland "Removed VideoDecoderFactory::LegacyCreateVideoDecoder and VideoReceiveStream::Config::stream_id." 2021-04-30 11:40:38 +00:00
video_receive_stream.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
video_send_stream_impl_unittest.cc Changes default pacing factor to 1.1x 2020-10-23 13:43:32 +00:00
video_send_stream_impl.cc Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_send_stream_impl.h VideoStreamEncoder report VideoLayersAllocation for simulcast 2020-10-15 17:39:06 +00:00
video_send_stream_tests.cc Reland "Remove Invoke from VideoChannel::FillBitrateInfo." 2021-05-03 15:16:34 +00:00
video_send_stream.cc Reland "Remove Invoke from VideoChannel::FillBitrateInfo." 2021-05-03 15:16:34 +00:00
video_send_stream.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_source_sink_controller_unittest.cc In video/ replace mock macros with unified MOCK_METHOD macro 2020-05-14 18:12:40 +00:00
video_source_sink_controller.cc Communicate encoder resolutions via rtc::VideoSinkWants. 2021-02-25 11:10:55 +00:00
video_source_sink_controller.h Communicate encoder resolutions via rtc::VideoSinkWants. 2021-02-25 11:10:55 +00:00
video_stream_decoder2.cc Fork a few VideoReceiveStream related classes. 2020-04-27 09:25:47 +00:00
video_stream_decoder2.h Remove unused critical section includes. 2020-07-16 13:52:28 +00:00
video_stream_decoder_impl_unittest.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
video_stream_decoder_impl.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
video_stream_decoder_impl.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
video_stream_decoder.cc New class VideoReceiver2, a trimmed-down vcm::VideoReceiver 2019-09-09 11:23:54 +00:00
video_stream_decoder.h Migrate video/ except video/end_to_end_tests and video/adaptation to webrtc::Mutex. 2020-07-08 12:21:08 +00:00
video_stream_encoder_unittest.cc Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files 2021-04-23 12:04:39 +00:00
video_stream_encoder.cc VideoStreamEncoder: Remove unused member variables: 2021-03-29 14:58:05 +00:00
video_stream_encoder.h VideoStreamEncoder: Remove unused member variables: 2021-03-29 14:58:05 +00:00