X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.h;h=589fce1c638aad07c22b15a40ac82182d1748d0a;hb=1db0dacec8f9d7f5687e582bd282d9bf83bd58f0;hp=21b6497af9f6043691eaffa26e28462548444e2b;hpb=5d8a7826b0f80f00622e46baf75453995a76e343;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index 21b6497a..589fce1c 100644 --- a/cinelerra-5.1/guicast/vframe.h +++ b/cinelerra-5.1/guicast/vframe.h @@ -56,6 +56,7 @@ public: class VFrame { friend class VFramePng; + friend class VFrameJpeg; friend class PngReadFunction; public: // Create new frame with shared data if *data is nonzero. @@ -486,4 +487,21 @@ public: static VFrame *vframe_png(const char *png_path, double xs=1, double ys=1); }; +// Create a frame with the jpeg image +// jpeg_model must be BC_RGB888, BC_YUV888, or BC_GREY8 +class VFrameJpeg : public VFrame +{ +// Read a JPEG into the frame (no alpha) + int read_jpeg(const unsigned char *data, long sz, + double xscale, double yscale, int jpeg_model); +public: + VFrameJpeg(const unsigned char *jpeg_data, double s=0); + VFrameJpeg(const unsigned char *jpeg_data, long image_size, double xs=0, double ys=0); + virtual ~VFrameJpeg(); + static VFrame *vframe_jpeg(int fd, + double xs=1, double ys=1, int jpeg_model=BC_RGB888); + static VFrame *vframe_jpeg(const char *jpeg_path, + double xs=1, double ys=1, int jpeg_model=BC_RGB888); +}; + #endif