| 1 |
This part of the documentation is for the new tcp elements: |
| 2 |
- tcpclientsrc |
| 3 |
- tcpclientsink |
| 4 |
- tcpserversrc |
| 5 |
- tcpserversink |
| 6 |
|
| 7 |
TESTS |
| 8 |
----- |
| 9 |
Use these commands to test functionality of the various tcp plugins |
| 10 |
|
| 11 |
* server: nc -l -p 3000 |
| 12 |
client: nc localhost 3000 |
| 13 |
everything you type in the server is shown on the client |
| 14 |
everything you type in the client is shown on the server |
| 15 |
|
| 16 |
* server: nc -l -p 3000 |
| 17 |
client: gst-launch-1.0 tcpclientsrc port=3000 ! fdsink fd=2 |
| 18 |
everything you type in the server is shown on the client |
| 19 |
|
| 20 |
* server: nc -l -p 3000 |
| 21 |
client: gst-launch-1.0 fdsrc fd=1 ! tcpclientsink port=3000 |
| 22 |
everything you type in the client is shown on the server |
| 23 |
|
| 24 |
* server: gst-launch-1.0 tcpserversrc port=3000 ! fdsink fd=2 |
| 25 |
client: gst-launch-1.0 fdsrc fd=1 ! tcpclientsink port=3000 |
| 26 |
everything you type in the client is shown on the server |
| 27 |
|
| 28 |
* server: gst-launch-1.0 fdsrc fd=1 ! tcpserversink port=3000 |
| 29 |
client: gst-launch-1.0 tcpclientsrc port=3000 ! fdsink fd=2 |
| 30 |
everything you type in the server is shown on the client |
| 31 |
|
| 32 |
TODO |
| 33 |
---- |
| 34 |
- implement DNS resolution |
| 35 |
|
| 36 |
multifdsink |
| 37 |
----------- |
| 38 |
- operation: |
| 39 |
- client fd gets added when "add" signal gets emitted on multifdsink |
| 40 |
- signal handler creates a GstTCPClient structure, adds it to ->clients, |
| 41 |
and adds the fd to ->fd_hash, then emits client-added |
| 42 |
- client |
| 43 |
|
| 44 |
- when a buffer comes in: |
| 45 |
- the _render vmethod puts the buffer on the global queue |
| 46 |
- and increases bytes_to_serve |
| 47 |
- (currently it sets streamheaders, but since this is treated globally |
| 48 |
this is wrong - clients can be at different positions in the stream) |
| 49 |
|
| 50 |
- when a client issues a write (ie requests data): |
| 51 |
- when using GDP, if no caps sent yet, send caps first, then set caps_sent |
| 52 |
- if streamheader buffers, and we haven't sent yet to this client, |
| 53 |
send current streamheader buffers, then set streamheader_sent |
| 54 |
- send out buffers |