Fares Alhassen | 17cbaf5 | 2016-11-15 17:04:29 -0800 | [diff] [blame] | 1 | change log for logging branch |
| 2 | |
| 3 | $Revision$ |
| 4 | $Date$ |
| 5 | |
| 6 | ------------------- |
| 7 | |
| 8 | (31-jan-11, dbyron) |
| 9 | |
| 10 | - fix ASSERTs in win32 implementation of |
| 11 | StandardFileProvider to check against _INVALID_FILE_HANDLE |
| 12 | instead of NULL since that's what the constructor and close |
| 13 | method use |
| 14 | |
| 15 | - merge r440, r441, r442, r443, r444 from trunk |
| 16 | |
| 17 | - fix return value of win32 implementation of |
| 18 | StandardFileProvider::close |
| 19 | |
| 20 | - merge r439 from trunk |
| 21 | |
| 22 | (18-jan-11, dbyron) |
| 23 | |
| 24 | - add __FUNCTION__, filename to warning messages |
| 25 | |
| 26 | - add warning to MP4File::Modify when failing because the |
| 27 | file has no moov atom |
| 28 | |
| 29 | - add __FUNCTION__, filename to error messages |
| 30 | |
| 31 | - add filename to verbose log messages in mp4descriptor.cpp |
| 32 | |
| 33 | - remove __FUNCTION__ from verbose log messages in |
| 34 | mp4atom.cpp since it makes the dump output hard to read |
| 35 | |
| 36 | - add filename to descriptions passed to Log::dump |
| 37 | |
| 38 | - change log messages with Warning: to use Log::warningf |
| 39 | |
| 40 | - fix Log::hexdump to make sure output begins with format |
| 41 | string/varargs instead of overwriting with ascii-hex |
| 42 | |
| 43 | (17-jan-11, dbyron) |
| 44 | |
| 45 | - change the MP4RtpData, MP4RtpNullData, |
| 46 | MP4RtpImmediateData, MP4RtpSampleData, |
| 47 | MP4RtpSampleDescriptionData, MP4RtpPacket, MP4RtpHint and |
| 48 | MP4Track to take references instead of pointers, with |
| 49 | accessors changed appropriately. |
| 50 | |
| 51 | (14-jan-11, dbyron) |
| 52 | |
| 53 | - change the MP4Descriptor constructor (and the constructors |
| 54 | of all its child classes) to take a (MP4Atom &) and remove |
| 55 | MP4Descriptor::SetParentAtom to remove the chance to |
| 56 | dereference a NULL pointer. Similarly for MP4Property and |
| 57 | all its children. Declare default and copy constructors and |
| 58 | assignment operator private to prevent using |
| 59 | compiler-generated routines. |
| 60 | |
| 61 | - change all Read and Write methods that took (MP4File *) to |
| 62 | take a (MP4File &). |
| 63 | |
| 64 | - change the MP4Track, MP4RtpHintTrack constructors to take a |
| 65 | (MP4File &). Corresponding changes to MP4Track::GetFile. |
| 66 | |
| 67 | (13-jan-11, dbyron) |
| 68 | |
| 69 | - change the MP4Atom constructor to take an (MP4File &), remove |
| 70 | MP4Atom::SetFile and change MP4Atom::GetFile to return an |
| 71 | (MP4File &). Change the internal member variable to an |
| 72 | (MP4File &) as well. Corresponding changes to |
| 73 | MP4Atom::ReadAtom, CreateAtom, factory and child class |
| 74 | constructors. This makes it impossible to dereference a |
| 75 | NULL pointer by accident. |
| 76 | |
| 77 | - convert messages with warning in the text to use |
| 78 | Log::warningf |
| 79 | |
| 80 | - include __FUNCTION__ and filename in log messages in |
| 81 | mp4atom.cpp |
| 82 | |
| 83 | (11-jan-11, dbyron) |
| 84 | |
| 85 | - declare Log copy constructor and assignment operator |
| 86 | private but don't implement them to prohibit copies |
| 87 | |
| 88 | (6-jan-11, dbyron) |
| 89 | |
| 90 | - add mp4subtitle.vcproj to build on windows |
| 91 | |
| 92 | (3-jan-11, dbyron) |
| 93 | |
| 94 | - declare MP4File copy constructor and assignment operator |
| 95 | private but don't implement them to prohibit copies |
| 96 | |
| 97 | - remove MP4HexDump and Indent from mp4util since they're |
| 98 | not used anymore |
| 99 | |
| 100 | - change Log::hexDump to dump printable bytes as well as the |
| 101 | hex values |
| 102 | |
| 103 | - remove error_msg_func_t, lib_message_func_t and |
| 104 | MP4SetLibFunc from general.h since they're not used and |
| 105 | don't really make sense now that MP4SetLogCallback exists |
| 106 | |
| 107 | - add MP4TagsHasMetadata to indicate whether a file contains |
| 108 | any metadata at all |
| 109 | |
| 110 | (31-dec-10, dbyron) |
| 111 | |
| 112 | - add MP4GetFilename so the filename associated with a |
| 113 | MP4FileHandle is available. Add MP4File::GetFilename to |
| 114 | support it. |
| 115 | |
| 116 | (27-dec-10, dbyron) |
| 117 | |
| 118 | - remove m_tempFileName from MP4File since it's not used |
| 119 | |
| 120 | - throw an exception from the win32 implementation of |
| 121 | FileSystem::exists, FileSystem::isDirectory and |
| 122 | FileSystem::isFile if there's an error |
| 123 | |
| 124 | - add logging to win32 FileSystem |
| 125 | |
| 126 | - add Utf8ToFilename::GetUTF8 to get the UTF-8 |
| 127 | representation of the filename actually used |
| 128 | |
| 129 | - add Utf8ToFilename::IsUTF16Valid so users of the class can |
| 130 | detect errors |
| 131 | |
| 132 | - rename Utf8ToWideChar to Utf8ToFilename to more accurately |
| 133 | reflect what the class does |
| 134 | |
| 135 | - replace MultiByteToWideChar with custom code to remove |
| 136 | differences across versions of windows and for improved |
| 137 | error detection and illegal character handling |
| 138 | |
| 139 | - add long filename support to Utf8ToWideChar |
| 140 | |
| 141 | (21-dec-10, dbyron) |
| 142 | |
| 143 | - add logging to win32 StandardFileProvider |
| 144 | |
| 145 | (20-dec-10, dbyron) |
| 146 | |
| 147 | - make try/catch blocks more granular in MP4Read, |
| 148 | MP4ReadProvider, MP4Create, MP4CreateEx, MP4Modify, |
| 149 | MP4Optimize, MP4Make3GPCompliant, MP4MakeIsmaCompliant, |
| 150 | MP4MakeIsmaSdpIod so it's easier to figure out the cause of |
| 151 | failure based on the log message. |
| 152 | |
| 153 | - log more specific messages, clean up leak if there's an |
| 154 | error adding the IpodUUID atom in MP4AddIPodUUID |
| 155 | |
| 156 | - remove MP4_DETAILS_* as it was only used in a few internal |
| 157 | places where an MP4_LOG_* replacement is fine until the |
| 158 | verbosity-altering code disappears. For some reason |
| 159 | MP4File::MakeIsmaCompliant alters the verbosity before |
| 160 | calling MP4GetVideoProfileLevel, MP4IsIsmaCrypMediaTrack |
| 161 | does the same before calling MP4File::IsIsmaCrypMediaTrack, |
| 162 | as does MP4CloneTrack before calling |
| 163 | MP4GetTrackESConfiguration. |
| 164 | |
| 165 | - change command line programs to map debug levels as |
| 166 | follows: |
| 167 | 0: MP4_LOG_NONE |
| 168 | 1: MP4_LOG_ERROR |
| 169 | 2, 3: MP4_LOG_VERBOSE2 |
| 170 | 4: MP4_LOG_VERBOSE4 |
| 171 | |
| 172 | - change MP4NormalizeTrackType (an internal function) to |
| 173 | always use MP4_LOG_VERBOSE1. |
| 174 | |
| 175 | - another fix to Log::hexDump so that it now actually dumps |
| 176 | all the bytes it was asked to dump |
| 177 | |
| 178 | - MP4File is no longer a child of Log. Use the global log |
| 179 | object everywhere. |
| 180 | |
| 181 | - remove the verbosity argument to MP4Read, MP4ReadProvider, |
| 182 | MP4Create and MP4CreateEx, MP4Modify, MP4Optimize, |
| 183 | MP4MakeIsmaCompliant, MP4MakeIsmaSdpIod, MP4Make3GPCompliant |
| 184 | and MP4NormalizeTrackType. Remove MP4GetVerbosity, |
| 185 | MP4SetVerbosity and MP4Atom::GetVerbosity. Use |
| 186 | MP4LogSetLevel to change the global log level instead. |
| 187 | There is no more file-specific verbosity since it is more |
| 188 | complicated than one global log level and it's not clear |
| 189 | anyone needs the added complexity. |
| 190 | |
| 191 | - remove the MP4FileHandle argument to MP4LogSetLevel and |
| 192 | MP4LogGetLevel and move them to general.h/log.cpp since |
| 193 | they're no longer file-specific. The default log level is |
| 194 | MP4_LOG_WARNING without any call to MP4LogSetLevel. |
| 195 | |
| 196 | - change MP4BytesProperty::Dump to use Log::hexDump for |
| 197 | large (> 16) byte hex output |
| 198 | |
| 199 | - remove the FILE* argument from MP4Dump, the internal Dump |
| 200 | methods (e.g. MP4File::Dump, MP4Atom::Dump, |
| 201 | MP4Property::Dump, etc.). Use Log::dump instead. |
| 202 | |
| 203 | - remove Indent from mp4util since it may pollute |
| 204 | stdout/stderr |
| 205 | |
| 206 | - add Log::dump, Log::vdump to support dumping with a |
| 207 | particular indent |
| 208 | |
| 209 | - fix Log::hexDump to print the correct ascii-hex info |
| 210 | |
| 211 | (17-dec-10, dbyron) |
| 212 | |
| 213 | - remove C_ASSERT from mp4util.h since it's not used |
| 214 | |
| 215 | - remove MP4Printf to keep from writing to stdout when |
| 216 | logging |
| 217 | |
| 218 | (7-jun-09, dbyron) |
| 219 | |
| 220 | - add MP4LogGetLevel, MP4LogSetLevel |
| 221 | |
| 222 | (5-jun-09, dbyron) |
| 223 | |
| 224 | - change return value of MP4DeleteTrack, |
| 225 | MP4SetTrackTimeScale, MP4GetTrackH264SeqPictHeaders from |
| 226 | void to bool |
| 227 | |
| 228 | - change MP4AddIPodUUID to return bool, check for valid |
| 229 | hFile and catch exceptions |
| 230 | |
| 231 | - check for NULL existingFileName, newFileName in |
| 232 | MP4Optimize |
| 233 | |
| 234 | - check for NULL fileName in MP4ReadProvider, MP4CreateEx, |
| 235 | MP4Modify, MP4Make3GPCompliant, MP4MakeIsmaCompliant |
| 236 | |
| 237 | - properly handle NULL pFile when catching Exception |
| 238 | |
| 239 | - check for NULL parameters in genericAddItem, |
| 240 | genericSetItem, genericRemoveItem |
| 241 | |
| 242 | - change signature of C wrappers to return bool and check |
| 243 | for NULL parameters: |
| 244 | - MP4TagsAddArtwork |
| 245 | - MP4TagsFetch |
| 246 | - MP4TagsRemoveArtwork |
| 247 | - MP4TagsSetArtwork |
| 248 | - MP4TagsStore |
| 249 | - MP4TagsSetName |
| 250 | - MP4TagsSetArtist |
| 251 | - MP4TagsSetAlbumArtist |
| 252 | - MP4TagsSetAlbum |
| 253 | - MP4TagsSetGrouping |
| 254 | - MP4TagsSetComposer( |
| 255 | - MP4TagsSetComments |
| 256 | - MP4TagsSetGenre |
| 257 | - MP4TagsSetGenreType |
| 258 | - MP4TagsSetReleaseDate |
| 259 | - MP4TagsSetTrack |
| 260 | - MP4TagsSetDisk |
| 261 | - MP4TagsSetTempo |
| 262 | - MP4TagsSetCompilation |
| 263 | - MP4TagsSetTVShow |
| 264 | - MP4TagsSetTVNetwork |
| 265 | - MP4TagsSetTVEpisodeID |
| 266 | - MP4TagsSetTVSeason |
| 267 | - MP4TagsSetTVEpisode |
| 268 | - MP4TagsSetSortName |
| 269 | - MP4TagsSetSortArtist |
| 270 | - MP4TagsSetSortAlbumArtist |
| 271 | - MP4TagsSetSortAlbum |
| 272 | - MP4TagsSetSortComposer |
| 273 | - MP4TagsSetSortTVShow |
| 274 | - MP4TagsSetDescription |
| 275 | - MP4TagsSetLongDescription |
| 276 | - MP4TagsSetLyrics |
| 277 | - MP4TagsSetCopyright |
| 278 | - MP4TagsSetEncodingTool |
| 279 | - MP4TagsSetEncodedBy |
| 280 | - MP4TagsSetPurchaseDate |
| 281 | - MP4TagsSetPodcast |
| 282 | - MP4TagsSetKeywords |
| 283 | - MP4TagsSetCategory |
| 284 | - MP4TagsSetHDVideo |
| 285 | - MP4TagsSetMediaType |
| 286 | - MP4TagsSetContentRating |
| 287 | - MP4TagsSetGapless |
| 288 | - MP4TagsSetITunesAccount |
| 289 | - MP4TagsSetITunesAccountType |
| 290 | - MP4TagsSetITunesCountry |
| 291 | - MP4TagsSetCNID |
| 292 | - MP4TagsSetATID |
| 293 | - MP4TagsSetPLID |
| 294 | - MP4TagsSetGEID |
| 295 | |
| 296 | - add catch( ... ) blocks to C wrapper functions |
| 297 | |
| 298 | - add static void errorf ( Log *olog, |
| 299 | const char *format, |
| 300 | ... ) MP4V2_WFORMAT_PRINTF(3,4); |
| 301 | |
| 302 | - add static void errorf ( Log *olog, |
| 303 | const Exception &x ); |
| 304 | - remove MP4Exception, replace with Exception |
| 305 | |
| 306 | - change MP4File::ProtectWriteOperation to take file, line, |
| 307 | function instead of one "where" string. |
| 308 | |
| 309 | - change exception catching code to call Log::errorf(); |
| 310 | |
| 311 | - remove VERBOSE, VERBOSE_ERROR from mp4util.h |
| 312 | |
| 313 | - remove MP4Error, replace with Exception, PlatformException |
| 314 | as appropriate |
| 315 | |
| 316 | - add Exception class and Log::errorf( const Exception &x ); |
| 317 | |
| 318 | (16-feb-09, dbyron) |
| 319 | |
| 320 | - First pass of actually using the Log class: |
| 321 | |
| 322 | - MP4LogNone --> MP4_LOG_NONE |
| 323 | - add global log object (log, declared in log.h) |
| 324 | - change MP4File to inherit from Log |
| 325 | - remove m_verbosity member variable |
| 326 | - remove MP4File::GetVerbosity, SetVerbosity methods |
| 327 | - change MP4NormalizeTrackType to take MP4LogLevel |
| 328 | - replace VERBOSE_* with corresponding Log method calls |
| 329 | (VERBOSE_ERROR remains until exception handling gets |
| 330 | revisited) |
| 331 | - change WARNING macro to take a Log object as the first |
| 332 | argument |
| 333 | - add Log::hexDump to mostly replace MP4HexDump (though |
| 334 | MP4HexDump is still called if there's no logging callback) |
| 335 | - fix MP4_DETAILS_ALL handling in Log::detailsToLevel |
| 336 | - add uint32_t Log::getVerbosity() const |
| 337 | - add Log::hexDump |
| 338 | - add uint32_t Log::getVerbosity |
| 339 | - add Log::verbose3f, verbose4f |