mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 23:30:48 +01:00
Use **** code for codec of unknown type
This allows dumping kVideoCodecGeneric to IVF. Bug: none Change-Id: I71ae5f11dc226f68aa60e4423556feb1af96d11c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226865 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34543}
This commit is contained in:
parent
fd3b97c5d2
commit
d4b087c6cf
2 changed files with 12 additions and 2 deletions
|
@ -88,8 +88,13 @@ bool IvfFileWriter::WriteHeader() {
|
||||||
ivf_header[11] = '4';
|
ivf_header[11] = '4';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RTC_LOG(LS_ERROR) << "Unknown CODEC type: " << codec_type_;
|
// For unknown codec type use **** code. You can specify actual payload
|
||||||
return false;
|
// format when playing the video with ffplay: ffplay -f H263 file.ivf
|
||||||
|
ivf_header[8] = '*';
|
||||||
|
ivf_header[9] = '*';
|
||||||
|
ivf_header[10] = '*';
|
||||||
|
ivf_header[11] = '*';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteWriter<uint16_t>::WriteLittleEndian(&ivf_header[12], width_);
|
ByteWriter<uint16_t>::WriteLittleEndian(&ivf_header[12], width_);
|
||||||
|
|
|
@ -167,6 +167,11 @@ TEST_F(IvfFileWriterTest, WritesBasicH264FileMsTimestamp) {
|
||||||
RunBasicFileStructureTest(kVideoCodecH264, fourcc, true);
|
RunBasicFileStructureTest(kVideoCodecH264, fourcc, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(IvfFileWriterTest, WritesBasicUnknownCodecFileMsTimestamp) {
|
||||||
|
const uint8_t fourcc[4] = {'*', '*', '*', '*'};
|
||||||
|
RunBasicFileStructureTest(kVideoCodecGeneric, fourcc, true);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(IvfFileWriterTest, ClosesWhenReachesLimit) {
|
TEST_F(IvfFileWriterTest, ClosesWhenReachesLimit) {
|
||||||
const uint8_t fourcc[4] = {'V', 'P', '8', '0'};
|
const uint8_t fourcc[4] = {'V', 'P', '8', '0'};
|
||||||
const int kWidth = 320;
|
const int kWidth = 320;
|
||||||
|
|
Loading…
Reference in a new issue