Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
libav: transcode in HEVC - prologue
- setup HEVC ids for transcode
- allow HEVC stream in MPEGTS (afaik it is possible)
- close hevc bitstream filter on muxer destroy
- balk on SCT_NONE and SCT_UNKNOWN in codec enumeration
  • Loading branch information
lekma authored and perexg committed Sep 29, 2015
1 parent 0d15556 commit 4d47d33
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/libav.c
Expand Up @@ -81,6 +81,9 @@ streaming_component_type2codec_id(streaming_component_type_t type)
case SCT_VP9:
codec_id = AV_CODEC_ID_VP9;
break;
case SCT_HEVC:
codec_id = AV_CODEC_ID_HEVC;
break;
case SCT_AC3:
codec_id = AV_CODEC_ID_AC3;
break;
Expand Down Expand Up @@ -136,6 +139,9 @@ codec_id2streaming_component_type(enum AVCodecID id)
case AV_CODEC_ID_VP9:
type = SCT_VP9;
break;
case AV_CODEC_ID_HEVC:
type = SCT_HEVC;
break;
case AV_CODEC_ID_AC3:
type = SCT_AC3;
break;
Expand Down
4 changes: 4 additions & 0 deletions src/muxer/muxer_libav.c
Expand Up @@ -193,6 +193,7 @@ lav_muxer_support_stream(muxer_container_type_t mc,
case MC_MPEGTS:
ret |= (type == SCT_MPEG2VIDEO);
ret |= (type == SCT_H264);
ret |= (type == SCT_HEVC);

ret |= (type == SCT_MPEG2AUDIO);
ret |= (type == SCT_AC3);
Expand Down Expand Up @@ -528,6 +529,9 @@ lav_muxer_destroy(muxer_t *m)
if(lm->lm_h264_filter)
av_bitstream_filter_close(lm->lm_h264_filter);

if(lm->lm_hevc_filter)
av_bitstream_filter_close(lm->lm_hevc_filter);

if (lm->lm_oc) {
for(i=0; i<lm->lm_oc->nb_streams; i++)
av_freep(&lm->lm_oc->streams[i]->codec->extradata);
Expand Down
2 changes: 1 addition & 1 deletion src/plumbing/transcoding.c
Expand Up @@ -1917,7 +1917,7 @@ transcoder_get_capabilities(int experimental)
continue;

sct = codec_id2streaming_component_type(p->id);
if (sct == SCT_NONE)
if (sct == SCT_NONE || sct == SCT_UNKNOWN)
continue;

m = htsmsg_create_map();
Expand Down

0 comments on commit 4d47d33

Please sign in to comment.