Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to mute QML camera

How to mute QML camera

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
12 Posts 2 Posters 3.0k 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.
  • Taz742T Offline
    Taz742T Offline
    Taz742
    wrote on last edited by A Former User
    #1

    when I capture images, camera has sound and I want to mute it

    Do what you want.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Isn't that a setting of your device ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Taz742T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Isn't that a setting of your device ?

        Taz742T Offline
        Taz742T Offline
        Taz742
        wrote on last edited by
        #3

        @SGaist
        Yes but I want to write code

        Do what you want.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Well, that's the thing: OS level settings like that can usually not be modified by code.

          You should check your target platform documentation for such use case.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Taz742T 1 Reply Last reply
          0
          • SGaistS SGaist

            Well, that's the thing: OS level settings like that can usually not be modified by code.

            You should check your target platform documentation for such use case.

            Taz742T Offline
            Taz742T Offline
            Taz742
            wrote on last edited by Taz742
            #5

            @SGaist
            I have also one problem, I use timer and every 4 seconds it takes photos, but sometimes my screen becomes black, is this qml bug?

            Do what you want.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I don't know. You don't give any details that may help answer your question like:

              • Target platform where that happens
              • Qt version
              • Code snippet that you use for that
              • etc.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              Taz742T 1 Reply Last reply
              0
              • SGaistS SGaist

                I don't know. You don't give any details that may help answer your question like:

                • Target platform where that happens
                • Qt version
                • Code snippet that you use for that
                • etc.
                Taz742T Offline
                Taz742T Offline
                Taz742
                wrote on last edited by
                #7

                @SGaist
                platform is Lenovo A319 android version 4.4.2
                QT 5.8.0

                Timer
                {
                id: tim
                interval: 2000; running: true; repeat: true
                onTriggered:
                {
                if (camera.lockStatus === Camera.Locked)
                {
                camera.imageCapture.capture()
                camera.unlock()
                }
                else
                camera.searchAndLock()
                }
                }

                Do what you want.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  In your code you are taking photos at 2 seconds interval not 4. Are you sure your device can sustain that speed ? You also have to take into account that each image is saved on your device.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Taz742T 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    In your code you are taking photos at 2 seconds interval not 4. Are you sure your device can sustain that speed ? You also have to take into account that each image is saved on your device.

                    Taz742T Offline
                    Taz742T Offline
                    Taz742
                    wrote on last edited by
                    #9

                    @SGaist
                    no no, after 2 seconds "if" operator is false and it doesn't take photos

                    Do what you want.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Good point, I've somehow missed the unlock call.

                      Did you check the state of your phone storage ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      Taz742T 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Good point, I've somehow missed the unlock call.

                        Did you check the state of your phone storage ?

                        Taz742T Offline
                        Taz742T Offline
                        Taz742
                        wrote on last edited by
                        #11

                        @SGaist
                        when photo is taken, I use it for something and remove from default location

                        Do what you want.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Did you check the time that it takes to do that ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          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