MillicastSDK 2.0.0
Loading...
Searching...
No Matches
Instance Methods | List of all members
MCCoreVideoSource Class Reference

A Source that allows applications to feed their own raw CVPixelBuffers for publishing. More...

#import <source.h>

Inheritance diagram for MCCoreVideoSource:
Inheritance graph
[legend]
Collaboration diagram for MCCoreVideoSource:
Collaboration graph
[legend]

Instance Methods

(MCTrack *) - startCapture
 
(void) - onPixelBuffer:
 
(void) - onPixelBuffer:withTimestamp:
 
(bool) - isCapturing
 
(void) - stopCapture
 Stops capturing video.
 
 initWithCppSource:
 
- Instance Methods inherited from MCSource
(MCSourceType) - getType
 
(NSString *) - getName
 
(NSString *) - getUniqueId
 
(NSString *) - getTypeAsString
 

Detailed Description

A Source that allows applications to feed their own raw CVPixelBuffers for publishing.

Method Documentation

◆ isCapturing

- (bool) isCapturing

Query whether the source is currently capturing.

  • Returns: True if the application is capturing, false otherwise.

◆ onPixelBuffer:

- (void) onPixelBuffer: (CVPixelBufferRef)  pixelBuffer

To be called whenever the application wishes to feed a CVPixelBuffer to the source. This API does not copy the CVPixelBuffer if using H.264, which is hardware accelerated on Apple platforms. If using codecs other than H.264, an internal copy of the frame will occur.

  • Parameters:
    • pixelBuffer: ACVPixelBufferRef reference. The reference will be retained/decremented internally.

◆ onPixelBuffer:withTimestamp:

- (void) onPixelBuffer: (CVPixelBufferRef)  pixelBuffer
withTimestamp: (CMTime)  timestamp 

To be called whenever the application wishes to feed a CVPixelBuffer to the source along with a timestamp.

  • Parameters:
    • pixelBuffer: A CVPixelBufferRef. The reference will be retained/decremented internally.
    • timestamp: The timestamp to the given frame. Will act as a capture timestamp.

◆ startCapture

- (MCTrack *) startCapture

Starts capture. Effectively creates a video track that can be added to the publisher.

  • Returns: A video track. See MCPublisher/addTrackWithVideoTrack:completionHandler: to learn how to attach this track to a publisher.

◆ stopCapture

- (void) stopCapture

Stops capturing video.


The documentation for this class was generated from the following file: