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
923a2445
Commit
923a2445
authored
Mar 08, 2015
by
Reynaldo H. Verdejo Pinochet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver: break some too long lines
Signed-off-by:
Reynaldo H. Verdejo Pinochet
<
reynaldo@osg.samsung.com
>
parent
10fd7ff8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
ffserver.c
ffserver.c
+18
-9
No files found.
ffserver.c
View file @
923a2445
...
@@ -2055,7 +2055,8 @@ static int open_input_stream(HTTPContext *c, const char *info)
...
@@ -2055,7 +2055,8 @@ static int open_input_stream(HTTPContext *c, const char *info)
ret
=
avformat_open_input
(
&
s
,
input_filename
,
c
->
stream
->
ifmt
,
ret
=
avformat_open_input
(
&
s
,
input_filename
,
c
->
stream
->
ifmt
,
&
c
->
stream
->
in_opts
);
&
c
->
stream
->
in_opts
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
http_log
(
"Could not open input '%s': %s
\n
"
,
input_filename
,
av_err2str
(
ret
));
http_log
(
"Could not open input '%s': %s
\n
"
,
input_filename
,
av_err2str
(
ret
));
return
ret
;
return
ret
;
}
}
...
@@ -2125,7 +2126,8 @@ static int http_prepare_data(HTTPContext *c)
...
@@ -2125,7 +2126,8 @@ static int http_prepare_data(HTTPContext *c)
c
->
fmt_ctx
=
*
ctx
;
c
->
fmt_ctx
=
*
ctx
;
av_freep
(
&
ctx
);
av_freep
(
&
ctx
);
av_dict_copy
(
&
(
c
->
fmt_ctx
.
metadata
),
c
->
stream
->
metadata
,
0
);
av_dict_copy
(
&
(
c
->
fmt_ctx
.
metadata
),
c
->
stream
->
metadata
,
0
);
c
->
fmt_ctx
.
streams
=
av_mallocz_array
(
c
->
stream
->
nb_streams
,
sizeof
(
AVStream
*
));
c
->
fmt_ctx
.
streams
=
av_mallocz_array
(
c
->
stream
->
nb_streams
,
sizeof
(
AVStream
*
));
for
(
i
=
0
;
i
<
c
->
stream
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
stream
->
nb_streams
;
i
++
)
{
AVStream
*
src
;
AVStream
*
src
;
...
@@ -2280,7 +2282,8 @@ static int http_prepare_data(HTTPContext *c)
...
@@ -2280,7 +2282,8 @@ static int http_prepare_data(HTTPContext *c)
max_packet_size
=
RTSP_TCP_MAX_PACKET_SIZE
;
max_packet_size
=
RTSP_TCP_MAX_PACKET_SIZE
;
else
else
max_packet_size
=
c
->
rtp_handles
[
c
->
packet_stream_index
]
->
max_packet_size
;
max_packet_size
=
c
->
rtp_handles
[
c
->
packet_stream_index
]
->
max_packet_size
;
ret
=
ffio_open_dyn_packet_buf
(
&
ctx
->
pb
,
max_packet_size
);
ret
=
ffio_open_dyn_packet_buf
(
&
ctx
->
pb
,
max_packet_size
);
}
else
{
}
else
{
ret
=
avio_open_dyn_buf
(
&
ctx
->
pb
);
ret
=
avio_open_dyn_buf
(
&
ctx
->
pb
);
}
}
...
@@ -2292,10 +2295,13 @@ static int http_prepare_data(HTTPContext *c)
...
@@ -2292,10 +2295,13 @@ static int http_prepare_data(HTTPContext *c)
ctx
->
pb
->
seekable
=
0
;
ctx
->
pb
->
seekable
=
0
;
if
(
pkt
.
dts
!=
AV_NOPTS_VALUE
)
if
(
pkt
.
dts
!=
AV_NOPTS_VALUE
)
pkt
.
dts
=
av_rescale_q
(
pkt
.
dts
,
ist
->
time_base
,
ost
->
time_base
);
pkt
.
dts
=
av_rescale_q
(
pkt
.
dts
,
ist
->
time_base
,
ost
->
time_base
);
if
(
pkt
.
pts
!=
AV_NOPTS_VALUE
)
if
(
pkt
.
pts
!=
AV_NOPTS_VALUE
)
pkt
.
pts
=
av_rescale_q
(
pkt
.
pts
,
ist
->
time_base
,
ost
->
time_base
);
pkt
.
pts
=
av_rescale_q
(
pkt
.
pts
,
ist
->
time_base
,
pkt
.
duration
=
av_rescale_q
(
pkt
.
duration
,
ist
->
time_base
,
ost
->
time_base
);
ost
->
time_base
);
pkt
.
duration
=
av_rescale_q
(
pkt
.
duration
,
ist
->
time_base
,
ost
->
time_base
);
if
((
ret
=
av_write_frame
(
ctx
,
&
pkt
))
<
0
)
{
if
((
ret
=
av_write_frame
(
ctx
,
&
pkt
))
<
0
)
{
http_log
(
"Error writing frame to output for stream '%s': %s
\n
"
,
http_log
(
"Error writing frame to output for stream '%s': %s
\n
"
,
c
->
stream
->
filename
,
av_err2str
(
ret
));
c
->
stream
->
filename
,
av_err2str
(
ret
));
...
@@ -2437,7 +2443,8 @@ static int http_send_data(HTTPContext *c)
...
@@ -2437,7 +2443,8 @@ static int http_send_data(HTTPContext *c)
ffurl_write
(
c
->
rtp_handles
[
c
->
packet_stream_index
],
ffurl_write
(
c
->
rtp_handles
[
c
->
packet_stream_index
],
c
->
buffer_ptr
,
len
);
c
->
buffer_ptr
,
len
);
c
->
buffer_ptr
+=
len
;
c
->
buffer_ptr
+=
len
;
/* here we continue as we can send several packets per 10 ms slot */
/* here we continue as we can send several packets
* per 10 ms slot */
}
}
}
else
{
}
else
{
/* TCP data output */
/* TCP data output */
...
@@ -2894,7 +2901,8 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url)
...
@@ -2894,7 +2901,8 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url)
/* get the host IP */
/* get the host IP */
len
=
sizeof
(
my_addr
);
len
=
sizeof
(
my_addr
);
getsockname
(
c
->
fd
,
(
struct
sockaddr
*
)
&
my_addr
,
&
len
);
getsockname
(
c
->
fd
,
(
struct
sockaddr
*
)
&
my_addr
,
&
len
);
content_length
=
prepare_sdp_description
(
stream
,
&
content
,
my_addr
.
sin_addr
);
content_length
=
prepare_sdp_description
(
stream
,
&
content
,
my_addr
.
sin_addr
);
if
(
content_length
<
0
)
{
if
(
content_length
<
0
)
{
rtsp_reply_error
(
c
,
RTSP_STATUS_INTERNAL
);
rtsp_reply_error
(
c
,
RTSP_STATUS_INTERNAL
);
return
;
return
;
...
@@ -3550,7 +3558,8 @@ static void build_feed_streams(void)
...
@@ -3550,7 +3558,8 @@ static void build_feed_streams(void)
}
else
{
}
else
{
/* we handle a stream coming from a feed */
/* we handle a stream coming from a feed */
for
(
i
=
0
;
i
<
stream
->
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
stream
->
nb_streams
;
i
++
)
stream
->
feed_streams
[
i
]
=
add_av_stream
(
feed
,
stream
->
streams
[
i
]);
stream
->
feed_streams
[
i
]
=
add_av_stream
(
feed
,
stream
->
streams
[
i
]);
}
}
}
}
}
}
...
...
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