Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Guys Plz help me in video recording project using Qt C++

Guys Plz help me in video recording project using Qt C++

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 651 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thippu
    wrote on last edited by p3c0
    #1

    I'm beginner
    and Trying to build software that records video
    Now,I wrote code to detect the camera devices and can display them.
    Plz guide me what to do next or suggest me ......
    thank you in advance..

    code I written to detect :

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include<QCamera>
    #include <QMediaService>
    #include <QMediaRecorder>
    #include <QCameraViewfinder>
    #include <QCameraInfo>
    #include <QMediaMetaData>
    
    #include <QMessageBox>
    #include <QPalette>
    
    #include <QtWidgets>
    Q_DECLARE_METATYPE(QCameraInfo)
    
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),ui(new Ui::MainWindow),
        camera(0),
        mediarecorder(0)
    {
        ui->setupUi(this);
    
        //Camera devices:
    
        QActionGroup *videoDevicesGroup = new QActionGroup(this);
        videoDevicesGroup->setExclusive(true);
        foreach(const QCameraInfo &cameraInfo, QCameraInfo::availableCameras())
        {
            QAction *videoDeviceAction = new QAction(cameraInfo.description(), videoDevicesGroup);
            videoDeviceAction->setCheckable(true);
            videoDeviceAction->setData(QVariant::fromValue(cameraInfo));
            if (cameraInfo == QCameraInfo::defaultCamera())
                videoDeviceAction->setChecked(true);
    
            ui->menuDevices->addAction(videoDeviceAction);
        }
    
        connect(videoDevicesGroup, SIGNAL(triggered(QAction*)), SLOT(updateCameraDevice(QAction*)));
      //  connect(ui->captureWidget, SIGNAL(currentChanged(int)), SLOT(updateCaptureMode()));
    //verify the above stmt,what to pass to func update updateCaptureMode()
        setCamera(QCameraInfo::defaultCamera());
    }
    
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    void MainWindow::setCamera(const QCameraInfo &camerainfo)
    {
    
    }
    
    raven-worxR 1 Reply Last reply
    0
    • T thippu

      I'm beginner
      and Trying to build software that records video
      Now,I wrote code to detect the camera devices and can display them.
      Plz guide me what to do next or suggest me ......
      thank you in advance..

      code I written to detect :

      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      #include<QCamera>
      #include <QMediaService>
      #include <QMediaRecorder>
      #include <QCameraViewfinder>
      #include <QCameraInfo>
      #include <QMediaMetaData>
      
      #include <QMessageBox>
      #include <QPalette>
      
      #include <QtWidgets>
      Q_DECLARE_METATYPE(QCameraInfo)
      
      MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),ui(new Ui::MainWindow),
          camera(0),
          mediarecorder(0)
      {
          ui->setupUi(this);
      
          //Camera devices:
      
          QActionGroup *videoDevicesGroup = new QActionGroup(this);
          videoDevicesGroup->setExclusive(true);
          foreach(const QCameraInfo &cameraInfo, QCameraInfo::availableCameras())
          {
              QAction *videoDeviceAction = new QAction(cameraInfo.description(), videoDevicesGroup);
              videoDeviceAction->setCheckable(true);
              videoDeviceAction->setData(QVariant::fromValue(cameraInfo));
              if (cameraInfo == QCameraInfo::defaultCamera())
                  videoDeviceAction->setChecked(true);
      
              ui->menuDevices->addAction(videoDeviceAction);
          }
      
          connect(videoDevicesGroup, SIGNAL(triggered(QAction*)), SLOT(updateCameraDevice(QAction*)));
        //  connect(ui->captureWidget, SIGNAL(currentChanged(int)), SLOT(updateCaptureMode()));
      //verify the above stmt,what to pass to func update updateCaptureMode()
          setCamera(QCameraInfo::defaultCamera());
      }
      
      
      MainWindow::~MainWindow()
      {
          delete ui;
      }
      void MainWindow::setCamera(const QCameraInfo &camerainfo)
      {
      
      }
      
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @thippu
      take a look at the Camera example

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      T 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @thippu
        take a look at the Camera example

        T Offline
        T Offline
        thippu
        wrote on last edited by
        #3

        @raven-worx
        Bro thanx for the reply
        I have been using that to develop the project but In that If I build&run that project,During execution of the Application I can see only Image Tab(Image Functionalities)
        I can't switch to Video tab
        What to do?

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved