Skip to content

Commit

Permalink
Revert "Use injectable hardware video decoder/encoder in AppRTCMobile."
Browse files Browse the repository at this point in the history
This reverts commit 0cbaf1a.

Reason for revert: Makes a test flaky:
https://build.chromium.org/p/client.webrtc/builders/Android32%20%28M%20Nexus5X%29/builds/4603

Original change's description:
> Use injectable hardware video decoder/encoder in AppRTCMobile.
> 
> Also include a small fix for getting the encoder queue.
> 
> Bug: webrtc:7760
> Change-Id: I96dc8ffb363b90382276d88148f81d5f89dca5f2
> Reviewed-on: https://webrtc-review.googlesource.com/2683
> Commit-Queue: Sami Kalliomäki <[email protected]>
> Reviewed-by: Magnus Jedvert <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#20022}

[email protected],[email protected]

Change-Id: I6cb9a10eadb0eff2b85d5028d684746dc69bccfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://webrtc-review.googlesource.com/4480
Reviewed-by: Sami Kalliomäki <[email protected]>
Commit-Queue: Sami Kalliomäki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#20024}
  • Loading branch information
Sami Kalliomäki authored and Commit Bot committed Sep 28, 2017
1 parent 612f858 commit 27bafec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import org.webrtc.CameraVideoCapturer;
import org.webrtc.DataChannel;
import org.webrtc.EglBase;
import org.webrtc.HardwareVideoDecoderFactory;
import org.webrtc.HardwareVideoEncoderFactory;
import org.webrtc.IceCandidate;
import org.webrtc.Logging;
import org.webrtc.MediaConstraints;
Expand Down Expand Up @@ -341,7 +339,6 @@ public void createPeerConnection(final VideoSink localRender,
createPeerConnection(
localRender, Collections.singletonList(remoteRender), videoCapturer, signalingParameters);
}

public void createPeerConnection(final VideoSink localRender,
final List<VideoRenderer.Callbacks> remoteRenders, final VideoCapturer videoCapturer,
final SignalingParameters signalingParameters) {
Expand Down Expand Up @@ -512,12 +509,7 @@ public void onWebRtcAudioTrackError(String errorMessage) {
if (options != null) {
Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMask);
}
final boolean enableH264HighProfile =
peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_H264_HIGH);
factory = new PeerConnectionFactory(options,
new HardwareVideoEncoderFactory(rootEglBase.getEglBaseContext(),
true /* enableIntelVp8Encoder */, enableH264HighProfile),
new HardwareVideoDecoderFactory(rootEglBase.getEglBaseContext()));
factory = new PeerConnectionFactory(options);
Log.d(TAG, "Peer connection factory created.");
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/android/src/jni/videoencoderwrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ VideoEncoderWrapper::VideoEncoderWrapper(JNIEnv* jni, jobject j_encoder)

implementation_name_ = GetImplementationName(jni);

encoder_queue_ = rtc::TaskQueue::Current();

initialized_ = false;
num_resets_ = 0;

Expand All @@ -114,7 +116,6 @@ int32_t VideoEncoderWrapper::InitEncode(const VideoCodec* codec_settings,
number_of_cores_ = number_of_cores;
codec_settings_ = *codec_settings;
num_resets_ = 0;
encoder_queue_ = rtc::TaskQueue::Current();

return InitEncodeInternal(jni);
}
Expand Down Expand Up @@ -166,7 +167,6 @@ int32_t VideoEncoderWrapper::Release() {
jobject ret = jni->CallObjectMethod(*encoder_, release_method_);
frame_extra_infos_.clear();
initialized_ = false;
encoder_queue_ = nullptr;
return HandleReturnCode(jni, ret);
}

Expand Down

0 comments on commit 27bafec

Please sign in to comment.