TuSDKMediaTimelineAssetMoviePlayer Class Reference

Inherits from NSObject
Conforms to TuSDKMediaPlayer
TuSDKMediaTimeline
Declared in TuSDKMediaTimelineAssetMoviePlayer.h

Overview

视频播放器

Other Methods

– initWithAsset:preview:

构建一个视频播放器

- (instancetype _Nullable)initWithAsset:(AVAsset *_Nonnull)asset preview:(UIView *_Nonnull)preview

Parameters

asset

资产信息

preview

预览视图

Return Value

TuSDKMediaAssetMoviePlayer

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  asset

TuSDKAssetVideoPlayer

@property (strong, readonly) AVAsset *asset

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  enableAudioSound

是否播放音频 默认:YES

@property (nonatomic) BOOL enableAudioSound

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  regionViewColor

视频覆盖区域颜色 (默认:[UIColor blackColor])

@property (nonatomic, retain) UIColor *regionViewColor

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  processQueue

@property processQueue @discussion Decoding run queue

@property (nonatomic) dispatch_queue_t _Nullable processQueue

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  status

当前视频播放器状态

@property (nonatomic, readonly) TuSDKMediaPlayerStatus status

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  inputAssetInfo

获取视频信息,视频加载完成后可用

@property (nonatomic, readonly) TuSDKMediaAssetInfo *inputAssetInfo

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  videoRender

视频外部渲染接口

@property (nonatomic, weak) id<TuSDKMediaVideoRender> _Nullable videoRender

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  audioRender

音频外部渲染接口

@property (nonatomic, weak) id<TuSDKMediaAudioRender> _Nullable audioRender

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  delegate

Player 进度委托

@property (nonatomic, weak) id<TuSDKMediaTimelineAssetMoviePlayerDelegate> _Nullable delegate

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  videoComposition

客户端可以通过实现AVVideoCompositing协议实现自己的自定义视频合成;自定义视频合成程序在回放和其他操作期间为其每个视频源提供像素缓冲区,并可以对其执行任意图形操作以产生可视输出。

@property (nonatomic) AVVideoComposition *videoComposition

Availability

v3.0.1

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  preferredOutputSize

首选输出尺寸

@property (nonatomic, readonly) CGSize preferredOutputSize

Availability

v3.0.1

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  previewSize

预览宽高

@property (nonatomic) CGSize previewSize

Availability

3.4.2

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

  aspectPreviewRatioInSideCanvas

输出比例与原视频比例不一致时是否自适应画布大小

@property (nonatomic) BOOL aspectPreviewRatioInSideCanvas

Availability

3.4.2

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– updatePreViewFrame:

更新预览View

- (void)updatePreViewFrame:(CGRect)frame

Parameters

frame

设定的frame

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

MediaTimelineSlice Methods

– playingSlice

当前正在播放的媒体数据片段

- (TuSDKMediaTimeSliceEntity *_Nullable)playingSlice

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– findSliceEntityWithSlice:

根据原始时间切片查找切片计算实体对象

- (TuSDKMediaTimeSliceEntity *_Nullable)findSliceEntityWithSlice:(TuSDKMediaTimelineSlice *_Nonnull)timeSlice

Parameters

timeSlice

时间切片

Availability

v3.0.1

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– findSliceEntityWithInputTime:

根据实际输出时间查找 TuSDKMediaTimeSliceEntity

- (TuSDKMediaTimeSliceEntity *_Nonnull)findSliceEntityWithInputTime:(CMTime)inputTime

Parameters

inputTime

输入时间

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– sliceEntityWithOutputTime:

根据输出时间查找切片信息

- (TuSDKMediaTimeSliceEntity *_Nullable)sliceEntityWithOutputTime:(CMTime)outputTime

Parameters

outputTime

输出时间

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

Processing Methods

– processVideoPixelBuffer:outputTime:

处理视频像素数据

- (void)processVideoPixelBuffer:(CVPixelBufferRef _Nonnull)pixelBufferRef outputTime:(CMTime)outputTime

Parameters

pixelBufferRef

CVPixelBufferRef

outputTime

输出时间

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– processVideoSampleBufferRef:outputTime:

处理视频像素数据

- (void)processVideoSampleBufferRef:(CMSampleBufferRef _Nonnull)sampleBufferRef outputTime:(CMTime)outputTime

Parameters

sampleBufferRef

CMSampleBufferRef

outputTime

输出时间

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h

– processAudioSampleBufferRef:outputTime:

处理音频数据

- (void)processAudioSampleBufferRef:(CMSampleBufferRef _Nonnull)sampleBufferRef outputTime:(CMTime)outputTime

Parameters

sampleBufferRef

CMSampleBufferRef

outputTime

输出时间

Availability

v3.0

Declared In

TuSDKMediaTimelineAssetMoviePlayer.h