A colleague raised a question that realloc does better than free + malloc because allocated memory block is never being actually shrunk and reallocations to smaller size following by reallocations to larger (but still not larger than one of the previous) do not lead to heap locks and actual underlying heap memory block reallocations. While [...]
Posts Tagged ‘Source’
Continuous realloc()
Posted: 29th September 2012 by Roman in Source, UncategorizedTags: C++, CRT, heap, memory, Source, Windows API
Double right angle bracket kills Visual C++ source code outlining in IDE versions 2008, 2010, 2012
Posted: 11th August 2012 by Roman in SourceTags: amusing, C++, IDE, Source, visual studio
An amusing bug which seems to be affecting three of the versions of Visual Studio in a row: 2012, 2010, 2008: a double right angle bracket closing (or just present) the declaration of templated base class is breaking Visual Studio outlining capability (code scout? Intellisense? whatever). Have a space there and you are fine.
Enumerating Media Foundation Transforms (MFTs)
Posted: 5th August 2012 by Roman in ATL, SourceTags: DMO, media foundation, mft, Source, transform, Windows API
Matthew van Eerde already made a similar wrapper over MFTEnumEx in How to enumerate Media Foundation transforms on your system, and this one extends it with enumeration of attributes, also listing them in human friendly way. This sort of code should perhaps have been in Media Foundation SDK Samples, however we have what we have. [...]
GPS Location/Coordinate Converter: Fractional Seconds, More Shortcuts
Posted: 20th October 2011 by Roman in ATL, Source, Utilities, WTLTags: ATL, coordinate, geolocation, gps, map, Source, tool, Utilities, utility, WTL
This adds a small update to the recently published GPS Location/Coordinate Converter utility: Seconds in Degrees, Minutes & Seconds notation are shown and are accepted as floating point numbers More shortcuts to popular online map services (note that only Google Maps and Yandex Maps are still accepted as input via clipboard): Bing Maps Yahoo Maps [...]
Sample: Simultaneous Audio Playback via Waveform Audio (waveOut) API
Posted: 12th October 2011 by Roman in Audio, SourceTags: Audio, C++, playback, Source, waveOut
The minimalistic sample demonstrates support of [deprecated] Waveform Audio API for multiple playback streams. Depending on command line parameters, the application starts threads to open audio hardware using separate waveOutOpen call and stream one or more generated sine waves: 1,000 Hz sine wave as 22,050 Hz, Mono, 16-bit PCM (command line parameter “a”) 5,000 Hz [...]
A tricky EVR bug was caught up: input pin may falsely report disconnected state
Posted: 26th July 2011 by Roman in Seriously, VideoTags: bug, evr, microsoft, Source, Video
Crime An application which builds a DirectShow graph unexpectedly started failing with VFW_E_NOT_CONNECTED (0×80040209) error code. Scene The problem takes place during DirectShow graph building, yet in stopped state. Specific call which appeared to be giving out the error in first place appears to be EVR input pin’s IPin::ConnectionMediaType, and the problem is also specific [...]
IP Video Source: Pure JPEG URLs and Software Version
Posted: 7th June 2011 by Roman in UtilitiesTags: camera, capture, device, DirectShow, driver, dshow, filter, ip, JPEG, M-JPEG, Source, Video
This does not update the software with new features, but there are a few simple things worth mentioning explicitly. The first is that virtual DirectShow camera device can be set up with both M-JPEG and JPEG URLs. That is, IP cameras which do not implement M-JPEG, or implement it in a buggy way (there is [...]
