MediaDataCodec.h (905B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifndef MEDIA_DATA_CODEC_H_ 6 #define MEDIA_DATA_CODEC_H_ 7 8 #include "MediaConduitInterface.h" 9 10 namespace mozilla { 11 12 class WebrtcVideoDecoder; 13 class WebrtcVideoEncoder; 14 class MediaDataCodec { 15 public: 16 /** 17 * Create encoder object for codec format |aFormat|. Return |nullptr| when 18 * failed. 19 */ 20 static WebrtcVideoEncoder* CreateEncoder( 21 const webrtc::SdpVideoFormat& aFormat); 22 23 /** 24 * Create decoder object for codec type |aCodecType|. Return |nullptr| when 25 * failed. 26 */ 27 static WebrtcVideoDecoder* CreateDecoder(webrtc::VideoCodecType aCodecType, 28 TrackingId aTrackingId); 29 }; 30 } // namespace mozilla 31 32 #endif // MEDIA_DATA_CODEC_H_