I am using version 1.0.28513 and am not sure how/where to specify VP8 as my video codec for hardware acceleration.
Asked
Active
Viewed 1,543 times
1 Answers
0
Giving a look to this wonderful example in Kotlin:
private val peerConnectionFactory: PeerConnectionFactory by lazy {
//Initialize PeerConnectionFactory globals.
val initializationOptions = PeerConnectionFactory.InitializationOptions.builder(this)
.setEnableVideoHwAcceleration(true)
.createInitializationOptions()
PeerConnectionFactory.initialize(initializationOptions)
//Create a new PeerConnectionFactory instance - using Hardware encoder and decoder.
val options = PeerConnectionFactory.Options()
val defaultVideoEncoderFactory = DefaultVideoEncoderFactory(
rootEglBase.eglBaseContext, /* enableIntelVp8Encoder */true, /* enableH264HighProfile */true)
val defaultVideoDecoderFactory = DefaultVideoDecoderFactory(rootEglBase.eglBaseContext)
PeerConnectionFactory(options, defaultVideoEncoderFactory, defaultVideoDecoderFactory)
}
and to the corresponding Java class:
/** Create encoder factory using default hardware encoder factory. */
public DefaultVideoEncoderFactory(
EglBase.Context eglContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile) {
this.hardwareVideoEncoderFactory =
new HardwareVideoEncoderFactory(eglContext, enableIntelVp8Encoder, enableH264HighProfile);
}
/** Create encoder factory using explicit hardware encoder factory. */
DefaultVideoEncoderFactory(VideoEncoderFactory hardwareVideoEncoderFactory) {
this.hardwareVideoEncoderFactory = hardwareVideoEncoderFactory;
}
should help you figure out where to act
-
hi, this page is not available anymore, can u help? – famfamfam Dec 25 '20 at 04:44
-
@famfamfam are you sure? I tried and both the links are perfectly working – Antonino Dec 30 '20 at 04:10
-
hi buddy, i can not load page https://vivekc.xyz/getting-started-with-webrtc-part-4-de72b58ab31e, can u loaded this page? – famfamfam Dec 30 '20 at 08:45
-
@famfamfam as said before I can load it. Have you tried on another device? – Antonino Jan 05 '21 at 00:34