#ifndef MEDIA_VIDEO_CAPTURE_MAC_COREMEDIA_GLUE_H_
#define MEDIA_VIDEO_CAPTURE_MAC_COREMEDIA_GLUE_H_
#import <CoreVideo/CoreVideo.h>
#import <Foundation/Foundation.h>
#include "base/basictypes.h"
#include "media/base/media_export.h"
class MEDIA_EXPORT CoreMediaGlue {
public:
typedef int64_t CMTimeValue;
typedef int32_t CMTimeScale;
typedef int64_t CMTimeEpoch;
typedef uint32_t CMTimeFlags;
typedef struct {
CMTimeValue value;
CMTimeScale timescale;
CMTimeFlags flags;
CMTimeEpoch epoch;
} CMTime;
typedef const struct opaqueCMFormatDescription* CMFormatDescriptionRef;
typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef;
typedef struct {
int32_t width;
int32_t height;
} CMVideoDimensions;
enum {
kCMPixelFormat_422YpCbCr8_yuvs = 'yuvs',
};
enum {
kCMVideoCodecType_JPEG_OpenDML = 'dmb1',
};
typedef struct OpaqueCMSampleBuffer* CMSampleBufferRef;
static CMTime CMTimeMake(int64_t value, int32_t timescale);
static CVImageBufferRef CMSampleBufferGetImageBuffer(
CMSampleBufferRef buffer);
static FourCharCode CMFormatDescriptionGetMediaSubType(
CMFormatDescriptionRef desc);
static CMVideoDimensions CMVideoFormatDescriptionGetDimensions(
CMVideoFormatDescriptionRef videoDesc);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CoreMediaGlue);
};
#endif