зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1069277: Do not obfuscate AppleFrameRef to fix unified builds r=jesup
CLOSED TREE
This commit is contained in:
Родитель
8c30ba3274
Коммит
df253557b9
|
@ -125,37 +125,6 @@ AppleVDADecoder::Drain()
|
|||
// Implementation details.
|
||||
//
|
||||
|
||||
class AppleFrameRef {
|
||||
public:
|
||||
Microseconds decode_timestamp;
|
||||
Microseconds composition_timestamp;
|
||||
Microseconds duration;
|
||||
int64_t byte_offset;
|
||||
bool is_sync_point;
|
||||
|
||||
explicit AppleFrameRef(const mp4_demuxer::MP4Sample& aSample)
|
||||
: decode_timestamp(aSample.decode_timestamp)
|
||||
, composition_timestamp(aSample.composition_timestamp)
|
||||
, duration(aSample.duration)
|
||||
, byte_offset(aSample.byte_offset)
|
||||
, is_sync_point(aSample.is_sync_point)
|
||||
{
|
||||
}
|
||||
|
||||
AppleFrameRef(Microseconds aDts,
|
||||
Microseconds aPts,
|
||||
Microseconds aDuration,
|
||||
int64_t aByte_offset,
|
||||
bool aIs_sync_point)
|
||||
: decode_timestamp(aDts)
|
||||
, composition_timestamp(aPts)
|
||||
, duration(aDuration)
|
||||
, byte_offset(aByte_offset)
|
||||
, is_sync_point(aIs_sync_point)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Callback passed to the VideoToolbox decoder for returning data.
|
||||
// This needs to be static because the API takes a C-style pair of
|
||||
// function and userdata pointers. This validates parameters and
|
||||
|
@ -214,18 +183,19 @@ PlatformCallback(void* decompressionOutputRefCon,
|
|||
CFNumberGetValue(boref, kCFNumberSInt64Type, &byte_offset);
|
||||
CFNumberGetValue(kfref, kCFNumberSInt8Type, &is_sync_point);
|
||||
|
||||
nsAutoPtr<AppleFrameRef> frameRef(new AppleFrameRef(dts,
|
||||
pts,
|
||||
duration,
|
||||
byte_offset,
|
||||
is_sync_point == 1));
|
||||
nsAutoPtr<AppleVDADecoder::AppleFrameRef> frameRef(
|
||||
new AppleVDADecoder::AppleFrameRef(dts,
|
||||
pts,
|
||||
duration,
|
||||
byte_offset,
|
||||
is_sync_point == 1));
|
||||
|
||||
// Forward the data back to an object method which can access
|
||||
// the correct MP4Reader callback.
|
||||
decoder->OutputFrame(image, frameRef);
|
||||
}
|
||||
|
||||
AppleFrameRef*
|
||||
AppleVDADecoder::AppleFrameRef*
|
||||
AppleVDADecoder::CreateAppleFrameRef(const mp4_demuxer::MP4Sample* aSample)
|
||||
{
|
||||
MOZ_ASSERT(aSample);
|
||||
|
@ -251,7 +221,7 @@ AppleVDADecoder::ClearReorderedFrames()
|
|||
// Copy and return a decoded frame.
|
||||
nsresult
|
||||
AppleVDADecoder::OutputFrame(CVPixelBufferRef aImage,
|
||||
nsAutoPtr<AppleFrameRef> aFrameRef)
|
||||
nsAutoPtr<AppleVDADecoder::AppleFrameRef> aFrameRef)
|
||||
{
|
||||
IOSurfacePtr surface = MacIOSurfaceLib::CVPixelBufferGetIOSurface(aImage);
|
||||
MOZ_ASSERT(surface, "Decoder didn't return an IOSurface backed buffer");
|
||||
|
|
|
@ -25,10 +25,39 @@ namespace layers {
|
|||
class ImageContainer;
|
||||
}
|
||||
|
||||
class AppleFrameRef;
|
||||
|
||||
class AppleVDADecoder : public MediaDataDecoder {
|
||||
public:
|
||||
class AppleFrameRef {
|
||||
public:
|
||||
Microseconds decode_timestamp;
|
||||
Microseconds composition_timestamp;
|
||||
Microseconds duration;
|
||||
int64_t byte_offset;
|
||||
bool is_sync_point;
|
||||
|
||||
explicit AppleFrameRef(const mp4_demuxer::MP4Sample& aSample)
|
||||
: decode_timestamp(aSample.decode_timestamp)
|
||||
, composition_timestamp(aSample.composition_timestamp)
|
||||
, duration(aSample.duration)
|
||||
, byte_offset(aSample.byte_offset)
|
||||
, is_sync_point(aSample.is_sync_point)
|
||||
{
|
||||
}
|
||||
|
||||
AppleFrameRef(Microseconds aDts,
|
||||
Microseconds aPts,
|
||||
Microseconds aDuration,
|
||||
int64_t aByte_offset,
|
||||
bool aIs_sync_point)
|
||||
: decode_timestamp(aDts)
|
||||
, composition_timestamp(aPts)
|
||||
, duration(aDuration)
|
||||
, byte_offset(aByte_offset)
|
||||
, is_sync_point(aIs_sync_point)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Return a new created AppleVDADecoder or nullptr if media or hardware is
|
||||
// not supported by current configuration.
|
||||
static already_AddRefed<AppleVDADecoder> CreateVDADecoder(
|
||||
|
|
|
@ -157,8 +157,8 @@ PlatformCallback(void* decompressionOutputRefCon,
|
|||
|
||||
AppleVTDecoder* decoder =
|
||||
static_cast<AppleVTDecoder*>(decompressionOutputRefCon);
|
||||
nsAutoPtr<AppleFrameRef> frameRef =
|
||||
nsAutoPtr<AppleFrameRef>(static_cast<AppleFrameRef*>(sourceFrameRefCon));
|
||||
nsAutoPtr<AppleVTDecoder::AppleFrameRef> frameRef(
|
||||
static_cast<AppleVTDecoder::AppleFrameRef*>(sourceFrameRefCon));
|
||||
|
||||
// Validate our arguments.
|
||||
if (status != noErr || !image) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче