| Index: talk/app/webrtc/objc/h264encoderfactory.h
|
| diff --git a/talk/app/webrtc/java/jni/androidmediaencoder_jni.h b/talk/app/webrtc/objc/h264encoderfactory.h
|
| similarity index 64%
|
| copy from talk/app/webrtc/java/jni/androidmediaencoder_jni.h
|
| copy to talk/app/webrtc/objc/h264encoderfactory.h
|
| index ff124aa1469b16816a6eaf9b4991b22a2e8977ee..a6573480d8c2b0f30e2f0ea787721a4122c894bc 100644
|
| --- a/talk/app/webrtc/java/jni/androidmediaencoder_jni.h
|
| +++ b/talk/app/webrtc/objc/h264encoderfactory.h
|
| @@ -23,37 +23,38 @@
|
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
| * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
| * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| - *
|
| */
|
|
|
| -#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
|
| -#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
|
| +#ifndef TALK_APP_WEBRTC_OBJC_H264_ENCODER_FACTORY_H_
|
| +#define TALK_APP_WEBRTC_OBJC_H264_ENCODER_FACTORY_H_
|
|
|
| #include <vector>
|
|
|
| -#include "talk/app/webrtc/java/jni/jni_helpers.h"
|
| #include "talk/media/webrtc/webrtcvideoencoderfactory.h"
|
| +#include "webrtc/base/constructormagic.h"
|
|
|
| -namespace webrtc_jni {
|
| +namespace webrtc {
|
|
|
| -// Implementation of Android MediaCodec based encoder factory.
|
| -class MediaCodecVideoEncoderFactory
|
| - : public cricket::WebRtcVideoEncoderFactory {
|
| +// This classes is a quick measure for plugging in H264 support and will
|
| +// eventually go away once we build H264 support into the video engine.
|
| +class H264EncoderFactory : public cricket::WebRtcVideoEncoderFactory {
|
| public:
|
| - MediaCodecVideoEncoderFactory();
|
| - virtual ~MediaCodecVideoEncoderFactory();
|
| -
|
| - // WebRtcVideoEncoderFactory implementation.
|
| - webrtc::VideoEncoder* CreateVideoEncoder(webrtc::VideoCodecType type)
|
| - override;
|
| + H264EncoderFactory();
|
| + ~H264EncoderFactory() override {}
|
| + webrtc::VideoEncoder* CreateVideoEncoder(
|
| + webrtc::VideoCodecType type) override;
|
| const std::vector<VideoCodec>& codecs() const override;
|
| void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override;
|
|
|
| private:
|
| - // Empty if platform support is lacking, const after ctor returns.
|
| - std::vector<VideoCodec> supported_codecs_;
|
| + // On construction we check that we are able to create a H264 encoder. If we
|
| + // can then this vector is populated with just the H264 codec, otherwise it
|
| + // will be empty. This vector is returned in the codecs() method.
|
| + std::vector<VideoCodec> h264_codec_or_empty_vector_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(H264EncoderFactory);
|
| };
|
|
|
| -} // namespace webrtc_jni
|
| +} // namespace webrtc
|
|
|
| -#endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
|
| +#endif // TALK_APP_WEBRTC_OBJC_H264_ENCODER_FACTORY_H_
|
|
|