未验证 提交 909451ef 编写于 作者: O openharmony_ci 提交者: Gitee

!6670 录制编解码对外格式统一化后用例对应修改

Merge pull request !6670 from FULIZHONG/1124master
......@@ -64,17 +64,17 @@ export async function stopCaptureSession(captureSession) {
export function getTrackArray(videoType, recorderConfigFile, sourceType) {
if (videoType == AUDIO_VIDEO_TYPE) {
let audioTrack = new Array(recorderConfigFile.audioBitrate, recorderConfigFile.audioChannels,
'audio/mpeg', recorderConfigFile.audioSampleRate);
'audio/mp4a-latm', recorderConfigFile.audioSampleRate);
let videoTrack = null;
if (sourceType == media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_ES) {
videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
} else {
if (recorderConfigFile.videoCodec == 'video/avc') {
videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
} else {
videoTrack = new Array('video/mpeg', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/mp4v-es', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
}
}
......@@ -83,14 +83,14 @@ export function getTrackArray(videoType, recorderConfigFile, sourceType) {
} else if (videoType == ONLYVIDEO_TYPE) {
let videoTrack = null;
if (sourceType == media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_ES) {
videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
} else {
if (recorderConfigFile.videoCodec == 'video/avc') {
videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
} else {
videoTrack = new Array('video/mpeg', recorderConfigFile.videoFrameHeight,
videoTrack = new Array('video/mp4v-es', recorderConfigFile.videoFrameHeight,
recorderConfigFile.videoFrameWidth);
}
}
......@@ -98,7 +98,7 @@ export function getTrackArray(videoType, recorderConfigFile, sourceType) {
return trackArray;
} else {
let audioTrack = new Array(recorderConfigFile.audioEncodeBitRate, recorderConfigFile.numberOfChannels,
'audio/mpeg', recorderConfigFile.audioSampleRate);
'audio/mp4a-latm', recorderConfigFile.audioSampleRate);
let trackArray = new Array(audioTrack);
return trackArray;
}
......
......@@ -236,8 +236,8 @@ describe('VideoPlayerFuncCallbackTest', function () {
'track_index', 'track_type', 'width');
let audioTrackKey = new Array('bitrate', 'channel_count', 'codec_mime', 'sample_rate',
'track_index', 'track_type');
let videoTrackValue = new Array(1366541, 'video/x-h264', 6000, 480, 0, 1, 720);
let audioTrackValue = new Array(129207, 2, 'audio/mpeg', 44100, 1, 0);
let videoTrackValue = new Array(1366541, 'video/avc', 6000, 480, 0, 1, 720);
let audioTrackValue = new Array(129207, 2, 'audio/mp4a-latm', 44100, 1, 0);
let descriptionKey = new Array(videoTrackKey, audioTrackKey);
let descriptionValue = new Array(videoTrackValue, audioTrackValue);
videoPlayer.getTrackDescription((err, arrlist) => {
......
......@@ -480,8 +480,8 @@ describe('VideoPlayerFuncPromiseTest', function () {
'track_index', 'track_type', 'width');
let audioTrackKey = new Array('bitrate', 'channel_count', 'codec_mime', 'sample_rate',
'track_index', 'track_type');
let videoTrackValue = new Array(1366541, 'video/x-h264', 6000, 480, 0, 1, 720);
let audioTrackValue = new Array(129207, 2, 'audio/mpeg', 44100, 1, 0);
let videoTrackValue = new Array(1366541, 'video/avc', 6000, 480, 0, 1, 720);
let audioTrackValue = new Array(129207, 2, 'audio/mp4a-latm', 44100, 1, 0);
let descriptionKey = new Array(videoTrackKey, audioTrackKey);
let descriptionValue = new Array(videoTrackValue, audioTrackValue);
await media.createVideoPlayer().then((video) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册