Kateryna Kostiuk | c5fd3b9 | 2019-07-24 10:12:44 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 Savoir-faire Linux Inc. |
| 3 | * Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | */ |
| 19 | |
| 20 | #import <Foundation/Foundation.h> |
| 21 | #import <QuartzCore/QuartzCore.h> |
Kateryna Kostiuk | fbe1b2f | 2019-10-07 17:32:26 -0400 | [diff] [blame] | 22 | #import <video/renderer.h> |
Kateryna Kostiuk | c5fd3b9 | 2019-07-24 10:12:44 -0400 | [diff] [blame] | 23 | |
| 24 | struct AVFrame; |
| 25 | |
Kateryna Kostiuk | fbe1b2f | 2019-10-07 17:32:26 -0400 | [diff] [blame] | 26 | @interface RendererConnectionsHolder : NSObject |
| 27 | |
| 28 | @property QMetaObject::Connection frameUpdated; |
| 29 | @property QMetaObject::Connection started; |
| 30 | @property QMetaObject::Connection stopped; |
| 31 | |
| 32 | @end |
| 33 | |
Kateryna Kostiuk | c5fd3b9 | 2019-07-24 10:12:44 -0400 | [diff] [blame] | 34 | @interface VideoCommon : NSObject |
| 35 | |
| 36 | + (void)copyLineByLineSrc:(uint8_t*)src |
| 37 | toDest:(uint8_t*)dest |
| 38 | srcLinesize:(size_t)srcLinesize |
| 39 | destLinesize:(size_t)destLinesize |
| 40 | height:(size_t)height; |
| 41 | + (void) fillPixelBuffr:(CVPixelBufferRef *)pixelBuffer |
| 42 | fromFrame:(const AVFrame*)frame |
| 43 | bufferPool:(CVPixelBufferPoolRef *)pixelBufferPool; |
Kateryna Kostiuk | fbe1b2f | 2019-10-07 17:32:26 -0400 | [diff] [blame] | 44 | + (CGSize) fillPixelBuffr:(CVPixelBufferRef *)pixelBuffer |
| 45 | fromRenderer:(const lrc::api::video::Renderer*)renderer |
| 46 | bufferPool:(CVPixelBufferPoolRef *)pixelBufferPool; |
| 47 | |
Kateryna Kostiuk | c5fd3b9 | 2019-07-24 10:12:44 -0400 | [diff] [blame] | 48 | |
| 49 | @end |
| 50 | |