Ejemplo n.º 1
0
void OgreOpenVR::stopRecording()
{
    if (m_recording)
    {
        ffmpeg_encoder_finish();
        m_recording = false;
    }
}
Ejemplo n.º 2
0
/* Represents the main loop of an application which generates one frame per loop. */
static void encode_example(const char *filename, int codec_id, int width, int height) {
    int pts;
    uint8_t *rgb = NULL;
    ffmpeg_encoder_start(filename, codec_id, 25, width, height);
    for (pts = 0; pts < 100; pts++) {
        frame->pts = pts;
        common_generate_rgb(width, height, pts, &rgb);
        ffmpeg_encoder_encode_frame(rgb);
    }
    ffmpeg_encoder_finish();
    free(rgb);
}
Ejemplo n.º 3
0
static void encode_example(int width, int height, float factor) {
    char filename[255];
    int pts;
    uint8_t *rgb = NULL;
    snprintf(filename, 255, "tmp." __FILE__ "_%.2f.h264", factor);
    ffmpeg_encoder_start(filename, AV_CODEC_ID_H264, 25, width, height, factor);
    for (pts = 0; pts < 100; pts++) {
        frame->pts = pts;
        common_generate_rgb(width, height, pts, &rgb);
        ffmpeg_encoder_encode_frame(rgb);
    }
    ffmpeg_encoder_finish();
    free(rgb);
}