Confirmed users
157
edits
| Line 193: | Line 193: | ||
MediaCodec(); | MediaCodec(); | ||
nsresult Init() = 0; | |||
/* Let MediaCodec setup buffer length based on codec characteristic | /* Let MediaCodec setup buffer length based on codec characteristic | ||
| Line 201: | Line 201: | ||
/* Mimic android::CameraParameter to collect backend codec related params in general class */ | /* Mimic android::CameraParameter to collect backend codec related params in general class */ | ||
CodecParams GetParams() = 0; | CodecParams GetParams() = 0; | ||
nsresult SetParams(CodecParams) = 0; | |||
/* Start the encoder, if the encoder got its own thread, create the thread here */ | /* Start the encoder, if the encoder got its own thread, create the thread here */ | ||
nsresult Encode() = 0; | |||
/* Read the encoded data from encoder, check the status before attempt to read, otherwise error would returned */ | /* Read the encoded data from encoder, check the status before attempt to read, otherwise error would returned */ | ||
EncoderState GetCurrentState(); | EncoderState GetCurrentState(); | ||
nsresult GetEncodedData(MediaSegment& encData) = 0; | |||
/* codec specific header to describe self type/version/etc. */ | /* codec specific header to describe self type/version/etc. */ | ||