Remove warnings in VideoEngine, capture module and render module.
BUG=164, 176, 180 Review URL: http://webrtc-codereview.appspot.com/303004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1145 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b19582b7dc
commit
5cc4dc9e0c
@ -23,11 +23,13 @@ namespace videocapturemodule
|
||||
|
||||
VideoCaptureMacQTKit::VideoCaptureMacQTKit(const WebRtc_Word32 id) :
|
||||
VideoCaptureImpl(id),
|
||||
_captureDevice(NULL),
|
||||
_captureInfo(NULL),
|
||||
_isCapturing(false),
|
||||
_id(id),
|
||||
_captureWidth(QTKIT_DEFAULT_WIDTH),
|
||||
_captureHeight(QTKIT_DEFAULT_HEIGHT),
|
||||
_captureFrameRate(QTKIT_DEFAULT_FRAME_RATE),
|
||||
_isCapturing(false),
|
||||
_frameCount(0)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceModuleCall, webrtc::kTraceVideoCapture, id,
|
||||
@ -64,7 +66,6 @@ WebRtc_Word32 VideoCaptureMacQTKit::Init(
|
||||
"VideoCaptureMacQTKit::Init() called with id %d and unique "
|
||||
"device %s", id, iDeviceUniqueIdUTF8);
|
||||
|
||||
WebRtc_Word32 result=0;
|
||||
const WebRtc_Word32 nameLength =
|
||||
(WebRtc_Word32) strlen((char*)iDeviceUniqueIdUTF8);
|
||||
if(nameLength>kVideoCaptureUniqueNameLength)
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include "video_capture_qtkit_utility.h"
|
||||
#include "video_capture_qtkit_info.h"
|
||||
|
||||
|
||||
using namespace webrtc;
|
||||
|
||||
@interface VideoCaptureMacQTKitInfoObjC : NSObject{
|
||||
bool _OSSupportedInfo;
|
||||
NSArray* _captureDevicesInfo;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "trace.h"
|
||||
|
||||
|
||||
using namespace webrtc;
|
||||
|
||||
#pragma mark **** hidden class interface
|
||||
|
||||
@ -127,21 +127,6 @@
|
||||
// ****************** "private" category functions below here ******************
|
||||
#pragma mark **** "private" method implementations
|
||||
|
||||
- (NSNumber*)getCaptureDeviceWithIndex:(int)index ToString:(char*)name
|
||||
WithLength:(int)length
|
||||
{
|
||||
index = index;
|
||||
name = name;
|
||||
length = length;
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
- (NSNumber*)setCaptureDeviceByIndex:(int)index
|
||||
{
|
||||
index = index;
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
- (NSNumber*)initializeVariables
|
||||
{
|
||||
if(NO == _OSSupportedInfo)
|
||||
|
@ -23,18 +23,10 @@
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
#import <CoreVideo/CoreVideo.h>
|
||||
|
||||
|
||||
|
||||
#import "video_capture_recursive_lock.h"
|
||||
|
||||
|
||||
#include "video_capture_qtkit.h"
|
||||
|
||||
using namespace webrtc;
|
||||
using namespace videocapturemodule;
|
||||
|
||||
|
||||
|
||||
@interface VideoCaptureMacQTKitObjC : NSObject{
|
||||
// class properties
|
||||
bool _capturing;
|
||||
@ -48,7 +40,7 @@ using namespace videocapturemodule;
|
||||
bool _captureInitialized;
|
||||
|
||||
// WebRTC Custom classes
|
||||
VideoCaptureMacQTKit* _owner;
|
||||
webrtc::videocapturemodule::VideoCaptureMacQTKit* _owner;
|
||||
VideoCaptureRecursiveLock* _rLock;
|
||||
|
||||
// QTKit variables
|
||||
@ -90,9 +82,7 @@ using namespace videocapturemodule;
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
- (NSNumber*)getCaptureDeviceWithIndex:(int)index ToString:(char*)name WithLength:(int)length;
|
||||
- (NSNumber*)registerOwner:(webrtc::videocapturemodule::VideoCaptureMacQTKit*)owner;
|
||||
- (NSNumber*)setCaptureDeviceByIndex:(int)index;
|
||||
- (NSNumber*)setCaptureDeviceById:(char*)uniqueId;
|
||||
- (NSNumber*)setCaptureHeight:(int)height AndWidth:(int)width AndFrameRate:(int)frameRate;
|
||||
- (NSNumber*)startCapture;
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include "video_capture_qtkit_utility.h"
|
||||
#include "trace.h"
|
||||
|
||||
using namespace webrtc;
|
||||
using namespace videocapturemodule;
|
||||
|
||||
@implementation VideoCaptureMacQTKitObjC
|
||||
|
||||
@ -70,28 +72,6 @@
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
/// ***** Supposed to get capture device by index.
|
||||
/// ***** Currently not used
|
||||
- (NSNumber*)getCaptureDeviceWithIndex:(int)index ToString:(char*)name
|
||||
WithLength:(int)length{
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoCapture, 0,
|
||||
"%s:%d index=%s name=%s", __FUNCTION__, __LINE__, name);
|
||||
|
||||
index = index;
|
||||
name = name;
|
||||
length = length;
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
/// ***** Supposed to set capture device by index.
|
||||
/// ***** Currently not used
|
||||
- (NSNumber*)setCaptureDeviceByIndex:(int)index {
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoCapture, 0,
|
||||
"%s:%d name", __FUNCTION__, __LINE__);
|
||||
index = index;
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
/// ***** Sets the QTCaptureSession's input device from a char*
|
||||
/// ***** Sets several member variables. Can signal the error system if one has
|
||||
/// occurred
|
||||
@ -215,8 +195,9 @@
|
||||
_frameHeight = height;
|
||||
_frameRate = frameRate;
|
||||
|
||||
[_captureDecompressedVideoOutput
|
||||
setMinimumVideoFrameInterval:(NSTimeInterval)1/(float)_frameRate];
|
||||
// TODO(mflodman) Check fps settings.
|
||||
// [_captureDecompressedVideoOutput
|
||||
// setMinimumVideoFrameInterval:(NSTimeInterval)1/(float)_frameRate];
|
||||
NSDictionary* captureDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithDouble:_frameWidth], (id)kCVPixelBufferWidthKey,
|
||||
[NSNumber numberWithDouble:_frameHeight], (id)kCVPixelBufferHeightKey,
|
||||
@ -417,9 +398,10 @@
|
||||
[NSNumber numberWithUnsignedInt:kCVPixelFormatType_32ARGB],
|
||||
(id)kCVPixelBufferPixelFormatTypeKey, nil]];
|
||||
|
||||
[_captureDecompressedVideoOutput setMinimumVideoFrameInterval:
|
||||
(NSTimeInterval)1/(float)_frameRate];
|
||||
[_captureDecompressedVideoOutput setAutomaticallyDropsLateVideoFrames:YES];
|
||||
// TODO(mflodman) Check fps settings.
|
||||
//[_captureDecompressedVideoOutput setMinimumVideoFrameInterval:
|
||||
// (NSTimeInterval)1/(float)_frameRate];
|
||||
//[_captureDecompressedVideoOutput setAutomaticallyDropsLateVideoFrames:YES];
|
||||
|
||||
success = [_captureSession addOutput:_captureDecompressedVideoOutput
|
||||
error:&error];
|
||||
@ -465,7 +447,6 @@
|
||||
CVPixelBufferLockBaseAddress(videoFrame, LOCK_FLAGS);
|
||||
void* baseAddress = CVPixelBufferGetBaseAddress(videoFrame);
|
||||
size_t bytesPerRow = CVPixelBufferGetBytesPerRow(videoFrame);
|
||||
int frameWidth = CVPixelBufferGetWidth(videoFrame);
|
||||
int frameHeight = CVPixelBufferGetHeight(videoFrame);
|
||||
CVPixelBufferUnlockBaseAddress(videoFrame, LOCK_FLAGS);
|
||||
|
||||
@ -491,10 +472,6 @@
|
||||
_framesDelivered++;
|
||||
_framesRendered++;
|
||||
|
||||
captureOutput = captureOutput;
|
||||
sampleBuffer = sampleBuffer;
|
||||
connection = connection;
|
||||
|
||||
if(YES == [_rLock locked])
|
||||
{
|
||||
[_rLock unlock];
|
||||
|
@ -26,7 +26,7 @@
|
||||
-(id)init;
|
||||
-(void)grabFullScreen;
|
||||
-(void)releaseFullScreen;
|
||||
|
||||
-(NSWindow*)window;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -25,11 +25,6 @@ using namespace webrtc;
|
||||
return self;
|
||||
}
|
||||
|
||||
-(NSWindow*)window{
|
||||
return _window;
|
||||
}
|
||||
|
||||
|
||||
-(void)grabFullScreen{
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoRenderer, 0, "%s:%d", __FUNCTION__, __LINE__);
|
||||
|
||||
@ -75,6 +70,11 @@ using namespace webrtc;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSWindow*)window
|
||||
{
|
||||
return _window;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoRenderer, 0, "%s:%d", __FUNCTION__, __LINE__);
|
||||
|
@ -20,16 +20,13 @@
|
||||
#import <OpenGL/glu.h>
|
||||
#import <OpenGL/OpenGL.h>
|
||||
|
||||
|
||||
|
||||
@interface CocoaRenderView : NSOpenGLView {
|
||||
NSOpenGLContext* _nsOpenGLContext;
|
||||
NSOpenGLContext* _nsOpenGLContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)initCocoaRenderView:(NSOpenGLPixelFormat*)fmt;
|
||||
-(void)initCocoaRenderViewFullScreen:(NSOpenGLPixelFormat*)fmt;
|
||||
-(NSOpenGLContext*)nsOpenGLContext;
|
||||
@end
|
||||
|
||||
#endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_COCOA_RENDER_VIEW_H_
|
@ -28,12 +28,10 @@ using namespace webrtc;
|
||||
}
|
||||
|
||||
|
||||
-(NSOpenGLContext*)nsOpenGLContext{
|
||||
-(NSOpenGLContext*)nsOpenGLContext {
|
||||
return _nsOpenGLContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)initCocoaRenderViewFullScreen:(NSOpenGLPixelFormat*)fmt{
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoRenderer, 0, "%s:%d", __FUNCTION__, __LINE__);
|
||||
|
||||
|
@ -289,7 +289,7 @@ int VideoChannelNSOpenGL::RenderOffScreenBuffer()
|
||||
|
||||
// if(_fullscreen)
|
||||
// {
|
||||
NSRect mainDisplayRect = [[NSScreen mainScreen] frame];
|
||||
// NSRect mainDisplayRect = [[NSScreen mainScreen] frame];
|
||||
// _width = mainDisplayRect.size.width;
|
||||
// _height = mainDisplayRect.size.height;
|
||||
// glViewport(0, 0, mainDisplayRect.size.width, mainDisplayRect.size.height);
|
||||
|
@ -17,12 +17,12 @@ class ViEToFileRenderer;
|
||||
|
||||
namespace webrtc {
|
||||
class VideoCaptureModule;
|
||||
class VideoCodec;
|
||||
class ViEBase;
|
||||
class ViECapture;
|
||||
class ViECodec;
|
||||
class ViERender;
|
||||
class ViERTP_RTCP;
|
||||
struct VideoCodec;
|
||||
}
|
||||
|
||||
// Finds a suitable capture device (e.g. camera) on the current system
|
||||
|
@ -131,6 +131,7 @@ void ViEAutoTest::ViECaptureStandardTest()
|
||||
EXPECT_GT(numberOfCaptureDevices, 0);
|
||||
|
||||
int captureDeviceId[10];
|
||||
memset(captureDeviceId, 0, sizeof(captureDeviceId));
|
||||
webrtc::VideoCaptureModule* vcpms[10];
|
||||
memset(vcpms, 0, sizeof(vcpms));
|
||||
|
||||
|
@ -8,13 +8,14 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h"
|
||||
|
||||
#if defined(COCOA_RENDERING)
|
||||
#include "vie_autotest_mac_cocoa.h"
|
||||
#include "vie_autotest_defines.h"
|
||||
#include "vie_autotest.h"
|
||||
#include "vie_autotest_main.h"
|
||||
#import "cocoa_render_view.h"
|
||||
#include "vie_autotest_mac_cocoa.h"
|
||||
#include "vie_autotest_defines.h"
|
||||
#include "vie_autotest.h"
|
||||
#include "vie_autotest_main.h"
|
||||
|
||||
ViEAutoTestWindowManager::ViEAutoTestWindowManager()
|
||||
: _cocoaRenderView1(nil), _cocoaRenderView2(nil) {
|
||||
|
@ -154,6 +154,9 @@
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'include_dirs': [
|
||||
'../../../modules/video_render/main/source/mac',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
|
||||
|
Loading…
x
Reference in New Issue
Block a user