Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
47ba4728
Commit
47ba4728
authored
Feb 07, 2014
by
Reynaldo H. Verdejo Pinochet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver: cosmetics and grammar
Signed-off-by:
Reynaldo H. Verdejo Pinochet
<
r.verdejo@sisa.samsung.com
>
parent
3f47e24c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
ffserver.c
ffserver.c
+14
-11
No files found.
ffserver.c
View file @
47ba4728
...
...
@@ -506,8 +506,8 @@ static void start_children(FFStream *feed)
char
*
slash
;
int
i
;
/* replace "ffserver" with "ffmpeg" in the path of current
program,
*
i
gnore user provided path */
/* replace "ffserver" with "ffmpeg" in the path of current
*
program. I
gnore 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 need
s
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 set
s
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment