Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
8dd5c1f2
Commit
8dd5c1f2
authored
3 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
rtp: remove hard-coded video/MP2T parser
parent
250b296c
No related branches found
Branches containing commit
No related tags found
1 merge request
!953
RTP MPEG 1/2 payload formats
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/access/rtp/rtpfmt.c
+2
-17
2 additions, 17 deletions
modules/access/rtp/rtpfmt.c
with
2 additions
and
17 deletions
modules/access/rtp/rtpfmt.c
+
2
−
17
View file @
8dd5c1f2
...
...
@@ -90,31 +90,19 @@ static const struct vlc_rtp_pt_operations rtp_audio_qcelp = {
NULL
,
qcelp_init
,
codec_destroy
,
codec_decode
,
};
/* PT=33
* MP2: MPEG TS (RFC2250, §2)
*/
static
void
*
ts_init
(
struct
vlc_rtp_pt
*
pt
)
{
return
vlc_rtp_pt_request_mux
(
pt
,
"ts"
);
}
static
const
struct
vlc_rtp_pt_operations
rtp_av_ts
=
{
NULL
,
ts_init
,
codec_destroy
,
codec_decode
,
};
/* Not using SDP, we need to guess the payload format used */
/* see http://www.iana.org/assignments/rtp-parameters */
void
rtp_autodetect
(
vlc_object_t
*
obj
,
rtp_session_t
*
session
,
const
struct
vlc_rtp_pt_owner
*
restrict
owner
)
{
char
type
[]
=
"audio"
,
proto
[]
=
"RTP/AVP"
;
char
format
[]
=
"0 3 8 10 11 12 14
33
"
;
char
format
[]
=
"0 3 8 10 11 12 14"
;
struct
vlc_sdp_media
media
=
{
.
type
=
type
,
.
port_count
=
1
,
.
proto
=
proto
,
.
format
=
format
};
vlc_rtp_add_media_types
(
obj
,
session
,
&
media
,
owner
);
strcpy
(
type
,
"video"
);
strcpy
(
format
,
"32"
);
strcpy
(
format
,
"32
33
"
);
vlc_rtp_add_media_types
(
obj
,
session
,
&
media
,
owner
);
}
...
...
@@ -152,9 +140,6 @@ static struct vlc_rtp_pt *vlc_rtp_pt_create(vlc_object_t *obj,
pt
->
ops
=
&
rtp_audio_qcelp
;
}
if
(
strcmp
(
desc
->
name
,
"MP2T"
)
==
0
)
pt
->
ops
=
&
rtp_av_ts
;
if
(
pt
->
ops
==
NULL
)
{
msg_Err
(
obj
,
"unsupported media type %s/%s"
,
desc
->
media
->
type
,
desc
->
name
);
...
...
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