diff options
author | Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com> | 2014-02-07 19:54:56 -0300 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com> | 2014-02-08 00:29:39 -0300 |
commit | 47ba4728149f40717c70e827e549fbb56d696cde (patch) | |
tree | 3a9847fad52e6cecfb12027e1a97be874f4ec9b6 /ffserver.c | |
parent | 3f47e24cbeb8d7e530ad9d7b47b0660a2754efa3 (diff) | |
download | ffmpeg-47ba4728149f40717c70e827e549fbb56d696cde.tar.gz |
ffserver: cosmetics and grammar
Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ffserver.c b/ffserver.c index 61e0d1180d..f2fb618f08 100644 --- a/ffserver.c +++ b/ffserver.c @@ -506,8 +506,8 @@ static void start_children(FFStream *feed) char *slash; int i; - /* replace "ffserver" with "ffmpeg" in the path of current program, - * ignore user provided path */ + /* replace "ffserver" with "ffmpeg" in the path of current + * program. Ignore user provided path */ av_strlcpy(pathname, my_program_name, sizeof(pathname)); slash = strrchr(pathname, '/'); if (!slash) @@ -634,7 +634,7 @@ static void start_multicast(void) } } -/* main loop of the http server */ +/* main loop of the HTTP server */ static int http_server(void) { int server_fd = 0, rtsp_server_fd = 0; @@ -702,14 +702,15 @@ static int http_server(void) case HTTPSTATE_SEND_DATA: case HTTPSTATE_SEND_DATA_TRAILER: if (!c->is_packetized) { - /* for TCP, we output as much as we can (may need to put a limit) */ + /* for TCP, we output as much as we can + * (may need to put a limit) */ c->poll_entry = poll_entry; poll_entry->fd = fd; poll_entry->events = POLLOUT; poll_entry++; } else { /* when ffserver is doing the timing, we work by - looking at which packet need to be sent every + looking at which packet needs to be sent every 10 ms */ delay1 = 10; /* one tick wait XXX: 10 ms assumed */ if (delay1 < delay) @@ -1017,7 +1018,8 @@ static int handle_connection(HTTPContext *c) /* if error, exit */ if (c->http_error) return -1; - /* all the buffer was sent : synchronize to the incoming stream */ + /* all the buffer was sent : synchronize to the incoming + * stream */ c->state = HTTPSTATE_SEND_DATA_HEADER; c->buffer_ptr = c->buffer_end = c->buffer; } @@ -1028,7 +1030,7 @@ static int handle_connection(HTTPContext *c) case HTTPSTATE_SEND_DATA_HEADER: case HTTPSTATE_SEND_DATA_TRAILER: /* for packetized output, we consider we can always write (the - input streams sets the speed). It may be better to verify + input streams set the speed). It may be better to verify that we do not rely too much on the kernel queues */ if (!c->is_packetized) { if (c->poll_entry->revents & (POLLERR | POLLHUP)) @@ -1458,7 +1460,7 @@ static int validate_acl(FFStream *stream, HTTPContext *c) } /* compute the real filename of a file by matching it without its - extensions to all the stream filenames */ + extensions to all the stream's filenames */ static void compute_real_filename(char *filename, int max_size) { char file1[1024]; @@ -1492,7 +1494,7 @@ enum RedirType { REDIR_SDP, }; -/* parse http request and prepare header */ +/* parse HTTP request and prepare header */ static int http_parse_request(HTTPContext *c) { const char *p; @@ -1863,7 +1865,7 @@ static int http_parse_request(HTTPContext *c) goto send_error; } - /* prepare http header */ + /* prepare HTTP header */ c->buffer[0] = 0; av_strlcatf(c->buffer, c->buffer_size, "HTTP/1.0 200 OK\r\n"); mime_type = c->stream->fmt->mime_type; @@ -3509,7 +3511,8 @@ static int rtp_new_av_stream(HTTPContext *c, ipaddr, ntohs(dest_addr->sin_port), c->stream->filename, stream_index, c->protocol); - /* normally, no packets should be output here, but the packet size may be checked */ + /* normally, no packets should be output here, but the packet size may + * be checked */ if (ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size) < 0) { /* XXX: close stream */ goto fail; |