Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
12127b65
Commit
12127b65
authored
12 years ago
by
Samuel Pitoiset
Committed by
Martin Storsjö
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rtmp: Factorize simultaneous URLProtocol / AVClass declarations with a macro
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
ec9d2c15
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/rtmpproto.c
+23
-104
23 additions, 104 deletions
libavformat/rtmpproto.c
with
23 additions
and
104 deletions
libavformat/rtmpproto.c
+
23
−
104
View file @
12127b65
...
...
@@ -1598,110 +1598,29 @@ static const AVOption rtmp_options[] = {
{
NULL
},
};
static
const
AVClass
rtmp_class
=
{
.
class_name
=
"rtmp"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
#define RTMP_PROTOCOL(flavor) \
static const AVClass flavor##_class = { \
.class_name = #flavor, \
.item_name = av_default_item_name, \
.option = rtmp_options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
\
URLProtocol ff_##flavor##_protocol = { \
.name = #flavor, \
.url_open = rtmp_open, \
.url_read = rtmp_read, \
.url_write = rtmp_write, \
.url_close = rtmp_close, \
.priv_data_size = sizeof(RTMPContext), \
.flags = URL_PROTOCOL_FLAG_NETWORK, \
.priv_data_class= &flavor##_class, \
};
URLProtocol
ff_rtmp_protocol
=
{
.
name
=
"rtmp"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmp_class
,
};
static
const
AVClass
rtmpe_class
=
{
.
class_name
=
"rtmpe"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
URLProtocol
ff_rtmpe_protocol
=
{
.
name
=
"rtmpe"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmpe_class
,
};
static
const
AVClass
rtmps_class
=
{
.
class_name
=
"rtmps"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
URLProtocol
ff_rtmps_protocol
=
{
.
name
=
"rtmps"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmps_class
,
};
static
const
AVClass
rtmpt_class
=
{
.
class_name
=
"rtmpt"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
URLProtocol
ff_rtmpt_protocol
=
{
.
name
=
"rtmpt"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmpt_class
,
};
static
const
AVClass
rtmpte_class
=
{
.
class_name
=
"rtmpte"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
URLProtocol
ff_rtmpte_protocol
=
{
.
name
=
"rtmpte"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmpte_class
,
};
static
const
AVClass
rtmpts_class
=
{
.
class_name
=
"rtmpts"
,
.
item_name
=
av_default_item_name
,
.
option
=
rtmp_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
URLProtocol
ff_rtmpts_protocol
=
{
.
name
=
"rtmpts"
,
.
url_open
=
rtmp_open
,
.
url_read
=
rtmp_read
,
.
url_write
=
rtmp_write
,
.
url_close
=
rtmp_close
,
.
priv_data_size
=
sizeof
(
RTMPContext
),
.
flags
=
URL_PROTOCOL_FLAG_NETWORK
,
.
priv_data_class
=
&
rtmpts_class
,
};
RTMP_PROTOCOL
(
rtmp
)
RTMP_PROTOCOL
(
rtmpe
)
RTMP_PROTOCOL
(
rtmps
)
RTMP_PROTOCOL
(
rtmpt
)
RTMP_PROTOCOL
(
rtmpte
)
RTMP_PROTOCOL
(
rtmpts
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment