X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.h;h=dc907821efca0fb90f721cb444b6c9127bc21994;hp=21b6497af9f6043691eaffa26e28462548444e2b;hb=eb9df615719cf3afe2bc08035900e5d3451034e1;hpb=5d8a7826b0f80f00622e46baf75453995a76e343 diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index 21b6497a..dc907821 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. @@ -416,7 +417,7 @@ private: { PRIVATE, SHARED, - SHMGET + SHM_GET }; // Data pointer is pointing to someone else's buffer. @@ -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