Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why the picture is frozen when we're working with asyncio.Queue? #28

Closed
sogand145 opened this issue Jun 26, 2018 · 5 comments
Closed

why the picture is frozen when we're working with asyncio.Queue? #28

sogand145 opened this issue Jun 26, 2018 · 5 comments
Labels
question Further information is requested

Comments

@sogand145
Copy link

when I connect my mobile device to server.py, my picture is played but after a few seconds (for example 20 secs), my picture is frozen!
Do you know what's the main cause of this problem?

Thanks a lot

@jlaine
Copy link
Collaborator

jlaine commented Jun 26, 2018

Do you get any errors on the console? Can you confirm you're using the unmodified code from HEAD?

@sogand145
Copy link
Author

yep, I'm using the new code and have no error on the console.
Only when I use mobile device, my picture is frozen a few seconds later

@jlaine jlaine added the question Further information is requested label Jun 27, 2018
@jlaine
Copy link
Collaborator

jlaine commented Jun 28, 2018

Mahsa, can I please ask you to try and provide some more information, like adding some print() statements in various places to understand whether:

  • you are still receiving frames from the remote party
  • the frames are correctly decoded, and what their dimensions are
  • image processing is applied successfully
  • encoding the outgoing frames works

What mobile OS + browser are you using?

Without any more information I am unlikely to be able to help.

@sogand145
Copy link
Author

Thanks a lot dear Jlaine
My mobile OS is Android 7.0 and I only test with Firefox or Chrome browsers.
For saving audios and videos of local side or remote side, I have already used a dictionary like this:

rtc_io = {
     'call-1': {
         '1': {
             'audio': [],
             'video': [],
             'connected': False,
             'rf_id': None,
             'rf_delay': None
         },
         '2': {
             'audio': [],
             'video': [],
             'connected': False,
             'rf_id': None,
             'rf_delay': None
         },
         'pcs':[]
     }
 }

I know 'call-1' should be unique, but here for instance this value is given.
Now, I'm going to try with asyncio.Queue(maxsize=1) but it appears that audios and videos are not put into queue.
I considered a separate queue for each one of them, in fact we have four queues,those variables were defined in main section of script, but nothing is received!
I tried with using asyncio.Queue(maxsize=1) for only local side and saw it worked.
I placed some print lines in different parts of code (while putting and getting frames), but those lines were not shown.

@jlaine
Copy link
Collaborator

jlaine commented Jun 30, 2018

Ok this issue doesn't seem to be about aiortc, but about some end user code which I don't have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants