34: mpImageGen( nullptr )
47 if( [[pMovie tracksWithMediaType:AVMediaTypeVideo]
count] == 0)
49 SAL_WARN(
"avmedia",
"AVGrabber::create() found no video content!" );
53 mpImageGen = [AVAssetImageGenerator assetImageGeneratorWithAsset:pMovie];
61 uno::Reference< graphic::XGraphic > xRet;
66 CGImage* pCGImage = [
mpImageGen copyCGImageAtTime:CMTimeMakeWithSeconds(fMediaTime,1000) actualTime:
nullptr error:
nullptr];
69 CFMutableDataRef pCFData = CFDataCreateMutable( kCFAllocatorDefault, 0 );
71 CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( pCFData, kUTTypeTIFF, 1,
nullptr );
73 CGImageDestinationAddImage( pCGImgDest, pCGImage,
nullptr );
74 CGImageDestinationFinalize( pCGImgDest );
75 CFRelease( pCGImgDest );
76 const CFIndex nBitmapLen = CFDataGetLength( pCFData );
77 UInt8 * pBitmapBytes =
const_cast<UInt8 *
>(CFDataGetBytePtr( pCFData ));
80 SvMemoryStream aMemStm( pBitmapBytes, nBitmapLen, StreamMode::READ | StreamMode::WRITE );
static ErrCode Import(SvStream &rIStm, Graphic &rGraphic, ConvertDataFormat nFormat=ConvertDataFormat::Unknown)
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
#define SAL_WARN(area, stream)
#define AVMEDIA_MACAVF_FRAMEGRABBER_IMPLEMENTATIONNAME
#define AVMEDIA_MACAVF_FRAMEGRABBER_SERVICENAME
#define SAL_WNODEPRECATED_DECLARATIONS_POP
#define SAL_WNODEPRECATED_DECLARATIONS_PUSH