#include "RTSPServerSupportingHTTPStreaming.hh"#include "RTSPCommon.hh"#include <sys/stat.h>#include <time.h>Include dependency graph for RTSPServerSupportingHTTPStreaming.cpp:

Go to the source code of this file.
Functions | |
| static char const * | lastModifiedHeader (char const *fileName) |
| static char const* lastModifiedHeader | ( | char const * | fileName | ) | [static] |
Definition at line 60 of file RTSPServerSupportingHTTPStreaming.cpp.
Referenced by RTSPServerSupportingHTTPStreaming::RTSPClientSessionSupportingHTTPStreaming::handleHTTPCmd_StreamingGET().
00060 { 00061 static char buf[200]; 00062 00063 struct stat sb; 00064 int statResult = stat(fileName, &sb); 00065 if (statResult != 0) { 00066 // Failed to 'stat' the file; return an empty string 00067 buf[0] = '\0'; 00068 } else { 00069 strftime(buf, sizeof buf, "Last-Modified: %a, %b %d %Y %H:%M:%S GMT\r\n", gmtime((const time_t*)&sb.st_mtime)); 00070 } 00071 00072 return buf; 00073 }
1.5.2