Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
183baead
Commit
183baead
authored
Feb 05, 2011
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: Add the https protocol
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
558d192d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
5 deletions
+30
-5
Changelog
Changelog
+1
-0
configure
configure
+1
-0
Makefile
libavformat/Makefile
+1
-0
allformats.c
libavformat/allformats.c
+1
-0
http.c
libavformat/http.c
+25
-4
version.h
libavformat/version.h
+1
-1
No files found.
Changelog
View file @
183baead
...
@@ -57,6 +57,7 @@ easier to use. The changes are:
...
@@ -57,6 +57,7 @@ easier to use. The changes are:
- 4:2:2 H.264 decoding support
- 4:2:2 H.264 decoding support
- Pulseaudio input device
- Pulseaudio input device
- replacement Indeo 3 decoder
- replacement Indeo 3 decoder
- TLS/SSL and HTTPS protocol support
version 0.7:
version 0.7:
...
...
configure
View file @
183baead
...
@@ -1478,6 +1478,7 @@ x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
...
@@ -1478,6 +1478,7 @@ x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
gopher_protocol_deps
=
"network"
gopher_protocol_deps
=
"network"
http_protocol_deps
=
"network"
http_protocol_deps
=
"network"
http_protocol_select
=
"tcp_protocol"
http_protocol_select
=
"tcp_protocol"
https_protocol_select
=
"tls_protocol"
mmsh_protocol_select
=
"http_protocol"
mmsh_protocol_select
=
"http_protocol"
mmst_protocol_deps
=
"network"
mmst_protocol_deps
=
"network"
rtmp_protocol_select
=
"tcp_protocol"
rtmp_protocol_select
=
"tcp_protocol"
...
...
libavformat/Makefile
View file @
183baead
...
@@ -322,6 +322,7 @@ OBJS-$(CONFIG_CRYPTO_PROTOCOL) += crypto.o
...
@@ -322,6 +322,7 @@ OBJS-$(CONFIG_CRYPTO_PROTOCOL) += crypto.o
OBJS-$(CONFIG_FILE_PROTOCOL)
+=
file.o
OBJS-$(CONFIG_FILE_PROTOCOL)
+=
file.o
OBJS-$(CONFIG_GOPHER_PROTOCOL)
+=
gopher.o
OBJS-$(CONFIG_GOPHER_PROTOCOL)
+=
gopher.o
OBJS-$(CONFIG_HTTP_PROTOCOL)
+=
http.o
httpauth.o
OBJS-$(CONFIG_HTTP_PROTOCOL)
+=
http.o
httpauth.o
OBJS-$(CONFIG_HTTPS_PROTOCOL)
+=
http.o
httpauth.o
OBJS-$(CONFIG_MMSH_PROTOCOL)
+=
mmsh.o
mms.o
asf.o
OBJS-$(CONFIG_MMSH_PROTOCOL)
+=
mmsh.o
mms.o
asf.o
OBJS-$(CONFIG_MMST_PROTOCOL)
+=
mmst.o
mms.o
asf.o
OBJS-$(CONFIG_MMST_PROTOCOL)
+=
mmst.o
mms.o
asf.o
OBJS-$(CONFIG_MD5_PROTOCOL)
+=
md5proto.o
OBJS-$(CONFIG_MD5_PROTOCOL)
+=
md5proto.o
...
...
libavformat/allformats.c
View file @
183baead
...
@@ -241,6 +241,7 @@ void av_register_all(void)
...
@@ -241,6 +241,7 @@ void av_register_all(void)
REGISTER_PROTOCOL
(
FILE
,
file
);
REGISTER_PROTOCOL
(
FILE
,
file
);
REGISTER_PROTOCOL
(
GOPHER
,
gopher
);
REGISTER_PROTOCOL
(
GOPHER
,
gopher
);
REGISTER_PROTOCOL
(
HTTP
,
http
);
REGISTER_PROTOCOL
(
HTTP
,
http
);
REGISTER_PROTOCOL
(
HTTPS
,
https
);
REGISTER_PROTOCOL
(
MMSH
,
mmsh
);
REGISTER_PROTOCOL
(
MMSH
,
mmsh
);
REGISTER_PROTOCOL
(
MMST
,
mmst
);
REGISTER_PROTOCOL
(
MMST
,
mmst
);
REGISTER_PROTOCOL
(
MD5
,
md5
);
REGISTER_PROTOCOL
(
MD5
,
md5
);
...
...
libavformat/http.c
View file @
183baead
...
@@ -92,8 +92,8 @@ void ff_http_init_auth_state(URLContext *dest, const URLContext *src)
...
@@ -92,8 +92,8 @@ void ff_http_init_auth_state(URLContext *dest, const URLContext *src)
/* return non zero if error */
/* return non zero if error */
static
int
http_open_cnx
(
URLContext
*
h
)
static
int
http_open_cnx
(
URLContext
*
h
)
{
{
const
char
*
path
,
*
proxy_path
;
const
char
*
path
,
*
proxy_path
,
*
lower_proto
=
"tcp"
;
char
hostname
[
1024
],
hoststr
[
1024
];
char
hostname
[
1024
],
hoststr
[
1024
]
,
proto
[
10
]
;
char
auth
[
1024
];
char
auth
[
1024
];
char
path1
[
1024
];
char
path1
[
1024
];
char
buf
[
1024
];
char
buf
[
1024
];
...
@@ -109,7 +109,8 @@ static int http_open_cnx(URLContext *h)
...
@@ -109,7 +109,8 @@ static int http_open_cnx(URLContext *h)
/* fill the dest addr */
/* fill the dest addr */
redo:
redo:
/* needed in any case to build the host string */
/* needed in any case to build the host string */
av_url_split
(
NULL
,
0
,
auth
,
sizeof
(
auth
),
hostname
,
sizeof
(
hostname
),
&
port
,
av_url_split
(
proto
,
sizeof
(
proto
),
auth
,
sizeof
(
auth
),
hostname
,
sizeof
(
hostname
),
&
port
,
path1
,
sizeof
(
path1
),
s
->
location
);
path1
,
sizeof
(
path1
),
s
->
location
);
ff_url_join
(
hoststr
,
sizeof
(
hoststr
),
NULL
,
NULL
,
hostname
,
port
,
NULL
);
ff_url_join
(
hoststr
,
sizeof
(
hoststr
),
NULL
,
NULL
,
hostname
,
port
,
NULL
);
...
@@ -123,10 +124,15 @@ static int http_open_cnx(URLContext *h)
...
@@ -123,10 +124,15 @@ static int http_open_cnx(URLContext *h)
else
else
path
=
path1
;
path
=
path1
;
}
}
if
(
!
strcmp
(
proto
,
"https"
))
{
lower_proto
=
"tls"
;
if
(
port
<
0
)
port
=
443
;
}
if
(
port
<
0
)
if
(
port
<
0
)
port
=
80
;
port
=
80
;
ff_url_join
(
buf
,
sizeof
(
buf
),
"tcp"
,
NULL
,
hostname
,
port
,
NULL
);
ff_url_join
(
buf
,
sizeof
(
buf
),
lower_proto
,
NULL
,
hostname
,
port
,
NULL
);
err
=
ffurl_open
(
&
hd
,
buf
,
AVIO_FLAG_READ_WRITE
);
err
=
ffurl_open
(
&
hd
,
buf
,
AVIO_FLAG_READ_WRITE
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
fail
;
goto
fail
;
...
@@ -509,6 +515,7 @@ http_get_file_handle(URLContext *h)
...
@@ -509,6 +515,7 @@ http_get_file_handle(URLContext *h)
return
ffurl_get_file_handle
(
s
->
hd
);
return
ffurl_get_file_handle
(
s
->
hd
);
}
}
#if CONFIG_HTTP_PROTOCOL
URLProtocol
ff_http_protocol
=
{
URLProtocol
ff_http_protocol
=
{
.
name
=
"http"
,
.
name
=
"http"
,
.
url_open
=
http_open
,
.
url_open
=
http_open
,
...
@@ -520,3 +527,17 @@ URLProtocol ff_http_protocol = {
...
@@ -520,3 +527,17 @@ URLProtocol ff_http_protocol = {
.
priv_data_size
=
sizeof
(
HTTPContext
),
.
priv_data_size
=
sizeof
(
HTTPContext
),
.
priv_data_class
=
&
httpcontext_class
,
.
priv_data_class
=
&
httpcontext_class
,
};
};
#endif
#if CONFIG_HTTPS_PROTOCOL
URLProtocol
ff_https_protocol
=
{
.
name
=
"https"
,
.
url_open
=
http_open
,
.
url_read
=
http_read
,
.
url_write
=
http_write
,
.
url_seek
=
http_seek
,
.
url_close
=
http_close
,
.
url_get_file_handle
=
http_get_file_handle
,
.
priv_data_size
=
sizeof
(
HTTPContext
),
.
priv_data_class
=
&
httpcontext_class
,
};
#endif
libavformat/version.h
View file @
183baead
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "libavutil/avutil.h"
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 53
#define LIBAVFORMAT_VERSION_MAJOR 53
#define LIBAVFORMAT_VERSION_MINOR 1
1
#define LIBAVFORMAT_VERSION_MINOR 1
2
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
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