Remove deprecated RTCVideoRenderer constructor.
Removes -[RTCVideoRenderer initWithView]. Also, fix potential issue where we hold on to a video frame longer than the lifetime of its associated track. BUG=3341 R=glaznev@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16099004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7032 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -205,16 +205,18 @@ static const GLsizei kNumTextures = 3 * kNumTextureSets;
|
||||
return NO;
|
||||
}
|
||||
[self ensureGLContext];
|
||||
if (![self updateTextureSizesForFrame:frame] ||
|
||||
![self updateTextureDataForFrame:frame]) {
|
||||
return NO;
|
||||
}
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (frame) {
|
||||
if (![self updateTextureSizesForFrame:frame] ||
|
||||
![self updateTextureDataForFrame:frame]) {
|
||||
return NO;
|
||||
}
|
||||
#if !TARGET_OS_IPHONE
|
||||
glBindVertexArray(_vertexArray);
|
||||
glBindVertexArray(_vertexArray);
|
||||
#endif
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
}
|
||||
#if !TARGET_OS_IPHONE
|
||||
[_context flushBuffer];
|
||||
#endif
|
||||
@@ -238,7 +240,6 @@ static const GLsizei kNumTextures = 3 * kNumTextureSets;
|
||||
}
|
||||
glUseProgram(_program);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glClearColor(0, 0, 0, 1);
|
||||
_isInitialized = YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user