Add stereo codec header and pass it through RTP
- Defines CodecSpecificInfoStereo that carries stereo specific header info from encoded image. - Defines RTPVideoHeaderStereo that carries the above info to packetizer, see module_common_types.h. - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo header. - Uses new data containers in StereoAdapter classes. This CL is the step 3 for adding alpha channel support over the wire in webrtc. See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental CL that gives an idea about how it will come together. Design Doc: https://goo.gl/sFeSUT Bug: webrtc:7671 Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab Reviewed-on: https://webrtc-review.googlesource.com/22900 Reviewed-by: Emircan Uysaler <emircan@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org> Commit-Queue: Emircan Uysaler <emircan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20920}
This commit is contained in:
committed by
Commit Bot
parent
ceec4d0a97
commit
20f2133d5d
@ -12,6 +12,7 @@
|
||||
#define MODULES_VIDEO_CODING_CODECS_TEST_VIDEO_CODEC_TEST_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "api/video_codecs/video_decoder.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
@ -32,6 +33,7 @@ class VideoCodecTest : public ::testing::Test {
|
||||
decode_complete_callback_(this),
|
||||
encoded_frame_event_(false /* manual reset */,
|
||||
false /* initially signaled */),
|
||||
wait_for_encoded_frames_threshold_(1),
|
||||
decoded_frame_event_(false /* manual reset */,
|
||||
false /* initially signaled */) {}
|
||||
|
||||
@ -74,8 +76,19 @@ class VideoCodecTest : public ::testing::Test {
|
||||
|
||||
void SetUp() override;
|
||||
|
||||
// Helper method for waiting a single encoded frame.
|
||||
bool WaitForEncodedFrame(EncodedImage* frame,
|
||||
CodecSpecificInfo* codec_specific_info);
|
||||
|
||||
// Helper methods for waiting for multiple encoded frames. Caller must
|
||||
// define how many frames are to be waited for via |num_frames| before calling
|
||||
// Encode(). Then, they can expect to retrive them via WaitForEncodedFrames().
|
||||
void SetWaitForEncodedFramesThreshold(size_t num_frames);
|
||||
bool WaitForEncodedFrames(
|
||||
std::vector<EncodedImage>* frames,
|
||||
std::vector<CodecSpecificInfo>* codec_specific_info);
|
||||
|
||||
// Helper method for waiting a single decoded frame.
|
||||
bool WaitForDecodedFrame(std::unique_ptr<VideoFrame>* frame,
|
||||
rtc::Optional<uint8_t>* qp);
|
||||
|
||||
@ -95,9 +108,11 @@ class VideoCodecTest : public ::testing::Test {
|
||||
|
||||
rtc::Event encoded_frame_event_;
|
||||
rtc::CriticalSection encoded_frame_section_;
|
||||
rtc::Optional<EncodedImage> encoded_frame_
|
||||
size_t wait_for_encoded_frames_threshold_;
|
||||
std::vector<EncodedImage> encoded_frames_
|
||||
RTC_GUARDED_BY(encoded_frame_section_);
|
||||
std::vector<CodecSpecificInfo> codec_specific_infos_
|
||||
RTC_GUARDED_BY(encoded_frame_section_);
|
||||
CodecSpecificInfo codec_specific_info_ RTC_GUARDED_BY(encoded_frame_section_);
|
||||
|
||||
rtc::Event decoded_frame_event_;
|
||||
rtc::CriticalSection decoded_frame_section_;
|
||||
|
||||
Reference in New Issue
Block a user