Explorar o código

change RemoteCtrl_h264.

yuchuli %!s(int64=3) %!d(string=hai) anos
pai
achega
624efc3373

+ 1 - 1
src/driver/driver_h264_dec/ivh264framedecode.h

@@ -28,7 +28,7 @@ extern "C"
 #include <condition_variable>
 #include <thread>
 
-#define FRAMEDECBUFSIZE 6
+#define FRAMEDECBUFSIZE 30
 
 namespace iv {
     struct framedecodebuf

+ 7 - 4
src/tool/RemoteCtrl_h264/mainwindow.cpp

@@ -486,17 +486,19 @@ void MainWindow::resizeEvent(QResizeEvent *event)
     ui->lineEdit_gpssat->setGeometry(40+2*lablewidth +lewidth,nypos,lewidth,leheight);
 
 
-    double fscale = (sizemain.width()*2/3)/1920.0;
-    double fscale2 = (sizemain.height()*2/3)/1080.0;
+    double fscale = (sizemain.width()*2/3)*1.0/mnframewidth;
+    double fscale2 = (sizemain.height()*2/3)*1.0/mnframeheight;
     if(fscale > fscale2) fscale = fscale2;
+    fscale = fscale * 0.99;
     mmyview->viewscaleto(fscale);
 
     int i;
     for(i=1;i<NUM_CAM;i++)
     {
-        fscale =  (sizemain.width()*1/3)/1920.0;
-        fscale2 = (sizemain.height()*1/3)/1080.0;
+        fscale =  (sizemain.width()*1/3)*1.0/mnframewidth;
+        fscale2 = (sizemain.height()*1/3)*1.0/mnframeheight;
         if(fscale > fscale2) fscale = fscale2;
+        fscale = fscale * 0.99;
         mpviewImg[i]->viewscaleto(fscale);
     }
 }
@@ -842,6 +844,7 @@ void MainWindow::paintEvent(QPaintEvent *)
             mMutexCam[i].lock();
             QImage image = mpImageCam[i]->copy();
             mbCamUpdate[i] = false;
+
             mMutexCam[i].unlock();
             //       QImage image = mpPicView->GetImage();
             mpsceneImg[i]->clear();

+ 2 - 2
src/tool/RemoteCtrl_h264/mainwindow.h

@@ -230,8 +230,8 @@ private:
 private:
     ivh264framedecode * mph264decode[NUM_CAM];
 
-    int mnframewidth = 1920;
-    int mnframeheight = 1080;
+    int mnframewidth = 1280;
+    int mnframeheight = 720;
 
     std::thread * mpthreadframe[NUM_CAM];
     std::thread * mpthreadpic[NUM_CAM];