Hi Ross
Many of the IP camera to transfer the resolution of the frame use the attributes of the "x-dimension" or "cliprect". As the implementation of a "x-dimension" is already present in Live555. Can I suggest implementing a parser for the "cliprect" attribute? Best Regards, Andrey Shadrin, Sarapul Systems, Ltd..
--- live-2012.09.13.orig/liveMedia/include/MediaSession.hh 2012-09-14 03:29:26.000000000 +0400 +++ live-2012.09.13/liveMedia/include/MediaSession.hh 2012-09-18 10:39:20.795538104 +0400 @@ -289,6 +289,7 @@ Boolean parseSDPAttribute_range(char const* sdpLine); Boolean parseSDPAttribute_fmtp(char const* sdpLine); Boolean parseSDPAttribute_source_filter(char const* sdpLine); + Boolean parseSDPAttribute_cliprect(char const* sdpLine); Boolean parseSDPAttribute_x_dimensions(char const* sdpLine); Boolean parseSDPAttribute_framerate(char const* sdpLine); --- live-2012.09.13.orig/liveMedia/MediaSession.cpp 2012-09-14 03:29:26.000000000 +0400 +++ live-2012.09.13/liveMedia/MediaSession.cpp 2012-09-17 16:49:07.359377373 +0400 @@ -213,6 +213,7 @@ if (subsession->parseSDPAttribute_fmtp(sdpLine)) continue; if (subsession->parseSDPAttribute_source_filter(sdpLine)) continue; if (subsession->parseSDPAttribute_x_dimensions(sdpLine)) continue; + if (subsession->parseSDPAttribute_cliprect(sdpLine)) continue; if (subsession->parseSDPAttribute_framerate(sdpLine)) continue; // (Later, check for malformed lines, and other valid SDP lines#####) @@ -1114,6 +1115,22 @@ return parseSourceFilterAttribute(sdpLine, fSourceFilterAddr); } +Boolean MediaSubsession::parseSDPAttribute_cliprect(char const* sdpLine) { + // Check for a "a=cliprect:<x1>,<y1>,<x2>,<y2>" line: + // x1,y1 - top left corner rect + // x2,y2 - bottom right corner rect + Boolean parseSuccess = False; + + int x1, x2, y1, y2; + if (sscanf(sdpLine, "a=cliprect:%d,%d,%d,%d", &x1, &y1, &x2, &y2) == 4) { + parseSuccess = True; + fVideoWidth = (unsigned short)(x2 - x1); + fVideoHeight = (unsigned short)(y2 - y1); + } + + return parseSuccess; +} + Boolean MediaSubsession::parseSDPAttribute_x_dimensions(char const* sdpLine) { // Check for a "a=x-dimensions:<width>,<height>" line: Boolean parseSuccess = False;
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel