Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm

Issue 2695203004: Clean up RTCVideoFrame (Closed)
Patch Set: Fix memory leak. Add ObjC rotation enum. Add space in pointer types. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm b/webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm
index 5000dbc2fa8b93c731db0acef26bd34e8c93e9af..2d402eef14fc8fc91df6cc893e8808d97cb630ae 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm
@@ -19,7 +19,6 @@
#import "RTCShader+Private.h"
#import "WebRTC/RTCVideoFrame.h"
-#include "webrtc/api/video/video_rotation.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/optional.h"
@@ -50,7 +49,7 @@ static const char kNV12FragmentShaderSource[] =
CVOpenGLESTextureCacheRef _textureCache;
// Store current rotation and only upload new vertex data when rotation
// changes.
- rtc::Optional<webrtc::VideoRotation> _currentRotation;
+ rtc::Optional<RTCVideoRotation> _currentRotation;
}
- (instancetype)initWithContext:(GlContextType *)context {
@@ -155,8 +154,7 @@ static const char kNV12FragmentShaderSource[] =
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);
if (!_currentRotation || frame.rotation != *_currentRotation) {
- _currentRotation = rtc::Optional<webrtc::VideoRotation>(
- static_cast<webrtc::VideoRotation>(frame.rotation));
+ _currentRotation = rtc::Optional<RTCVideoRotation>(frame.rotation);
RTCSetVertexData(*_currentRotation);
}
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm ('k') | webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698