GLib-WARNING **: Too many handles to wait for!

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GLib-WARNING **: Too many handles to wait for!

killerrats
Administrator
I have a continuous loop on many files.
these are the steps it does:

1. initialize gstreamer
2. grabs the file
3. creates pipeline and gets bus and clock
4. plays the plipeline to use appsink to record to file
5. once reach the end it blocks and eos on the record bin
6. end up quitting the loop and null the pipeline
7. runs steps 2-6 again.

how can I handle the too many handles to wait for?

here is the code that i use.

LoopRecording() is the method that i use to grab the next file.

pipeline.text
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: GLib-WARNING **: Too many handles to wait for!

killerrats
Administrator
I found this site that responded to another person.

https://phabricator.freedesktop.org/T124

saying might be reaching the File Descriptors limit on windows.

--------Questions-------
Could that be the problem when I EOS on the pipeline and re-initialize the pipeline?

Do I need to null each of the elements to make it not have these too many handles?

I am each time Connecting to the server several times is that another reason for the too many handles?
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: GLib-WARNING **: Too many handles to wait for!

killerrats
Administrator
In reply to this post by killerrats
I did some research and somehow might be able to use this method on windows but haven't figured out how to use it though.

g_poll() which under the GNOME documentation says to use g_io_channel_win32_make_pollfd() under windows.

If anyone has used this before i would be all ears on this.
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: GLib-WARNING **: Too many handles to wait for!

Ian Davidson
In reply to this post by killerrats
I seem to remember seeing a similar problem years ago.  My memory may be
a bit rusty.

I think that if you create a new 'File Descriptor' each time you want a
new file, you will eventually reach a limit in Windows. However, if you
create a File Descriptor once and then set its properties to point to
the file you want while you open, use and close, you can then use the
same descriptor again the next time and so on ad infinitum.  Windows
counts it as just one File Descriptor.

Ian


On 30/12/2016 00:05, killerrats wrote:

> I found this site that responded to another person.
>
> https://phabricator.freedesktop.org/T124
> <https://phabricator.freedesktop.org/T124>
>
> saying might be reaching the File Descriptors limit on windows.
>
> --------Questions-------
> Could that be the problem when I EOS on the pipeline and re-initialize the
> pipeline?
>
> Do I need to null each of the elements to make it not have these too many
> handles?
>
> I am each time Connecting to the server several times is that another reason
> for the too many handles?
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GLib-WARNING-Too-many-handles-to-wait-for-tp4681271p4681293.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GLib-WARNING **: Too many handles to wait for!

killerrats
Administrator
I'm kinda new at using this whole thing. Does that too many handles mean just for using the FILE* or is it using the different object that I created?

I have several files that I record to then create a new pipeline. The program just grabs the next file in line and records to that.

For the writing to file I am using write() is that the only thing that is creating the problem? If it is, should I just use fwrite() instead of write()?
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: GLib-WARNING **: Too many handles to wait for!

killerrats
Administrator
I figured out that it was my loop that i wasn't unref correctly. i was using NULL the loop instead of g_main_loop_unref ().
------------------------------
Gstreamer 1.16.2
------------------------------
Windows