summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-28misc: trivial comment changesNirbheek Chauhan1-2/+2
Copyright and vim modeline
2014-08-18server: Add /stream/ prefix for streaming URLsNirbheek Chauhan1-13/+20
2014-08-15server: Add the ability to treat conflicting connections as restartsNirbheek Chauhan1-2/+13
Also make stream timeouts configurable
2014-08-15server: Use the /api/ prefix for the REST APINirbheek Chauhan1-5/+5
2014-08-04server: Add some more stream timeout debuggingNirbheek Chauhan1-1/+3
2014-07-31main: Add some debug messages for HTTP error statusesNirbheek Chauhan1-0/+10
2014-07-31token validation: Fix udp client fetching when not using token validationNirbheek Chauhan1-2/+3
2014-07-28misc: Fix some leaks, and remove an unnecessary printNirbheek Chauhan1-5/+10
2014-07-28server: Verify the UDP client list during token validationNirbheek Chauhan1-2/+8
2014-07-25misc syntactic changes -- no behaviour changesNirbheek Chauhan1-10/+10
2014-07-24Implement concurrent RTP-UDP streams, and a REST API for status and authNirbheek Chauhan1-85/+585
When the --token-server=ADDR/MASK argument is passed to the server, the token verification framework is enabled, and the specified subnet is allowed to access the REST API to add/revoke/list tokens that allow clients to connect, and to list/abort streams running on the server. Details about the REST API are documented in the file "REST-API". There were also some organisational and name changes in the code.
2014-07-23server: Remove unused handlersNirbheek Chauhan1-51/+0
We're sure that we won't need them now, and it's making the code harder to follow
2014-07-23server: Track stream state better, and abort betterNirbheek Chauhan1-15/+30
We now differentiate between STREAMING, FLUSHING, and FINISHED. Server aborting is now consolidated into a single function that's called from everywhere.
2014-07-17Use G_SOURCE_REMOVE instead of FALSENirbheek Chauhan1-4/+4
2014-07-17server: Send a Content-Type header as wellNirbheek Chauhan1-2/+7
Older versions of Firefox require this
2014-07-17Fix a few comments/debug messagesNirbheek Chauhan1-1/+1
2014-07-17server: Fix another potential crashNirbheek Chauhan1-3/+3
2014-07-17appsink: Force encodebin to create a keyframe when a client connectsNirbheek Chauhan1-3/+15
This avoids long waits when, for instance, the fps is 3, since the keyframe-max-dist is 128
2014-07-15main: Remove a few more assertionsNirbheek Chauhan1-9/+7
2014-07-15main: Don't handle request-abortedNirbheek Chauhan1-20/+1
We hardly get any context about it, and we never actually did anything there
2014-07-15server: Set headers such that browsers don't try to cache the streamNirbheek Chauhan1-0/+9
Firefox in particular caches the stream very aggressively
2014-07-15server: Make cleanup on server exit and EOS more reliableNirbheek Chauhan1-6/+4
2014-07-15appsink: Fix a rare crashNirbheek Chauhan1-0/+7
2014-07-14encode: Don't leak sinkpad, remove outdated commentNirbheek Chauhan1-1/+0
2014-07-14Improve latency by waiting for the next keyframeNirbheek Chauhan1-18/+12
Instead of caching all the data from the previous keyframe till right now and sending it to the client in a burst, since latency is important, we instead wait for the next keyframe before sending buffers to the clients. This will lead to a delay of upto 128 frames before the stream starts. The keyframe distance and hence the delay can be tweaked by setting the "keyframe-max-dist" property on vp8enc in src/encode.c:create_webm_profile()
2014-07-14main: Add SIGINT handlerNirbheek Chauhan1-0/+10
2014-07-14debug: Remove extra newlines, and use g_critical everywhereNirbheek Chauhan1-25/+25
2014-07-14appsink: Pull and write samples in the libsoup main contextNirbheek Chauhan1-20/+17
2014-07-14main: Add a FIXME, and be verbose when new requests comeNirbheek Chauhan1-2/+6
2014-07-14server: Always send data from the last keyframeNirbheek Chauhan1-10/+18
Store non-keyframe buffers sent to fakesink, and push them to all new clients
2014-07-14debug: Make the server less noisyNirbheek Chauhan1-27/+21
This is very spammy when we get content-length encoding PUT streams
2014-07-14Add two FIXMEs pointed out by slomo in his reviewNirbheek Chauhan1-0/+3
WIP
2014-07-14write-chunks: Use gst_buffer_map instead of gst_memory_mapNirbheek Chauhan1-5/+2
Short-cut. Pointed out in a review by slomo.
2014-07-14debug: Use a macro for buffer read/write status printingNirbheek Chauhan1-4/+10
2014-07-14appsink: Don't need to use pad blocking while linking from teeNirbheek Chauhan1-70/+56
We still need to block while removing the appsink, though. Pointed out in a review by slomo
2014-07-14server: Fix cleanup of clientsNirbheek Chauhan1-5/+6
On forced server abort, as well as normal exit
2014-07-11server: Add support for aborting running streamsNirbheek Chauhan1-3/+23
This is useful to cancel streams that are taking too long to encode, etc
2014-07-11Remove trailing whitespace to make git happyNirbheek Chauhan1-17/+17
2014-07-11server: Add support for persistent connection streamsNirbheek Chauhan1-40/+159
Now we also support Content-Length + Content-Range persistent HTTP connections for stream data. If no further data is received before `server_timeout`, we assume the stream has been closed. This is used by souphttpclientsink for sending streams.
2014-07-11misc: Fix/add a couple of error messages, etcNirbheek Chauhan1-3/+9
2014-07-11clients: Fix increment of client timeoutNirbheek Chauhan1-1/+1
2014-07-11Add license headers and COPYINGNirbheek Chauhan1-2/+21
2014-07-11appsrc: Remove need-data/enough-data signal handlersNirbheek Chauhan1-24/+0
Dead code. Signals were disabled, and using this and pausing the message causes problems with libsoup.
2014-07-10appsink: Add a client timeout, and handle eos separatelyNirbheek Chauhan1-5/+40
If no chunks are written to a client for 10 seconds, we end that stream and clean it up. This is currently happening due to a bug, but might happen due to bad/slow clients as well. Instead of handling EOS from null samples, handle EOS through the signal handler. This is a more reliable way of handling EOS, and also works when the whole pipeline is torn down because the PUT stream ended.
2014-07-10debug: Use separate #ifdefs for each DEBUGNirbheek Chauhan1-3/+3
2014-07-09appsink: Use a GMutex to control when we pull samplesNirbheek Chauhan1-34/+28
We can only pull a new sample and write it out if the previous one has been written, otherwise we get a segfault in SoupMessage.
2014-07-09appsrc: Queue an EOS when aborted tooNirbheek Chauhan1-0/+21
2014-07-09appsink: Push samples when availability is signalledNirbheek Chauhan1-34/+16
This is to demonstrate that this doesn't work. It seems that using the SoupMessage associated with a response outside the signal handler for which it was created can result in a segfault, and eventually does.
2014-07-09main/appsink: Don't hard-code element namesNirbheek Chauhan1-6/+4
2014-07-09main: Add option parsing (port)Nirbheek Chauhan1-3/+21