Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3487)

Unified Diff: media/filters/jpeg_parser.h

Issue 1291933002: File video capture device supports MJPEG format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address kcwu@ Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/jpeg_parser.h
diff --git a/media/filters/jpeg_parser.h b/media/filters/jpeg_parser.h
index fa13dd764303a6caa781065dc4d49e837ac520c8..ff7439d5cf8c1649ba1befe2a0e2a3aa646d107b 100644
--- a/media/filters/jpeg_parser.h
+++ b/media/filters/jpeg_parser.h
@@ -30,6 +30,15 @@ enum JpegMarker {
JPEG_SOS = 0xDA, // start of scan
JPEG_DQT = 0xDB, // define quantization table
JPEG_DRI = 0xDD, // define restart internal
+ JPEG_RST0 = 0xD0, // restart
+ JPEG_RST1 = 0xD1, // restart
+ JPEG_RST2 = 0xD2, // restart
+ JPEG_RST3 = 0xD3, // restart
+ JPEG_RST4 = 0xD4, // restart
+ JPEG_RST5 = 0xD5, // restart
+ JPEG_RST6 = 0xD6, // restart
+ JPEG_RST7 = 0xD7, // restart
+ JPEG_EOI = 0xD9, // end of image
JPEG_MARKER_PREFIX = 0xFF, // jpeg marker prefix
};
@@ -86,7 +95,10 @@ struct JpegParseResult {
uint16_t restart_interval;
JpegScanHeader scan;
const char* data;
+ // The size of compressed data.
size_t data_size;
+ // The size of entire image including header.
+ size_t image_size;
};
// Parses JPEG picture in |buffer| with |length|. Returns true iff header is

Powered by Google App Engine
This is Rietveld 408576698