Commit graph

6339 commits

Author SHA1 Message Date
Wim Taymans 0dd41f5e40 gst: fix fixation
Implement fixate for video and audio caps
2015-06-30 18:14:36 +02:00
Wim Taymans 4b72848a1a Rename pulsevideo to pinos 2015-06-30 18:06:36 +02:00
Wim Taymans b68b62740c Fix locking and threadsafety
Emit all notify in the context thread.
Handle error cases better.
Make sure we hold the lock when running the mainloop, this will cause
all of the signals to be emited with the lock. Make sure we call all
methods with the lock.
2015-06-12 12:10:27 +02:00
Wim Taymans 83223f0a83 pvsink: fix cleanup 2015-06-05 18:21:18 +02:00
Wim Taymans 7e5fcf6771 more work on cleanup 2015-06-04 16:34:47 +02:00
Wim Taymans e632540983 fix object refcounting some more 2015-06-02 18:00:57 +02:00
Wim Taymans f6bb35cb98 Handle crash on cleanup
It's possible that the last ref to a source-output is removed with
the remove signal, in that case, remove the object from the client
watched objects to avoid freeing it twice.

Use installed gstreamer and fix library name
2015-06-02 17:01:35 +02:00
Wim Taymans 273a5d35dc more cleanup fixes 2015-05-27 18:16:52 +02:00
Wim Taymans ac6d73f913 improve cleanup
Start stream when input socket is given.
2015-05-27 16:08:51 +02:00
Wim Taymans f50d1548d5 Add more generic gst source manager object
Use device manager to add/remove all video providers dynamically, remove
v4l2 specific code.

Get the client proxy from subscribe instead of waiting for the
subscription callback. This way we can actually make an error on
failure.

Clean up the objects when the server disappears.

Remove subscription from the server, we don't need it. Install server
objects in bus_acquired.
2015-05-21 16:49:26 +02:00
Wim Taymans e24398fe8c implement interface remove
Clean up some g_print
2015-05-21 10:18:21 +02:00
Wim Taymans 4a61f988dc pvsrc: implement source selection
Allow pvsrc to select what source to connect to.
2015-05-20 12:01:54 +02:00
Wim Taymans 98861cb940 avoid fd-leaks
Set rank of source to PRIMARY + 1
2015-05-18 16:58:16 +02:00
Wim Taymans c2a35199f7 Remove obsolete test
Add negotiation to the test client
2015-05-15 17:19:29 +02:00
Wim Taymans d531634061 capabilities -> formats 2015-05-15 16:41:53 +02:00
Wim Taymans 31cc37b6a5 Fix client-source negotiation and states
Avoid buffers without data.

Handle stream state changes in gstpvsrc and gstpvsink

Implement capabilities in v4l2 source
2015-05-15 15:58:13 +02:00
Wim Taymans cbe7b52a70 Improve error reporting
Pass GError around for things that can fail and report the errors back
to the client.

Improve shutdown of pipeline when no clients are consuming.

Make GStreamer elements handle all kinds of data and not just video
because we can.
2015-05-15 13:34:32 +02:00
Wim Taymans 4bc308835a Implement negotiation
Use generic byte blobs for formats. We currently use them to store
gstreamer caps but we could also use them to exchange serialized
GVariants if we want.

Make properties a variant dictionary
2015-05-14 17:46:12 +02:00
Wim Taymans ca7e4602f6 Work on adding pulsevideosink
Add the beginnings of a pulsevideosink
Make a new client-source object for every client that wants to provide
a stream. The client will have a handle to write the stream to.
2015-05-11 18:24:34 +02:00
Wim Taymans 7bb3ae2562 Move CreateSourceOutput to client object
Move the CreateSourceOutput method back to the client object so that we
can leave the selection of the source in the server.
2015-05-11 16:08:34 +02:00
Wim Taymans d9444ab360 Make source and source-output server side only
Move source and source-output to the server side again.
Make the daemon track objects per sender so that we can remove them
when the sender disappears.
2015-05-05 18:20:32 +02:00
Wim Taymans 1b89f2f8ad add get_proxy_finish
Fix some compilation issues
2015-05-04 12:16:30 +02:00
Wim Taymans 0a9f79b675 Avoid more autogenerated code
Avoid using the autogenerated object manager because it does not
emit signals in the right context in all cases. Use our own proxy
and make our own proxy objects when they appear.

