Skip to content

Doesn't work on MacOS #4

Description

@codinginpython123

On MacOS there is a limitation: You can't run a gui outside the MAIN Thread. @NeuralNine please find a way to run the the gui in the Main Thread to have compatability with MacOS.

Activity

  1. NeuralNine commented on Feb 12, 2021

    @NeuralNine
    Owner

    Thanks for the information. I don't have any MacOS systems I can test this package on at the moment. I will work on it once I have the possibility. Of course I am also happy to accept pull requests from Mac users that are able to fix this issue.

  2. codinginpython123 commented on Feb 15, 2021

    @codinginpython123
    Author

    Thanks for the information. I don't have any MacOS systems I can test this package on at the moment. I will work on it once I have the possibility. Of course I am also happy to accept pull requests from Mac users that are able to fix this issue.

    Thanks for replying to my issue. I also have a Windows machine but my mac is my main programming computer! I will also try it on the Windows machine. I will try to make the library work in MacOS myself too. Also huge fan of your Youtube Channel!

  3. codinginpython123 commented on Feb 17, 2021

    @codinginpython123
    Author

    I studied the source code of vidstream and if i find a way to not put the __client_connection function on the StreamingServer class inside a Thread it may work on MacOS

  4. chatLong commented on Apr 5, 2023

    @chatLong

    I studied the source code of vidstream and if i find a way to not put the __client_connection function on the StreamingServer class inside a Thread it may work on MacOS

    Hello, I'm also a mac user. Do you can share your solution ?

  5. YanivFalik commented on May 21, 2024

    @YanivFalik

    Hi,
    Had this bug also :)
    This helped me - opencv/opencv#22602
    The thing is macOs doesn't allow UI actions from threads other then main thread.
    Meaning in StreamingServer.start_server program initiate new thread of __server_listening.
    So when we try to do UI action in line 179
    cv2.imshow(str(address), frame)
    We'll get an error.

    I tried to init __server_listening in another process, i.e:
    `.

        """
        Starts the server if it is not running already.
        """
       def start_server(self)
        if self.__running:
            print("Server is already running")
        else:
            self.__running = True
            processId = os.fork()
            if processId > 0:
                self.__server_listening()
    

    `

    and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions