2015-12-08 13:27:58 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "OmxDecoderModule.h"
|
2016-01-26 20:59:00 +03:00
|
|
|
|
2015-12-08 13:27:58 +03:00
|
|
|
#include "OmxDataDecoder.h"
|
2016-01-26 20:59:00 +03:00
|
|
|
#include "OmxPlatformLayer.h"
|
2015-12-08 13:27:58 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
already_AddRefed<MediaDataDecoder>
|
|
|
|
OmxDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
|
|
|
|
mozilla::layers::LayersBackend aLayersBackend,
|
|
|
|
mozilla::layers::ImageContainer* aImageContainer,
|
2016-05-19 12:50:31 +03:00
|
|
|
TaskQueue* aTaskQueue,
|
2016-04-19 10:36:19 +03:00
|
|
|
MediaDataDecoderCallback* aCallback,
|
|
|
|
DecoderDoctorDiagnostics* aDiagnostics)
|
2015-12-08 13:27:58 +03:00
|
|
|
{
|
2016-01-08 14:24:00 +03:00
|
|
|
RefPtr<OmxDataDecoder> decoder = new OmxDataDecoder(aConfig, aCallback, aImageContainer);
|
|
|
|
return decoder.forget();
|
2015-12-08 13:27:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<MediaDataDecoder>
|
|
|
|
OmxDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
|
2016-05-19 12:50:31 +03:00
|
|
|
TaskQueue* aTaskQueue,
|
2016-04-19 10:36:19 +03:00
|
|
|
MediaDataDecoderCallback* aCallback,
|
|
|
|
DecoderDoctorDiagnostics* aDiagnostics)
|
2015-12-08 13:27:58 +03:00
|
|
|
{
|
2016-01-08 14:24:00 +03:00
|
|
|
RefPtr<OmxDataDecoder> decoder = new OmxDataDecoder(aConfig, aCallback, nullptr);
|
2015-12-08 13:27:58 +03:00
|
|
|
return decoder.forget();
|
|
|
|
}
|
|
|
|
|
|
|
|
PlatformDecoderModule::ConversionRequired
|
|
|
|
OmxDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
|
|
|
|
{
|
|
|
|
return kNeedNone;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2016-04-19 10:36:19 +03:00
|
|
|
OmxDecoderModule::SupportsMimeType(const nsACString& aMimeType,
|
|
|
|
DecoderDoctorDiagnostics* aDiagnostics) const
|
2015-12-08 13:27:58 +03:00
|
|
|
{
|
2016-01-26 20:59:00 +03:00
|
|
|
return OmxPlatformLayer::SupportsMimeType(aMimeType);
|
2015-12-08 13:27:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|