Make it possible to get a previously created proxy object or wait when
it is still being constructed.
2015-05-04 10:38:26 +02:00
Wim Taymans c185755b3f misc hacking
Add introspect API
Move private things to private.h
Use custom main-context for the context, and ensure everything is called
from the custom main-context. does not work well with glib proxy signals
yet.
Work with custom mainloop in the gstreamer element.
2015-04-29 17:51:51 +02:00
Wim Taymans 592e99a317 Add gstreamer source element
Add a source gstreamer element
Expose error in context
Make it possible to set the source in the error state
Add properties to a stream and use those to get a source-output
Fix signal for new-buffer
Attach the socket source to the thread default mainloop
Make subscribe cancellable.
Propagate state and error in context.
Add bus handler for v4l2 source
Use negotiated properties to set capsfilter in v4l2
Fix subscribe in test-client
2015-04-28 17:36:44 +02:00
Wim Taymans e151150cad Move subscription signal to context
Emit the subscription signal event directly from the context, This is
easier and it avoids having two subscribe objects.

Remove client proxy property from the context, we don't need it anymore.

Only expose objects when the client manager has a name-owner.
2015-04-27 11:06:48 +02:00
Wim Taymans 2b1558d0e5 removed olf files 2015-04-27 09:45:01 +02:00
Wim Taymans 417cd76f3e subscribe: rework some more
Track senders in the subscribe object and aggregate events from all
connected clients. This allows each client to get a complete view of all
the objects of pulsevideo. With all the source objects available, we can
then to the selection of the source on each client.

Remove the CreatSourceOutput on the Client1 object but let the client
select a good source and call CreateSourceOutput directly on the source.
This avoid going through the server to get a connection and the client
can just as well select a source.
Add a state property to the source and make it such that it can do async
state changes.

Remove the source provider object, each client can now directly see the
objects of another clients so there is no need for intermediate objects
in the server.
2015-04-27 09:05:14 +02:00
Wim Taymans 89c7955f3d source: implement more properties 2015-04-22 16:58:36 +02:00
Wim Taymans 38493fe274 source: add extra properties 2015-04-22 16:09:09 +02:00
Wim Taymans 64171606cc docs: add more docs
also some small improvements
2015-04-21 16:57:09 +02:00
Wim Taymans 4378f34664 docs: add dbus docs 2015-04-21 16:02:40 +02:00
Wim Taymans 09de2d3db9 handle remote and local sources better
Track remote and local sources separately and make SourceProvider1
interfaces for remote objects so that we get the subscription right.

Move disconnect from the Manager1 to Client1 interface and implement
in the context.
2015-04-20 17:24:58 +02:00
Wim Taymans 93c246c4ce support remote sources
Watch client object-manager and keep the remote source object in a
SourceProvider object. Keep a list of all sources in the daemon.

Handle the Client CreateSourceOutput by calling the method on a
registered source in the daemon.

Pass GDBusObject in the subscription signal so that we can get to more
details.
2015-04-20 15:03:14 +02:00
Wim Taymans 752494621c rework subscription
Rework subscription so that we can use it for client and server.

Move source and source-output to client to allow client provided
sources. Still needs some work but registration seems to work partly.

Rework DBUS API: move CreateSourceOutput to Client1 interface, remove
Add/RemoveProvider and Device1 interface. Rework SourceOutput1 to
allow for reconfigure.

Add a client to test v4l2 source.
2015-04-17 17:27:26 +02:00
Wim Taymans 75d5fa91e2 fdpay: use fd allocator
Use the fd allocator instead of the dmabuf allocator.
Update the wire protocol
2015-04-17 10:44:03 +02:00
Wim Taymans 8b02c9040a pulsevideo: add gstreamer elements
Add custom gstreamer elements to pad/depay
Add pv_init() to register new elements
2015-04-16 19:45:26 +02:00
Wim Taymans 3ddd7a60a7 remove unused directories 2015-04-16 17:43:11 +02:00
Wim Taymans 3fba92fb74 Initial commit 2015-04-16 16:58:33 +02:00