Commit 39349f5c authored by Tony Vankrunkelsven's avatar Tony Vankrunkelsven Committed by Rémi Denis-Courmont

decode an RTP/H264 elementary stream without using SDP

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 02ada645
...@@ -431,7 +431,6 @@ static void codec_decode (demux_t *demux, void *data, block_t *block) ...@@ -431,7 +431,6 @@ static void codec_decode (demux_t *demux, void *data, block_t *block)
block_Release (block); block_Release (block);
} }
static void *stream_init (demux_t *demux, const char *name) static void *stream_init (demux_t *demux, const char *name)
{ {
return stream_DemuxNew (demux, name, demux->out); return stream_DemuxNew (demux, name, demux->out);
...@@ -454,6 +453,11 @@ static void stream_decode (demux_t *demux, void *data, block_t *block) ...@@ -454,6 +453,11 @@ static void stream_decode (demux_t *demux, void *data, block_t *block)
(void)demux; (void)demux;
} }
static void *demux_init (demux_t *demux)
{
return stream_init (demux, demux->psz_demux);
}
/* /*
* Static payload types handler * Static payload types handler
*/ */
...@@ -679,7 +683,22 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, ...@@ -679,7 +683,22 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
break; break;
default: default:
return -1; /*
* If the rtp payload type is unknown then check demux if it is specified
*/
if ((strcmp(demux->psz_demux, "h264") == 0) || (strcmp(demux->psz_demux, "ts") == 0))
{
msg_Dbg (demux, "rtp autodetect specified demux=%s", demux->psz_demux);
pt.init = demux_init;
pt.destroy = stream_destroy;
pt.decode = stream_decode;
pt.frequency = 90000;
break;
}
else
{
return -1;
}
} }
rtp_add_type (demux, session, &pt); rtp_add_type (demux, session, &pt);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment