mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Set luma and chroma bit depths in Format from Rtsp
This commit is contained in:
parent
fc61d96d5c
commit
d454bd0601
1 changed files with 8 additions and 0 deletions
|
|
@ -421,6 +421,10 @@ import com.google.common.collect.ImmutableMap;
|
||||||
formatBuilder.setPixelWidthHeightRatio(spsData.pixelWidthHeightRatio);
|
formatBuilder.setPixelWidthHeightRatio(spsData.pixelWidthHeightRatio);
|
||||||
formatBuilder.setHeight(spsData.height);
|
formatBuilder.setHeight(spsData.height);
|
||||||
formatBuilder.setWidth(spsData.width);
|
formatBuilder.setWidth(spsData.width);
|
||||||
|
int bitdepthLuma = spsData.bitDepthLumaMinus8 + 8;
|
||||||
|
formatBuilder.setLumaBitdepth(bitdepthLuma);
|
||||||
|
int bitdepthChroma = spsData.bitDepthChromaMinus8 + 8;
|
||||||
|
formatBuilder.setChromaBitdepth(bitdepthChroma);
|
||||||
|
|
||||||
@Nullable String profileLevel = fmtpAttributes.get(PARAMETER_PROFILE_LEVEL_ID);
|
@Nullable String profileLevel = fmtpAttributes.get(PARAMETER_PROFILE_LEVEL_ID);
|
||||||
if (profileLevel != null) {
|
if (profileLevel != null) {
|
||||||
|
|
@ -464,6 +468,10 @@ import com.google.common.collect.ImmutableMap;
|
||||||
spsNalDataWithStartCode, NAL_START_CODE.length, spsNalDataWithStartCode.length);
|
spsNalDataWithStartCode, NAL_START_CODE.length, spsNalDataWithStartCode.length);
|
||||||
formatBuilder.setPixelWidthHeightRatio(spsData.pixelWidthHeightRatio);
|
formatBuilder.setPixelWidthHeightRatio(spsData.pixelWidthHeightRatio);
|
||||||
formatBuilder.setHeight(spsData.height).setWidth(spsData.width);
|
formatBuilder.setHeight(spsData.height).setWidth(spsData.width);
|
||||||
|
int bitdepthLuma = spsData.bitDepthLumaMinus8 + 8;
|
||||||
|
formatBuilder.setLumaBitdepth(bitdepthLuma);
|
||||||
|
int bitdepthChroma = spsData.bitDepthChromaMinus8 + 8;
|
||||||
|
formatBuilder.setChromaBitdepth(bitdepthChroma);
|
||||||
|
|
||||||
formatBuilder.setCodecs(
|
formatBuilder.setCodecs(
|
||||||
CodecSpecificDataUtil.buildHevcCodecString(
|
CodecSpecificDataUtil.buildHevcCodecString(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue