changeset 36379:847bc950322a

Support HEVC in native mpeg-ts demuxer.
author cehoyos
date Thu, 17 Oct 2013 09:55:57 +0000
parents 939ec5ba0c58
children fd2f66e5d7c9
files libmpdemux/demux_ts.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Thu Oct 17 09:47:42 2013 +0000
+++ b/libmpdemux/demux_ts.c	Thu Oct 17 09:55:57 2013 +0000
@@ -73,6 +73,7 @@
 	VIDEO_H264 	= 0x10000005,
 	VIDEO_AVC	= mmioFOURCC('a', 'v', 'c', '1'),
 	VIDEO_DIRAC	= mmioFOURCC('d', 'r', 'a', 'c'),
+	VIDEO_HEVC	= mmioFOURCC('H', 'E', 'V', 'C'),
 	VIDEO_VC1	= mmioFOURCC('W', 'V', 'C', '1'),
 	AUDIO_MP2   	= 0x50,
 	AUDIO_A52   	= 0x2000,
@@ -279,6 +280,7 @@
 	case VIDEO_H264:
 	case VIDEO_AVC:
 	case VIDEO_DIRAC:
+	case VIDEO_HEVC:
 	case VIDEO_VC1:
 		return 1;
 	}
@@ -877,6 +879,8 @@
 			mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO VC1(pid=%d) ", param->vpid);
 		else if(param->vtype == VIDEO_AVC)
 			mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO AVC(NAL-H264, pid=%d) ", param->vpid);
+		else if(param->vtype == VIDEO_HEVC)
+			mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO HEVC(pid=%d) ", param->vpid);
 	}
 	else
 	{
@@ -2367,6 +2371,10 @@
 				{
 					es->type = AUDIO_S302M;
 				}
+				else if(d[0] == 'H' && d[1] == 'E' && d[2] == 'V' && d[3] == 'C')
+				{
+					es->type = VIDEO_HEVC;
+				}
 				else
 					es->type = UNKNOWN;
 				mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor);
@@ -3328,6 +3336,8 @@
 			break;
 		else if(sh_video->format == VIDEO_VC1 && (i==0x10E || i==0x10F))
 			break;
+		else if(sh_video->format == VIDEO_HEVC)
+			break;
 		else	//H264
 		{
 			if((i & ~0x60) == 0x105 || (i & ~0x60) == 0x107) break;