Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Camera Problem on Symbain^3
Forum Updated to NodeBB v4.3 + New Features

Camera Problem on Symbain^3

Scheduled Pinned Locked Moved Mobile and Embedded
36 Posts 8 Posters 20.2k Views 1 Watching
  • 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.
  • X Offline
    X Offline
    xsacha
    wrote on last edited by
    #26

    Not 2008 :P Time between SmartInstaller existance and free signing is a very short time window.
    Unlucky if you missed out, but it's a one-off break from UID. And it affects only a handful of apps.
    It also saves 20 euro (per pop as you say) for each future update.

    Anyway you can create a topic about it if you want. Going off-topic.

    • Sacha
    1 Reply Last reply
    0
    • X Offline
      X Offline
      xsacha
      wrote on last edited by
      #27

      Well I think you're in the minority, so I stand by my free signing of Qt apps with Nokia UIDs.

      Going back on-topic:
      So, for you, updating your projects for each QtMobility update may prove expensive but it doesn't really affect the rest of us. Especially considering these are new apps we are talking about.
      So I'll happily go with QtMobility to use such APIs as Camera and update when it is required.

      • Sacha
      1 Reply Last reply
      0
      • K Offline
        K Offline
        kkrzewniak
        wrote on last edited by
        #28

        Please correct me if I'm wrong but all the APIs in QtMobility 1.1 are stated to be final (API Maturity Level -FINAL). So any app using QtMobility 1.1 should run with future mobility packages, as the API is final. "Mobility Doc":http://doc.qt.nokia.com/qtmobility-1.1/

        Me, Grimlock, not "nice dino". ME BASH BRAINS!

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on last edited by
          #29

          Well that is true kkrzewniak.

          But there's a lot of important functionality in QtMobility 1.1 that resides in the 'labs' -- this of course is not final and will change soon.

          Examples:

          • Gestures (pinch-zoom, swipe and so on) Plugin
          • Folder List Plugin
          • Particles Plugin

          Fortunately for the OP, Camera shouldn't change much.
          The APIs defined as 'FINAL' may still be extended (but still backwards compatible).

          • Sacha
          1 Reply Last reply
          0
          • K Offline
            K Offline
            kkrzewniak
            wrote on last edited by
            #30

            Yes and that is my point exactly! Stop whining that QtMobility so bad, just stick to the parts You know to be final.

            Me, Grimlock, not "nice dino". ME BASH BRAINS!

            1 Reply Last reply
            0
            • X Offline
              X Offline
              xsacha
              wrote on last edited by
              #31

              I don't know why tam hates QtMobility so much. My only guess is he has created his own custom libraries to deal with camera and so on and hates that it has all been replaced by 3 lines of code :P.

              • Sacha
              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #32

                tamhanna: Have fun limiting your apps to the Symbian ecosystem then.

                Seriously: Qt is meant to make it easy to cover all (Nokia) phones, not just Symbian. You are giving up on Meego before it is even out! And there even are community ports of Qt to android and iphone... who knows, maybe those will become official someday...

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #33

                  tamhanna: Most linux distributions are moving away from HAL... I do not know whether it will be in meego or not:-)

                  1 Reply Last reply
                  0
                  • X Offline
                    X Offline
                    xsacha
                    wrote on last edited by
                    #34

                    I don't think his 'hal' header is actually related to HAL, that's just how you handle these libraries right tam? I knew you spent time on custom libraries! :P It's ok to move on to QtMobility you know. Even if it seems you've wasted time making your hal.h.

                    I don't think Meego will use HAL though. Will it even use X11? I think Nokia wanted Wayland?

                    • Sacha
                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xsacha
                      wrote on last edited by
                      #35

                      OK, I'm not sure why you call it HAL :P I always call that stuff 'defines.h' or 'constants.h' or similar.

                      This doesn't show your solution for QtMobility. What do you use?

                      Do you have anything that could help the OP, for example, with his Camera API? Or you just write this in Symbian C++?

                      • Sacha
                      1 Reply Last reply
                      0
                      • Q Offline
                        Q Offline
                        qwertyuiopearendil
                        wrote on last edited by
                        #36

                        Hi All,
                        to be able to use camera in my app i've decided to use CCamera class and MCameraObserver2, below yuo'll find all my class code:

                        @
                        //MainWindow.h
                        #ifndef MAINWINDOW_H
                        #define MAINWINDOW_H

                        #include <QMainWindow>
                        #include <ecam.h>

                        namespace Ui {
                        class MainWindow;
                        }

                        class MainWindow : public QMainWindow, public MCameraObserver2
                        {
                        Q_OBJECT

                        public:
                        explicit MainWindow(QWidget *parent = 0);

                        //Derived from MCameraObserver2
                        

                        public:
                        void HandleEvent(const TECAMEvent &);
                        void ImageBufferReady(MCameraBuffer &, TInt);
                        void VideoBufferReady(MCameraBuffer &, TInt);
                        void ViewFinderReady(MCameraBuffer &, TInt);

                        ~MainWindow();
                        

                        private:
                        Ui::MainWindow *ui;
                        bool iCameraOn;

                        private slots:
                        void on_pushButton_clicked();

                        public:
                        CCamera *iCamera;
                        TCameraInfo iCameraInfo;

                        };

                        #endif // MAINWINDOW_H

                        @

                        @
                        //MainWindow.cpp
                        #include <ecam.h>

                        //----------------
                        //To remove
                        #include <QDebug>
                        //----------------

                        #include "MainWindow.h"
                        #include "ui_MainWindow.h"

                        MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
                        {
                        ui->setupUi(this);
                        iCamera=0;
                        QWidget::setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
                        setWindowFlags(Qt::WindowSoftkeysVisibleHint); //To be ablet to see down soft keys
                        iCameraOn=false;
                        }

                        MainWindow::~MainWindow()
                        {
                        qDebug()<<"Delete MainWindow";
                        if (iCamera!=0)
                        {
                        iCamera->Release();
                        delete iCamera;
                        iCamera=0;
                        }
                        delete ui;
                        }

                        void MainWindow::on_pushButton_clicked()
                        {
                        //Activate Camera
                        // iCamera=CCamera::New2L(*this,CCamera::CamerasAvailable(),(TInt) 50);

                        TInt a_TInt_NoOfCameraAvailable=CCamera::CamerasAvailable();
                        int a_int_NoOfCameraAvailable=(int) a_TInt_NoOfCameraAvailable;
                        qDebug()<<"CamerasAvailable return value: "<<a_int_NoOfCameraAvailable;
                        if (a_int_NoOfCameraAvailable>0)
                        {
                            if (iCamera==NULL)
                            {
                                qDebug()<<"00 - Building iCamera and reserve it";
                                iCamera=CCamera::New2L(*this,0,0);
                                iCamera->Reserve();
                            }
                        }
                        

                        }

                        void MainWindow::HandleEvent(const TECAMEvent & aEvent)
                        {
                        QString aString="I'm in HandleEvent";
                        qDebug()<<aString;

                        switch (aEvent.iEventType.iUid)
                        {
                        case 270499131:
                            {
                                //Reserve Complete
                                qDebug()<<"01 - Reserve Complete start power on";
                                if (iCameraOn==false)
                                {
                                    qDebug()<<"MainWindow::HandleEvent iCamera->PowerOn();";
                                    iCamera->PowerOn();
                                    iCameraOn=true;
                                }
                                break;
                            }
                        case 270499132:
                            {
                                //PowerOn Complete
                                qDebug()<<"02 - Power On complete";
                                iCameraInfo;
                                iCamera->CameraInfo(iCameraInfo);
                                iCamera->PrepareImageCaptureL(CCamera::EFormatJpeg,0,TRect(0,0,360,640));
                                break;
                            }
                        default:
                            {
                                qDebug()<<"aEvent= "<<(int)aEvent.iEventType.iUid;
                                break;
                            }
                        }
                        

                        }

                        void MainWindow::ImageBufferReady(MCameraBuffer & aCameraBuffer, TInt)
                        {
                        QString aString="I'm in ImageBufferReady";
                        qDebug()<<aString;
                        }

                        void MainWindow::VideoBufferReady(MCameraBuffer &aCameraBuffer, TInt)
                        {
                        QString aString="I'm in VideoBufferReady";
                        qDebug()<<aString;
                        }

                        void MainWindow::ViewFinderReady(MCameraBuffer &aCameraBuffer, TInt)
                        {
                        QString aString="I'm in ViewFinderReady";
                        qDebug()<<aString;
                        }

                        @

                        But when i run program console said: 'CActiveScheduler::RunIfReady() returned error: -5'

                        Could you please le tme know where i'm wronging.

                        Thanks.

                        1 Reply Last reply
                        0

                        • Login

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