Revert r4562

R=mallinath@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2117004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4623 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
elham@webrtc.org 2013-08-26 23:21:03 +00:00
parent 01cb3ad883
commit 814e28413d
7 changed files with 591 additions and 702 deletions

View File

@ -66,18 +66,6 @@ class WEBRTC_DLLEXPORT ViEDecoderObserver {
class WEBRTC_DLLEXPORT ViECodec {
public:
enum ViEDecodeErrorMode {
kNoErrors, // Never decode with errors. Video will freeze
// if nack is disabled.
kSelectiveErrors, // Frames that are determined decodable in
// VCMSessionInfo may be decoded with missing
// packets. As not all incomplete frames will be
// decodable, video will freeze if nack is disabled.
kWithErrors // Release frames as needed. Errors may be
// introduced as some encoded frames may not be
// complete.
};
// Factory for the ViECodec subAPI and increases an internal reference
// counter if successful. Returns NULL if the API is not supported or if
// construction fails.
@ -183,10 +171,6 @@ class WEBRTC_DLLEXPORT ViECodec {
virtual int WaitForFirstKeyFrame(const int video_channel,
const bool wait) = 0;
// Set the decode error mode.
virtual int SetDecodeErrorMode(const int video_channel,
const ViEDecodeErrorMode error_mode) = 0;
// Enables recording of debugging information.
virtual int StartDebugRecording(int video_channel,
const char* file_name_utf8) = 0;

View File

@ -19,17 +19,7 @@
#include "webrtc/video_engine/test/auto_test/interface/vie_window_creator.h"
DEFINE_bool(automated, false, "Run Video engine tests in noninteractive mode.");
DEFINE_int32(test_type, -1, "Test type:\n"
"\t1. All standard tests (delivery test)\n"
"\t2. All API tests\n"
"\t3. All extended tests\n"
"\t4. Specific standard test\n"
"\t5. Specific API test\n"
"\t6. Specific extended test\n"
"\t7. Simple loopback call\n"
"\t8. Custom configure a call\n"
"\t9. Simulcast in loopback\n"
"\t10. Record");
DEFINE_bool(auto_custom_call, false, "Run custom call directly.");
static const std::string kStandardTest = "ViEStandardIntegrationTest";
static const std::string kExtendedTest = "ViEExtendedIntegrationTest";
@ -60,7 +50,7 @@ int ViEAutoTestMain::RunTests(int argc, char** argv) {
if (FLAGS_automated) {
// Run in automated mode.
result = RUN_ALL_TESTS();
} else if (FLAGS_test_type == 8) {
} else if (FLAGS_auto_custom_call) {
// Run automated custom call.
result = RunSpecialTestCase(8);
} else {
@ -121,10 +111,11 @@ int ViEAutoTestMain::RunTestMatching(const std::string test_case,
return RUN_ALL_TESTS();
}
int ViEAutoTestMain::RunSpecificTestCaseIn(const std::string test_case_name) {
int ViEAutoTestMain::RunSpecificTestCaseIn(const std::string test_case_name)
{
// If user says 0, it means don't run anything.
int specific_choice = AskUserForTestCase();
if (specific_choice != 0) {
if (specific_choice != 0){
return RunTestMatching(test_case_name,
index_to_test_method_map_[specific_choice]);
}
@ -163,40 +154,36 @@ int ViEAutoTestMain::RunInteractiveMode() {
int choice = 0;
int errors = 0;
if (FLAGS_test_type > 0 && FLAGS_test_type < 11) {
choice = FLAGS_test_type;
} else {
do {
ViETest::Log("Test types: ");
ViETest::Log("\t 0. Quit");
ViETest::Log("\t 1. All standard tests (delivery test)");
ViETest::Log("\t 2. All API tests");
ViETest::Log("\t 3. All extended test");
ViETest::Log("\t 4. Specific standard test");
ViETest::Log("\t 5. Specific API test");
ViETest::Log("\t 6. Specific extended test");
ViETest::Log("\t 7. Simple loopback call");
ViETest::Log("\t 8. Custom configure a call");
ViETest::Log("\t 9. Simulcast in loopback");
ViETest::Log("\t 10. Record");
ViETest::Log("Select type of test:");
do {
ViETest::Log("Test types: ");
ViETest::Log("\t 0. Quit");
ViETest::Log("\t 1. All standard tests (delivery test)");
ViETest::Log("\t 2. All API tests");
ViETest::Log("\t 3. All extended test");
ViETest::Log("\t 4. Specific standard test");
ViETest::Log("\t 5. Specific API test");
ViETest::Log("\t 6. Specific extended test");
ViETest::Log("\t 7. Simple loopback call");
ViETest::Log("\t 8. Custom configure a call");
ViETest::Log("\t 9. Simulcast in loopback");
ViETest::Log("\t 10. Record");
ViETest::Log("Select type of test:");
choice = AskUserForNumber(0, 10);
if (choice == kInvalidChoice) {
continue;
}
} while (choice != 0);
}
switch (choice) {
case 1: errors = RunTestMatching(kStandardTest, "*"); break;
case 2: errors = RunTestMatching(kApiTest, "*"); break;
case 3: errors = RunTestMatching(kExtendedTest, "*"); break;
case 4: errors = RunSpecificTestCaseIn(kStandardTest); break;
case 5: errors = RunSpecificTestCaseIn(kApiTest); break;
case 6: errors = RunSpecificTestCaseIn(kExtendedTest); break;
default: errors = RunSpecialTestCase(choice); break;
}
choice = AskUserForNumber(0, 10);
if (choice == kInvalidChoice) {
continue;
}
switch (choice) {
case 0: break;
case 1: errors = RunTestMatching(kStandardTest, "*"); break;
case 2: errors = RunTestMatching(kApiTest, "*"); break;
case 3: errors = RunTestMatching(kExtendedTest, "*"); break;
case 4: errors = RunSpecificTestCaseIn(kStandardTest); break;
case 5: errors = RunSpecificTestCaseIn(kApiTest); break;
case 6: errors = RunSpecificTestCaseIn(kExtendedTest); break;
default: errors = RunSpecialTestCase(choice); break;
}
} while (choice != 0);
if (errors) {
ViETest::Log("Test done with errors, see ViEAutotestLog.txt for test "

View File

@ -768,20 +768,6 @@ int32_t ViEChannel::SetHybridNACKFECStatus(
return ProcessFECRequest(enable, payload_typeRED, payload_typeFEC);
}
void ViEChannel::SetDecodeErrorMode(ViECodec::ViEDecodeErrorMode error_mode) {
switch (error_mode) {
case ViECodec::kNoErrors:
vcm_.SetDecodeErrorMode(kNoErrors);
break;
case ViECodec::kSelectiveErrors:
vcm_.SetDecodeErrorMode(kSelectiveErrors);
break;
case ViECodec::kWithErrors:
vcm_.SetDecodeErrorMode(kWithErrors);
break;
}
}
int ViEChannel::SetSenderBufferingMode(int target_delay_ms) {
if ((target_delay_ms < 0) || (target_delay_ms > kMaxTargetDelayMs)) {
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, channel_id_),

View File

@ -15,12 +15,10 @@
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_engine/include/vie_codec.h"
#include "webrtc/video_engine/include/vie_network.h"
#include "webrtc/video_engine/include/vie_rtp_rtcp.h"
#include "webrtc/video_engine/vie_defines.h"
@ -117,7 +115,6 @@ class ViEChannel
int32_t SetHybridNACKFECStatus(const bool enable,
const unsigned char payload_typeRED,
const unsigned char payload_typeFEC);
void SetDecodeErrorMode(ViECodec::ViEDecodeErrorMode error_mode);
int SetSenderBufferingMode(int target_delay_ms);
int SetReceiverBufferingMode(int target_delay_ms);
int32_t SetKeyFrameRequestMethod(const KeyFrameRequestMethod method);

View File

@ -690,25 +690,6 @@ int ViECodecImpl::WaitForFirstKeyFrame(const int video_channel,
return 0;
}
int ViECodecImpl::SetDecodeErrorMode(const int video_channel,
const ViEDecodeErrorMode error_mode) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s(channel: %d)", __FUNCTION__, video_channel);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
ViEChannel* vie_channel = cs.Channel(video_channel);
if (!vie_channel) {
WEBRTC_TRACE(kTraceError, kTraceVideo,
ViEId(shared_data_->instance_id(), video_channel),
"%s: Channel %d does not exist", __FUNCTION__, video_channel);
shared_data_->SetLastError(kViEBaseInvalidChannelId);
return -1;
}
vie_channel->SetDecodeErrorMode(error_mode);
return 0;
}
int ViECodecImpl::StartDebugRecording(int video_channel,
const char* file_name_utf8) {
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));

View File

@ -69,8 +69,6 @@ class ViECodecImpl
virtual int WaitForFirstKeyFrame(const int video_channel, const bool wait);
virtual int StartDebugRecording(int video_channel,
const char* file_name_utf8);
virtual int SetDecodeErrorMode(const int video_channel,
const ViEDecodeErrorMode error_mode);
virtual int StopDebugRecording(int video_channel);
protected: