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

Side by Side Diff: talk/app/webrtc/objc/RTCI420Frame.mm

Issue 1901973002: Delete cricket::VideoFrame methods GetYPlane and GetYPitch. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix typo in objc code. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 - (NSUInteger)chromaWidth { 49 - (NSUInteger)chromaWidth {
50 return (self.width + 1) / 2; 50 return (self.width + 1) / 2;
51 } 51 }
52 52
53 - (NSUInteger)chromaHeight { 53 - (NSUInteger)chromaHeight {
54 return (self.height + 1) / 2; 54 return (self.height + 1) / 2;
55 } 55 }
56 56
57 - (const uint8_t*)yPlane { 57 - (const uint8_t*)yPlane {
58 const cricket::VideoFrame* const_frame = _videoFrame.get(); 58 const cricket::VideoFrame* const_frame = _videoFrame.get();
59 return const_frame->GetYPlane(); 59 return const_frame->video_frame_buffer()->DataY();
magjed_webrtc 2016/04/19 11:50:52 This changes the behavior of this function, it use
nisse-webrtc 2016/04/20 07:21:53 Don't really know, but webrtc/api/objc version, RT
60 } 60 }
61 61
62 - (const uint8_t*)uPlane { 62 - (const uint8_t*)uPlane {
63 const cricket::VideoFrame* const_frame = _videoFrame.get(); 63 const cricket::VideoFrame* const_frame = _videoFrame.get();
64 return const_frame->GetUPlane(); 64 return const_frame->video_frame_buffer()->DataU();
65 } 65 }
66 66
67 - (const uint8_t*)vPlane { 67 - (const uint8_t*)vPlane {
68 const cricket::VideoFrame* const_frame = _videoFrame.get(); 68 const cricket::VideoFrame* const_frame = _videoFrame.get();
69 return const_frame->GetVPlane(); 69 return const_frame->video_frame_buffer()->DataV();
70 } 70 }
71 71
72 - (NSInteger)yPitch { 72 - (NSInteger)yPitch {
73 return _videoFrame->GetYPitch(); 73 return _videoFrame->video_frame_buffer()->StrideY();
74 } 74 }
75 75
76 - (NSInteger)uPitch { 76 - (NSInteger)uPitch {
77 return _videoFrame->GetUPitch(); 77 return _videoFrame->video_frame_buffer()->StrideU();
78 } 78 }
79 79
80 - (NSInteger)vPitch { 80 - (NSInteger)vPitch {
81 return _videoFrame->GetVPitch(); 81 return _videoFrame->video_frame_buffer()->StrideV();
82 } 82 }
83 83
84 @end 84 @end
85 85
86 @implementation RTCI420Frame (Internal) 86 @implementation RTCI420Frame (Internal)
87 87
88 - (instancetype)initWithVideoFrame:(cricket::VideoFrame*)videoFrame { 88 - (instancetype)initWithVideoFrame:(cricket::VideoFrame*)videoFrame {
89 if (self = [super init]) { 89 if (self = [super init]) {
90 // Keep a shallow copy of the video frame. The underlying frame buffer is 90 // Keep a shallow copy of the video frame. The underlying frame buffer is
91 // not copied. 91 // not copied.
92 _videoFrame.reset(videoFrame->Copy()); 92 _videoFrame.reset(videoFrame->Copy());
93 } 93 }
94 return self; 94 return self;
95 } 95 }
96 96
97 @end 97 @end
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/objc/public/RTCI420Frame.h » ('j') | talk/app/webrtc/objc/public/RTCI420Frame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698