Commit graph

44 commits

Author SHA1 Message Date
Wim Taymans
6b93b17298 source: don't leak sockets 2015-12-02 20:42:45 +01:00
Wim Taymans
a6dfb8831f properties: add init_builder method
Add method to init a GVariant builder from properties.
2015-09-01 12:48:04 +02:00
Wim Taymans
e9c72a6102 output: send output properties in start
Also send the output properties in start, along with the format.
2015-08-21 11:45:38 +02:00
Wim Taymans
6611061683 Improve state management
Split setup of pipeline and state change to inspect the pipeline formats
and properties. Pass the device monitor caps to the gstreamer source so
that we don't have to query that again.

Work on adding time provider to the sender pipeline. Send the port and
address to the client in the source-output object properties.

Improve properties API and add some more docs.
2015-08-13 11:37:10 +02:00
Wim Taymans
b0e4cb4288 Add object paths to introspection
Clean up headers, avoid exposing DBus api.
Remove notify should not have property changes
2015-08-12 11:34:29 +02:00
Wim Taymans
7cf87d902e source: add GError to get_formats
Add GError to get_formats to get more error information.
Update the source possible formats when source-output is active
2015-08-11 16:09:05 +02:00
Wim Taymans
51f18b540a introspect: add state and format for output source
Add state and negotiated format to output source properties.
2015-08-04 15:59:36 +02:00
Wim Taymans
13d846ec38 Improve introspection
Add instrospection of client and source-output.
Add properties to source-output and to CreateSourceOutput/Input
Add helper to fill properties of context.
Add client-name to pinossrc and pinossink
Improve test-subscribe to show all new introspection details.
2015-07-28 17:05:03 +02:00
Wim Taymans
85e09e7a5b source-output: fix wrongly marked property 2015-07-17 17:14:57 +02:00
Wim Taymans
31da833069 properties: pass PinosProperties around
Pass PinosProperties around instead of GVariant. This is much easier to
deal with.
2015-07-17 16:57:01 +02:00
Wim Taymans
619c1f83d0 deamon: remove obsolete method 2015-07-16 17:19:05 +02:00
Wim Taymans
12301b6ef1 source: add method to mark a source idle or busy
Marking a source idle will start an idle timeout to suspend the source.
2015-07-16 17:18:01 +02:00
Wim Taymans
aa558bf105 client-source: fix state changes
Keep the client-source in the playing state for as long as the input is
streaming. Pausing the pipeline when there are no more readers causes
data to bunch up in the socket that gets bursted to new clients when
they connect.
2015-07-14 15:42:47 +02:00
Wim Taymans
1fec75d2a5 client-source: set format on client source
Set the format on the client source when it is created so that other
clients can inspect the format. It also makes client sources show up in
the device monitor.
2015-07-14 11:34:59 +02:00
Wim Taymans
1e4e4ef185 client-source: handle NULL filter 2015-07-09 17:58:40 +02:00
Wim Taymans
b85fd0ed25 source: set our possible-formats 2015-07-09 17:36:00 +02:00
Wim Taymans
53bc0f7848 Improve default source state
Default source state should be SUSPENDED
2015-07-09 11:34:34 +02:00
Wim Taymans
a3505fb880 more rename PV -> PINOS, Pv -> Pinos, pv -> pinos 2015-07-07 16:46:23 +02:00
Wim Taymans
4b72848a1a Rename pulsevideo to pinos 2015-06-30 18:06:36 +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
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
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
64171606cc docs: add more docs
also some small improvements
2015-04-21 16:57:09 +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
3fba92fb74 Initial commit 2015-04-16 16:58:33 +02:00