(Auto)update libjingle 77689511-> 77696841
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7449 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -477,6 +477,7 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
|
||||
sent_intra_frame_(false),
|
||||
requested_intra_frame_(false),
|
||||
max_bps_(-1) {}
|
||||
|
||||
~FakeVideoMediaChannel();
|
||||
|
||||
const std::vector<VideoCodec>& recv_codecs() const { return recv_codecs_; }
|
||||
@@ -885,12 +886,14 @@ class FakeVideoEngine : public FakeBaseEngine {
|
||||
return default_encoder_config_;
|
||||
}
|
||||
|
||||
VideoMediaChannel* CreateChannel(VoiceMediaChannel* channel) {
|
||||
VideoMediaChannel* CreateChannel(const VideoOptions& options,
|
||||
VoiceMediaChannel* channel) {
|
||||
if (fail_create_channel_) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FakeVideoMediaChannel* ch = new FakeVideoMediaChannel(this);
|
||||
ch->SetOptions(options);
|
||||
channels_.push_back(ch);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ VoiceMediaChannel* FileMediaEngine::CreateChannel() {
|
||||
}
|
||||
|
||||
VideoMediaChannel* FileMediaEngine::CreateVideoChannel(
|
||||
const VideoOptions& options,
|
||||
VoiceMediaChannel* voice_ch) {
|
||||
rtc::FileStream* input_file_stream = NULL;
|
||||
rtc::FileStream* output_file_stream = NULL;
|
||||
@@ -114,8 +115,10 @@ VideoMediaChannel* FileMediaEngine::CreateVideoChannel(
|
||||
}
|
||||
}
|
||||
|
||||
return new FileVideoChannel(input_file_stream, output_file_stream,
|
||||
rtp_sender_thread_);
|
||||
FileVideoChannel* channel = new FileVideoChannel(
|
||||
input_file_stream, output_file_stream, rtp_sender_thread_);
|
||||
channel->SetOptions(options);
|
||||
return channel;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -84,7 +84,8 @@ class FileMediaEngine : public MediaEngineInterface {
|
||||
virtual void Terminate() {}
|
||||
virtual int GetCapabilities();
|
||||
virtual VoiceMediaChannel* CreateChannel();
|
||||
virtual VideoMediaChannel* CreateVideoChannel(VoiceMediaChannel* voice_ch);
|
||||
virtual VideoMediaChannel* CreateVideoChannel(const VideoOptions& options,
|
||||
VoiceMediaChannel* voice_ch);
|
||||
virtual SoundclipMedia* CreateSoundclip() { return NULL; }
|
||||
virtual AudioOptions GetAudioOptions() const { return AudioOptions(); }
|
||||
virtual bool SetAudioOptions(const AudioOptions& options) { return true; }
|
||||
|
||||
@@ -139,7 +139,7 @@ class FileMediaEngineTest : public testing::Test {
|
||||
engine_->set_rtp_sender_thread(rtc::Thread::Current());
|
||||
|
||||
voice_channel_.reset(engine_->CreateChannel());
|
||||
video_channel_.reset(engine_->CreateVideoChannel(NULL));
|
||||
video_channel_.reset(engine_->CreateVideoChannel(VideoOptions(), NULL));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ TEST_F(FileMediaEngineTest, TestBadFilePath) {
|
||||
engine_->set_voice_input_filename(kFakeFileName);
|
||||
engine_->set_video_input_filename(kFakeFileName);
|
||||
EXPECT_TRUE(engine_->CreateChannel() == NULL);
|
||||
EXPECT_TRUE(engine_->CreateVideoChannel(NULL) == NULL);
|
||||
EXPECT_TRUE(engine_->CreateVideoChannel(VideoOptions(), NULL) == NULL);
|
||||
}
|
||||
|
||||
TEST_F(FileMediaEngineTest, TestCodecs) {
|
||||
|
||||
@@ -80,7 +80,8 @@ class MediaEngineInterface {
|
||||
virtual VoiceMediaChannel *CreateChannel() = 0;
|
||||
// Creates a video media channel, paired with the specified voice channel.
|
||||
// Returns NULL on failure.
|
||||
virtual VideoMediaChannel *CreateVideoChannel(
|
||||
virtual VideoMediaChannel* CreateVideoChannel(
|
||||
const VideoOptions& options,
|
||||
VoiceMediaChannel* voice_media_channel) = 0;
|
||||
|
||||
// Creates a soundclip object for playing sounds on. Returns NULL on failure.
|
||||
@@ -198,8 +199,9 @@ class CompositeMediaEngine : public MediaEngineInterface {
|
||||
virtual VoiceMediaChannel *CreateChannel() {
|
||||
return voice_.CreateChannel();
|
||||
}
|
||||
virtual VideoMediaChannel *CreateVideoChannel(VoiceMediaChannel* channel) {
|
||||
return video_.CreateChannel(channel);
|
||||
virtual VideoMediaChannel* CreateVideoChannel(const VideoOptions& options,
|
||||
VoiceMediaChannel* channel) {
|
||||
return video_.CreateChannel(options, channel);
|
||||
}
|
||||
virtual SoundclipMedia *CreateSoundclip() {
|
||||
return voice_.CreateSoundclip();
|
||||
|
||||
@@ -495,7 +495,7 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
virtual void SetUp() {
|
||||
cricket::Device device("test", "device");
|
||||
EXPECT_TRUE(engine_.Init(rtc::Thread::Current()));
|
||||
channel_.reset(engine_.CreateChannel(NULL));
|
||||
channel_.reset(engine_.CreateChannel(cricket::VideoOptions(), NULL));
|
||||
EXPECT_TRUE(channel_.get() != NULL);
|
||||
ConnectVideoChannelError();
|
||||
network_interface_.SetDestination(channel_.get());
|
||||
|
||||
Reference in New Issue
Block a user