OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 | 746 |
747 cricket::VideoCodec DefaultCodec() override { return kVp8Codec; } | 747 cricket::VideoCodec DefaultCodec() override { return kVp8Codec; } |
748 }; | 748 }; |
749 | 749 |
750 #define WEBRTC_BASE_TEST(test) \ | 750 #define WEBRTC_BASE_TEST(test) \ |
751 TEST_F(WebRtcVideoChannel2BaseTest, test) { Base::test(); } | 751 TEST_F(WebRtcVideoChannel2BaseTest, test) { Base::test(); } |
752 | 752 |
753 #define WEBRTC_DISABLED_BASE_TEST(test) \ | 753 #define WEBRTC_DISABLED_BASE_TEST(test) \ |
754 TEST_F(WebRtcVideoChannel2BaseTest, DISABLED_##test) { Base::test(); } | 754 TEST_F(WebRtcVideoChannel2BaseTest, DISABLED_##test) { Base::test(); } |
755 | 755 |
756 // TODO(pbos): Fix WebRtcVideoEngine2BaseTest, where we want CheckCoInitialize. | |
757 #if 0 | |
758 // TODO(juberti): Figure out why ViE is munging the COM refcount. | |
759 #ifdef WIN32 | |
760 WEBRTC_DISABLED_BASE_TEST(CheckCoInitialize) { | |
761 Base::CheckCoInitialize(); | |
762 } | |
763 #endif | |
764 #endif | |
765 | |
766 WEBRTC_BASE_TEST(SetSend); | 756 WEBRTC_BASE_TEST(SetSend); |
767 WEBRTC_BASE_TEST(SetSendWithoutCodecs); | 757 WEBRTC_BASE_TEST(SetSendWithoutCodecs); |
768 WEBRTC_BASE_TEST(SetSendSetsTransportBufferSizes); | 758 WEBRTC_BASE_TEST(SetSendSetsTransportBufferSizes); |
769 | 759 |
770 WEBRTC_BASE_TEST(GetStats); | 760 WEBRTC_BASE_TEST(GetStats); |
771 WEBRTC_BASE_TEST(GetStatsMultipleRecvStreams); | 761 WEBRTC_BASE_TEST(GetStatsMultipleRecvStreams); |
772 WEBRTC_BASE_TEST(GetStatsMultipleSendStreams); | 762 WEBRTC_BASE_TEST(GetStatsMultipleSendStreams); |
773 | 763 |
774 WEBRTC_BASE_TEST(SetSendBandwidth); | 764 WEBRTC_BASE_TEST(SetSendBandwidth); |
775 | 765 |
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 } | 2768 } |
2779 | 2769 |
2780 class WebRtcVideoEngine2SimulcastTest : public testing::Test { | 2770 class WebRtcVideoEngine2SimulcastTest : public testing::Test { |
2781 public: | 2771 public: |
2782 WebRtcVideoEngine2SimulcastTest() : engine_(nullptr) {} | 2772 WebRtcVideoEngine2SimulcastTest() : engine_(nullptr) {} |
2783 | 2773 |
2784 protected: | 2774 protected: |
2785 WebRtcVideoEngine2 engine_; | 2775 WebRtcVideoEngine2 engine_; |
2786 }; | 2776 }; |
2787 | 2777 |
| 2778 // Test that if we add a stream with RTX SSRC's, SSRC's get set correctly. |
| 2779 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestStreamWithRtx) { |
| 2780 // TODO(pbos): Implement. |
| 2781 FAIL() << "Not implemented."; |
| 2782 } |
| 2783 |
| 2784 // Test that if we get too few ssrcs are given in AddSendStream(), |
| 2785 // only supported sub-streams will be added. |
| 2786 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TooFewSimulcastSsrcs) { |
| 2787 // TODO(pbos): Implement. |
| 2788 FAIL() << "Not implemented."; |
| 2789 } |
| 2790 |
| 2791 // Test that even more than enough ssrcs are given in AddSendStream(), |
| 2792 // only supported sub-streams will be added. |
| 2793 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_MoreThanEnoughSimulcastSscrs) { |
| 2794 // TODO(pbos): Implement. |
| 2795 FAIL() << "Not implemented."; |
| 2796 } |
| 2797 |
| 2798 // Test that SetSendStreamFormat works well with simulcast. |
| 2799 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2800 DISABLED_SetSendStreamFormatWithSimulcast) { |
| 2801 // TODO(pbos): Implement. |
| 2802 FAIL() << "Not implemented."; |
| 2803 } |
| 2804 |
| 2805 // Test that simulcast send codec is reset on new video frame size. |
| 2806 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2807 DISABLED_ResetSimulcastSendCodecOnNewFrameSize) { |
| 2808 // TODO(pbos): Implement. |
| 2809 FAIL() << "Not implemented."; |
| 2810 } |
| 2811 |
| 2812 // Test that simulcast send codec is reset on new portait mode video frame. |
| 2813 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2814 DISABLED_ResetSimulcastSendCodecOnNewPortaitFrame) { |
| 2815 // TODO(pbos): Implement. |
| 2816 FAIL() << "Not implemented."; |
| 2817 } |
| 2818 |
| 2819 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2820 DISABLED_SetBandwidthInConferenceWithSimulcast) { |
| 2821 // TODO(pbos): Implement. |
| 2822 FAIL() << "Not implemented."; |
| 2823 } |
| 2824 |
| 2825 // Test that sending screencast frames in conference mode changes |
| 2826 // bitrate. |
| 2827 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2828 DISABLED_SetBandwidthScreencastInConference) { |
| 2829 // TODO(pbos): Implement. |
| 2830 FAIL() << "Not implemented."; |
| 2831 } |
| 2832 |
| 2833 // Test AddSendStream with simulcast rejects bad StreamParams. |
| 2834 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2835 DISABLED_AddSendStreamWithBadStreamParams) { |
| 2836 // TODO(pbos): Implement. |
| 2837 FAIL() << "Not implemented."; |
| 2838 } |
| 2839 |
| 2840 // Test AddSendStream with simulcast sets ssrc and cname correctly. |
| 2841 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_AddSendStreamWithSimulcast) { |
| 2842 // TODO(pbos): Implement. |
| 2843 FAIL() << "Not implemented."; |
| 2844 } |
| 2845 |
| 2846 // Test RemoveSendStream with simulcast. |
| 2847 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2848 DISABLED_RemoveSendStreamWithSimulcast) { |
| 2849 // TODO(pbos): Implement. |
| 2850 FAIL() << "Not implemented."; |
| 2851 } |
| 2852 |
| 2853 // Test AddSendStream after send codec has already been set will reset |
| 2854 // send codec with simulcast settings. |
| 2855 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2856 DISABLED_AddSimulcastStreamAfterSetSendCodec) { |
| 2857 // TODO(pbos): Implement. |
| 2858 FAIL() << "Not implemented."; |
| 2859 } |
| 2860 |
| 2861 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_GetStatsWithMultipleSsrcs) { |
| 2862 // TODO(pbos): Implement. |
| 2863 FAIL() << "Not implemented."; |
| 2864 } |
| 2865 |
| 2866 // Test receiving channel(s) local ssrc is set to the same as the first |
| 2867 // simulcast sending ssrc. |
| 2868 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2869 DISABLED_AddSimulcastStreamAfterCreatingRecvChannels) { |
| 2870 // TODO(pbos): Implement. |
| 2871 FAIL() << "Not implemented."; |
| 2872 } |
| 2873 |
| 2874 // Test 1:1 call never turn on simulcast. |
| 2875 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_NoSimulcastWith1on1) { |
| 2876 // TODO(pbos): Implement. |
| 2877 FAIL() << "Not implemented."; |
| 2878 } |
| 2879 |
| 2880 // Test SetOptions with OPT_CONFERENCE flag. |
| 2881 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_SetOptionsWithConferenceMode) { |
| 2882 // TODO(pbos): Implement. |
| 2883 FAIL() << "Not implemented."; |
| 2884 } |
| 2885 |
| 2886 // Test that two different streams can have different formats. |
| 2887 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2888 DISABLED_MultipleSendStreamsDifferentFormats) { |
| 2889 // TODO(pbos): Implement. |
| 2890 FAIL() << "Not implemented."; |
| 2891 } |
| 2892 |
| 2893 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestAdaptToOutputFormat) { |
| 2894 // TODO(pbos): Implement. |
| 2895 FAIL() << "Not implemented."; |
| 2896 } |
| 2897 |
| 2898 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2899 DISABLED_TestAdaptWithCpuOveruseObserver) { |
| 2900 // TODO(pbos): Implement. |
| 2901 FAIL() << "Not implemented."; |
| 2902 } |
| 2903 |
| 2904 // Test that codec is not reset for every frame sent in non-conference and |
| 2905 // non-screencast mode. |
| 2906 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_DontResetCodecOnSendFrame) { |
| 2907 // TODO(pbos): Implement. |
| 2908 FAIL() << "Not implemented."; |
| 2909 } |
| 2910 |
| 2911 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2912 DISABLED_UseSimulcastAdapterOnVp8OnlyFactory) { |
| 2913 // TODO(pbos): Implement. |
| 2914 FAIL() << "Not implemented."; |
| 2915 } |
| 2916 |
| 2917 TEST_F(WebRtcVideoEngine2SimulcastTest, |
| 2918 DISABLED_DontUseSimulcastAdapterOnNonVp8Factory) { |
| 2919 // TODO(pbos): Implement. |
| 2920 FAIL() << "Not implemented."; |
| 2921 } |
| 2922 |
2788 class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest, | 2923 class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest, |
2789 public WebRtcCallFactory { | 2924 public WebRtcCallFactory { |
2790 public: | 2925 public: |
2791 WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {} | 2926 WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {} |
2792 | 2927 |
2793 void SetUp() override { | 2928 void SetUp() override { |
2794 engine_.SetCallFactory(this); | 2929 engine_.SetCallFactory(this); |
2795 engine_.Init(); | 2930 engine_.Init(); |
2796 channel_.reset(engine_.CreateChannel(VideoOptions(), NULL)); | 2931 channel_.reset(engine_.CreateChannel(VideoOptions(), NULL)); |
2797 ASSERT_TRUE(fake_call_ != NULL) << "Call not created through factory."; | 2932 ASSERT_TRUE(fake_call_ != NULL) << "Call not created through factory."; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2961 } | 3096 } |
2962 | 3097 |
2963 // Test that we normalize send codec format size in simulcast. | 3098 // Test that we normalize send codec format size in simulcast. |
2964 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3099 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
2965 cricket::VideoCodec codec(kVp8Codec270p); | 3100 cricket::VideoCodec codec(kVp8Codec270p); |
2966 codec.width += 1; | 3101 codec.width += 1; |
2967 codec.height += 1; | 3102 codec.height += 1; |
2968 VerifySimulcastSettings(codec, VideoOptions::NORMAL, 2, 2, SBM_NORMAL); | 3103 VerifySimulcastSettings(codec, VideoOptions::NORMAL, 2, 2, SBM_NORMAL); |
2969 } | 3104 } |
2970 | 3105 |
2971 // Test that if we add a stream with RTX SSRC's, SSRC's get set correctly. | |
2972 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestStreamWithRtx) { | |
2973 // TODO(pbos): Implement. | |
2974 FAIL() << "Not implemented."; | |
2975 } | |
2976 | |
2977 // Test that if we get too few ssrcs are given in AddSendStream(), | |
2978 // only supported sub-streams will be added. | |
2979 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TooFewSimulcastSsrcs) { | |
2980 // TODO(pbos): Implement. | |
2981 FAIL() << "Not implemented."; | |
2982 } | |
2983 | |
2984 // Test that even more than enough ssrcs are given in AddSendStream(), | |
2985 // only supported sub-streams will be added. | |
2986 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_MoreThanEnoughSimulcastSscrs) { | |
2987 // TODO(pbos): Implement. | |
2988 FAIL() << "Not implemented."; | |
2989 } | |
2990 | |
2991 // Test that SetSendStreamFormat works well with simulcast. | |
2992 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
2993 DISABLED_SetSendStreamFormatWithSimulcast) { | |
2994 // TODO(pbos): Implement. | |
2995 FAIL() << "Not implemented."; | |
2996 } | |
2997 | |
2998 // Test that simulcast send codec is reset on new video frame size. | |
2999 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3000 DISABLED_ResetSimulcastSendCodecOnNewFrameSize) { | |
3001 // TODO(pbos): Implement. | |
3002 FAIL() << "Not implemented."; | |
3003 } | |
3004 | |
3005 // Test that simulcast send codec is reset on new portait mode video frame. | |
3006 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3007 DISABLED_ResetSimulcastSendCodecOnNewPortaitFrame) { | |
3008 // TODO(pbos): Implement. | |
3009 FAIL() << "Not implemented."; | |
3010 } | |
3011 | |
3012 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3013 DISABLED_SetBandwidthInConferenceWithSimulcast) { | |
3014 // TODO(pbos): Implement. | |
3015 FAIL() << "Not implemented."; | |
3016 } | |
3017 | |
3018 // Test that sending screencast frames in conference mode changes | |
3019 // bitrate. | |
3020 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3021 DISABLED_SetBandwidthScreencastInConference) { | |
3022 // TODO(pbos): Implement. | |
3023 FAIL() << "Not implemented."; | |
3024 } | |
3025 | |
3026 // Test AddSendStream with simulcast rejects bad StreamParams. | |
3027 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3028 DISABLED_AddSendStreamWithBadStreamParams) { | |
3029 // TODO(pbos): Implement. | |
3030 FAIL() << "Not implemented."; | |
3031 } | |
3032 | |
3033 // Test AddSendStream with simulcast sets ssrc and cname correctly. | |
3034 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_AddSendStreamWithSimulcast) { | |
3035 // TODO(pbos): Implement. | |
3036 FAIL() << "Not implemented."; | |
3037 } | |
3038 | |
3039 // Test RemoveSendStream with simulcast. | |
3040 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3041 DISABLED_RemoveSendStreamWithSimulcast) { | |
3042 // TODO(pbos): Implement. | |
3043 FAIL() << "Not implemented."; | |
3044 } | |
3045 | |
3046 // Test AddSendStream after send codec has already been set will reset | |
3047 // send codec with simulcast settings. | |
3048 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3049 DISABLED_AddSimulcastStreamAfterSetSendCodec) { | |
3050 // TODO(pbos): Implement. | |
3051 FAIL() << "Not implemented."; | |
3052 } | |
3053 | |
3054 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_GetStatsWithMultipleSsrcs) { | |
3055 // TODO(pbos): Implement. | |
3056 FAIL() << "Not implemented."; | |
3057 } | |
3058 | |
3059 // Test receiving channel(s) local ssrc is set to the same as the first | |
3060 // simulcast sending ssrc. | |
3061 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3062 DISABLED_AddSimulcastStreamAfterCreatingRecvChannels) { | |
3063 // TODO(pbos): Implement. | |
3064 FAIL() << "Not implemented."; | |
3065 } | |
3066 | |
3067 // Test 1:1 call never turn on simulcast. | |
3068 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_NoSimulcastWith1on1) { | |
3069 // TODO(pbos): Implement. | |
3070 FAIL() << "Not implemented."; | |
3071 } | |
3072 | |
3073 // Test SetOptions with OPT_CONFERENCE flag. | |
3074 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_SetOptionsWithConferenceMode) { | |
3075 // TODO(pbos): Implement. | |
3076 FAIL() << "Not implemented."; | |
3077 } | |
3078 | |
3079 // Test that two different streams can have different formats. | |
3080 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3081 DISABLED_MultipleSendStreamsDifferentFormats) { | |
3082 // TODO(pbos): Implement. | |
3083 FAIL() << "Not implemented."; | |
3084 } | |
3085 | |
3086 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestAdaptToOutputFormat) { | |
3087 // TODO(pbos): Implement. | |
3088 FAIL() << "Not implemented."; | |
3089 } | |
3090 | |
3091 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3092 DISABLED_TestAdaptWithCpuOveruseObserver) { | |
3093 // TODO(pbos): Implement. | |
3094 FAIL() << "Not implemented."; | |
3095 } | |
3096 | |
3097 // Test that codec is not reset for every frame sent in non-conference and | |
3098 // non-screencast mode. | |
3099 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_DontResetCodecOnSendFrame) { | |
3100 // TODO(pbos): Implement. | |
3101 FAIL() << "Not implemented."; | |
3102 } | |
3103 | |
3104 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3105 DISABLED_UseSimulcastAdapterOnVp8OnlyFactory) { | |
3106 // TODO(pbos): Implement. | |
3107 FAIL() << "Not implemented."; | |
3108 } | |
3109 | |
3110 TEST_F(WebRtcVideoEngine2SimulcastTest, | |
3111 DISABLED_DontUseSimulcastAdapterOnNonVp8Factory) { | |
3112 // TODO(pbos): Implement. | |
3113 FAIL() << "Not implemented."; | |
3114 } | |
3115 | |
3116 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x800) { | 3106 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x800) { |
3117 // TODO(pbos): Implement. | 3107 // TODO(pbos): Implement. |
3118 FAIL() << "Not implemented."; | 3108 FAIL() << "Not implemented."; |
3119 } | 3109 } |
3120 | 3110 |
3121 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x720) { | 3111 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x720) { |
3122 // TODO(pbos): Implement. | 3112 // TODO(pbos): Implement. |
3123 FAIL() << "Not implemented."; | 3113 FAIL() << "Not implemented."; |
3124 } | 3114 } |
3125 | 3115 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3188 // Ensures that the correct settings are applied to the codec when two temporal | 3178 // Ensures that the correct settings are applied to the codec when two temporal |
3189 // layer screencasting is enabled, and that the correct simulcast settings are | 3179 // layer screencasting is enabled, and that the correct simulcast settings are |
3190 // reapplied when disabling screencasting. | 3180 // reapplied when disabling screencasting. |
3191 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3181 TEST_F(WebRtcVideoChannel2SimulcastTest, |
3192 DISABLED_TwoTemporalLayerScreencastSettings) { | 3182 DISABLED_TwoTemporalLayerScreencastSettings) { |
3193 // TODO(pbos): Implement. | 3183 // TODO(pbos): Implement. |
3194 FAIL() << "Not implemented."; | 3184 FAIL() << "Not implemented."; |
3195 } | 3185 } |
3196 | 3186 |
3197 } // namespace cricket | 3187 } // namespace cricket |
OLD | NEW |