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
124a9edb
Commit
124a9edb
authored
Jun 04, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udp: support old, crappy non pthread mode
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
87f40364
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
configure
configure
+1
-1
udp.c
libavformat/udp.c
+8
-0
No files found.
configure
View file @
124a9edb
...
@@ -1493,7 +1493,7 @@ mmst_protocol_deps="network"
...
@@ -1493,7 +1493,7 @@ mmst_protocol_deps="network"
rtmp_protocol_select
=
"tcp_protocol"
rtmp_protocol_select
=
"tcp_protocol"
rtp_protocol_select
=
"udp_protocol"
rtp_protocol_select
=
"udp_protocol"
tcp_protocol_deps
=
"network"
tcp_protocol_deps
=
"network"
udp_protocol_deps
=
"network
pthreads
"
udp_protocol_deps
=
"network"
# filters
# filters
blackframe_filter_deps
=
"gpl"
blackframe_filter_deps
=
"gpl"
...
...
libavformat/udp.c
View file @
124a9edb
...
@@ -35,7 +35,11 @@
...
@@ -35,7 +35,11 @@
#include "network.h"
#include "network.h"
#include "os_support.h"
#include "os_support.h"
#include "url.h"
#include "url.h"
#if HAVE_PTHREADS
#include <pthread.h>
#include <pthread.h>
#endif
#include <sys/time.h>
#include <sys/time.h>
#ifndef IPV6_ADD_MEMBERSHIP
#ifndef IPV6_ADD_MEMBERSHIP
...
@@ -58,7 +62,9 @@ typedef struct {
...
@@ -58,7 +62,9 @@ typedef struct {
int
circular_buffer_size
;
int
circular_buffer_size
;
AVFifoBuffer
*
fifo
;
AVFifoBuffer
*
fifo
;
int
circular_buffer_error
;
int
circular_buffer_error
;
#if HAVE_PTHREADS
pthread_t
circular_buffer_thread
;
pthread_t
circular_buffer_thread
;
#endif
}
UDPContext
;
}
UDPContext
;
#define UDP_TX_BUF_SIZE 32768
#define UDP_TX_BUF_SIZE 32768
...
@@ -505,6 +511,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
...
@@ -505,6 +511,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
s
->
udp_fd
=
udp_fd
;
s
->
udp_fd
=
udp_fd
;
#if HAVE_PTHREADS
if
(
!
is_output
&&
s
->
circular_buffer_size
)
{
if
(
!
is_output
&&
s
->
circular_buffer_size
)
{
/* start the task going */
/* start the task going */
s
->
fifo
=
av_fifo_alloc
(
s
->
circular_buffer_size
);
s
->
fifo
=
av_fifo_alloc
(
s
->
circular_buffer_size
);
...
@@ -513,6 +520,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
...
@@ -513,6 +520,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
goto
fail
;
goto
fail
;
}
}
}
}
#endif
return
0
;
return
0
;
fail:
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