Encodes output from Screen. More...
#include <video_encoder.h>
Inherits Entry, and JSyncThread.
Public Member Functions | |
| virtual bool | init (ViewPort *scr)=0 |
| pure virtual function to implement | |
| virtual int | encode_frame ()=0 |
| pure virtual function to implement | |
| void | thread_setup () |
| setup data needed in encoding thread | |
| void | thread_loop () |
| encoding thread main loop | |
| void | thread_teardown () |
| ending phase of encoding thread | |
| bool | set_filedump (char *filename) |
| start to dump to filename, call with NULL to stop | |
Public Attributes | |
| char * | status |
| string updated with encoder status | |
| int | video_quality |
| quality of video encoding: range 0-100 | |
| int | video_bitrate |
| video encoding bitrate (default is 0: VBR on the quality value) | |
| int | audio_quality |
| quality of audio encoding: range 0-100 | |
| int | audio_bitrate |
| audio encoding bitrate (default is 0: VBR on the quality value) | |
| int | audio_kbps |
| encoded audio, kilobit per second | |
| int | video_kbps |
| encoded video, kilobit per second | |
| int | bytes_encoded |
| encoded bytes in total in the last encoding pass | |
| bool | initialized |
| true if encoder had been initialized | |
| bool | write_to_disk |
| true if encoder should write to a file | |
| bool | write_to_stream |
| true if encoder should write to a stream | |
| bool | use_audio |
| true if the encoded data should include also audio | |
| AudioCollector * | audio |
| holding the pointer to the class | |
| float * | audio_buf |
| audio buffer (local copy for the encoder) | |
| bool | streaming |
| set true when streaming by js start_stream() | |
| ringbuffer_t * | ringbuffer |
| FIFO ringbuffer pipe from Jack. | |
Encodes output from Screen.
Abstract class describing the general interface of a VideoEncoder
Method implemented are:
Virtual method to be implemented in an implementation:
Definition at line 63 of file video_encoder.h.
| void VideoEncoder::thread_loop | ( | ) |
encoding thread main loop
proceed writing and streaming encoded data in encpipe
Definition at line 173 of file video_encoder.cpp.
References audio_kbps, encode_frame(), ViewPort::get_pixel_format(), ViewPort::get_surface(), Geometry::h, ringbuffer, ringbuffer_read(), video_kbps, Geometry::w, write_to_disk, and write_to_stream.
1.6.1