Commit effed7ae authored by jehan's avatar jehan

re-enable multithread for vp8

parent 323b7bc3
......@@ -112,7 +112,7 @@ static void enc_init(MSFilter *f) {
s->cfg.g_timebase.num = 1;
s->cfg.g_timebase.den = s->fps;
s->cfg.rc_end_usage = VPX_CBR; /* --end-usage=cbr */
s->cfg.g_threads = 1;
s->cfg.g_threads = 4;
s->cfg.rc_undershoot_pct = 95; /* --undershoot-pct=95 */
s->cfg.g_error_resilient = 1;
s->cfg.g_lag_in_frames = 0;
......@@ -145,7 +145,7 @@ static void enc_preprocess(MSFilter *f) {
ms_error("vpx_codec_enc_init failed: %s (%s)n", vpx_codec_err_to_string(res), vpx_codec_error_detail(&s->codec));
}
/*vpx_codec_control(&s->codec, VP8E_SET_CPUUSED, 4); */
vpx_codec_control(&s->codec, VP8E_SET_CPUUSED, 4);
vpx_codec_control(&s->codec, VP8E_SET_STATIC_THRESHOLD, 0);
vpx_codec_control(&s->codec, VP8E_SET_ENABLEAUTOALTREF, 1);
#ifdef FRAGMENT_ON_PARTITIONS
......@@ -311,7 +311,7 @@ static int enc_set_br(MSFilter *f, void*data){
#if TARGET_OS_IPHONE
s->width=MS_VIDEO_SIZE_QVGA_W;
s->height=MS_VIDEO_SIZE_QVGA_H;
s->fps=15;
s->fps=12;
#endif
ms_message("bitrate requested...: %d (%d x %d)\n", br, s->width, s->height);
......
......@@ -7,7 +7,6 @@
//
#import <UIKit/UIKit.h>
<<<<<<< HEAD
@class VideoStream;
@interface mediastreamViewController : UIViewController {
UIView* portraitImageView;
......@@ -25,13 +24,4 @@
@property (nonatomic, retain) IBOutlet UIView* landscapePreview;
@property (nonatomic, retain) IBOutlet UIView* portrait;
@property (nonatomic, retain) IBOutlet UIView* landscape;
=======
@interface mediastreamViewController : UIViewController {
UIView* imageView;
UIView* preview;
}
@property (nonatomic, retain) IBOutlet UIView* imageView;
@property (nonatomic, retain) IBOutlet UIView* preview;
>>>>>>> public/master
@end
......@@ -8,7 +8,6 @@
#import "mediastreamViewController.h"
#include "mediastream.h"
<<<<<<< HEAD
#include "iosdisplay.h"
VideoStream* videoStream;
......@@ -24,25 +23,6 @@ mediastreamViewController* instance;
=======
#ifdef VIDEO_ENABLE
#include "iosdisplay.h"
#endif
static UIView* sImageView=0;
static UIView* spreview=0;
@implementation mediastreamViewController
@synthesize imageView;
@synthesize preview;
void ms_set_video_stream(VideoStream* video) {
#ifdef VIDEO_ENABLED
ms_filter_call_method(video->output,MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID,&sImageView);
ms_filter_call_method(video->source,MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID,&spreview);
#endif
}
>>>>>>> public/master
- (void)dealloc
{
......@@ -64,7 +44,6 @@ void ms_set_video_stream(VideoStream* video) {
- (void)viewDidLoad
{
[super viewDidLoad];
<<<<<<< HEAD
instance=self;
[landscape removeFromSuperview];
[portrait removeFromSuperview];
......@@ -93,20 +72,10 @@ void ms_set_video_stream(VideoStream* video) {
{
[super viewDidUnload];
=======
sImageView=imageView;
spreview=preview;
}
- (void)viewDidUnload
{
[super viewDidUnload];
>>>>>>> public/master
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
<<<<<<< HEAD
-(void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
......@@ -140,12 +109,6 @@ void ms_set_video_stream(VideoStream* video) {
}
void ms_set_video_stream(VideoStream* video) {
[instance setVideoStream:video];
=======
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
>>>>>>> public/master
}
@end
......@@ -470,7 +470,6 @@ void setup_media_streams(MediastreamDatas* args) {
rtp_profile_set_payload(&av_profile,102,&payload_type_h264);
rtp_profile_set_payload(&av_profile,103,&payload_type_vp8);
#ifdef VIDEO_ENABLED
args->video=NULL;
MSWebCam *cam=NULL;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment