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
6b0bdc75
Commit
6b0bdc75
authored
Nov 13, 2005
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for unlimited feed size
Originally committed as revision 4697 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ac031f3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ffserver.conf
doc/ffserver.conf
+1
-1
ffserver.c
ffserver.c
+3
-3
No files found.
doc/ffserver.conf
View file @
6b0bdc75
...
@@ -41,7 +41,7 @@ NoDaemon
...
@@ -41,7 +41,7 @@ NoDaemon
# previously recorded live stream. The request should contain:
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
# a path where the feed is stored on disk. You also specify the
# maximum size of the feed
(100M bytes here)
. Default:
# maximum size of the feed
, where zero means unlimited
. Default:
# File=/tmp/feed_name.ffm FileMaxSize=5M
# File=/tmp/feed_name.ffm FileMaxSize=5M
File
/
tmp
/
feed1
.
ffm
File
/
tmp
/
feed1
.
ffm
FileMaxSize
200
K
FileMaxSize
200
K
...
...
ffserver.c
View file @
6b0bdc75
...
@@ -218,7 +218,7 @@ typedef struct FFStream {
...
@@ -218,7 +218,7 @@ typedef struct FFStream {
int
readonly
;
/* True if writing is prohibited to the file */
int
readonly
;
/* True if writing is prohibited to the file */
int
conns_served
;
int
conns_served
;
int64_t
bytes_served
;
int64_t
bytes_served
;
int64_t
feed_max_size
;
/* maximum storage size */
int64_t
feed_max_size
;
/* maximum storage size
, zero means unlimited
*/
int64_t
feed_write_index
;
/* current write position in feed (it wraps round) */
int64_t
feed_write_index
;
/* current write position in feed (it wraps round) */
int64_t
feed_size
;
/* current size of feed */
int64_t
feed_size
;
/* current size of feed */
struct
FFStream
*
next_feed
;
struct
FFStream
*
next_feed
;
...
@@ -2417,7 +2417,7 @@ static int http_receive_data(HTTPContext *c)
...
@@ -2417,7 +2417,7 @@ static int http_receive_data(HTTPContext *c)
feed
->
feed_size
=
feed
->
feed_write_index
;
feed
->
feed_size
=
feed
->
feed_write_index
;
/* handle wrap around if max file size reached */
/* handle wrap around if max file size reached */
if
(
feed
->
feed_write_index
>=
c
->
stream
->
feed_max_size
)
if
(
c
->
stream
->
feed_max_size
&&
feed
->
feed_write_index
>=
c
->
stream
->
feed_max_size
)
feed
->
feed_write_index
=
FFM_PACKET_SIZE
;
feed
->
feed_write_index
=
FFM_PACKET_SIZE
;
/* write index */
/* write index */
...
@@ -3539,7 +3539,7 @@ static void build_feed_streams(void)
...
@@ -3539,7 +3539,7 @@ static void build_feed_streams(void)
feed
->
feed_write_index
=
ffm_read_write_index
(
fd
);
feed
->
feed_write_index
=
ffm_read_write_index
(
fd
);
feed
->
feed_size
=
lseek
(
fd
,
0
,
SEEK_END
);
feed
->
feed_size
=
lseek
(
fd
,
0
,
SEEK_END
);
/* ensure that we do not wrap before the end of file */
/* ensure that we do not wrap before the end of file */
if
(
feed
->
feed_max_size
<
feed
->
feed_size
)
if
(
feed
->
feed_max_size
&&
feed
->
feed_max_size
<
feed
->
feed_size
)
feed
->
feed_max_size
=
feed
->
feed_size
;
feed
->
feed_max_size
=
feed
->
feed_size
;
close
(
fd
);
close
(
fd
);
...
...
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