X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=quicksync_encoder_impl.h;h=917420ca41af16a81ffdd3668bd6ea38f3fb78cc;hb=96cb6414f85e0ef4d660b7bd56267303e80fcd05;hp=679f2a27beec9753e2e1cffb0767a7db4e0fd667;hpb=ee7da87b4aa284b7babd59dc21db925f7c384ce7;p=nageru diff --git a/quicksync_encoder_impl.h b/quicksync_encoder_impl.h index 679f2a2..917420c 100644 --- a/quicksync_encoder_impl.h +++ b/quicksync_encoder_impl.h @@ -36,9 +36,11 @@ public: QuickSyncEncoderImpl(const std::string &filename, movit::ResourcePool *resource_pool, QSurface *surface, const std::string &va_display, int width, int height, AVOutputFormat *oformat, X264Encoder *x264_encoder, DiskSpaceEstimator *disk_space_estimator); ~QuickSyncEncoderImpl(); void add_audio(int64_t pts, std::vector audio); + bool is_zerocopy() const; bool begin_frame(int64_t pts, int64_t duration, movit::YCbCrLumaCoefficients ycbcr_coefficients, const std::vector &input_frames, GLuint *y_tex, GLuint *cbcr_tex); RefCountedGLsync end_frame(); void shutdown(); + void close_file(); void release_gl_resources(); void set_stream_mux(Mux *mux) { @@ -67,13 +69,13 @@ private: movit::YCbCrLumaCoefficients ycbcr_coefficients; }; struct GLSurface { + // Only if x264_video_to_disk == false. VASurfaceID src_surface, ref_surface; VABufferID coded_buf; - VAImage surface_image; - GLuint y_tex, cbcr_tex; - // Only if use_zerocopy == true. + // Only if use_zerocopy == true (which implies x264_video_to_disk == false). + GLuint y_tex, cbcr_tex; EGLImage y_egl_image, cbcr_egl_image; // Only if use_zerocopy == false.