don't request streams when opening the demux, it is always done soon after
when the DMX_SPECIALID_STREAMCHANGE packet comes in
[AE/osxsink] - distinguish between passthroughnative and passthroughbitstream in the findsuitableformat method
[AE/osxsink/coreaudio] - split registration for the devicelist changed callback and registration for the default output device changed callback and
move the coreaudio callback registration methods to CCoreAudioDevice and add possibility to suppress the defaultdevicechanged callback for a given time
[AE/osxsink] - open the device before setting hogmode (as sethogmode relies on it!)
[osx/coreaudio] - suppress default output device changed callbacks for 2 seconds when setting physical and virtual formats
[pvr] use Refresh() instead of Update() to refresh directory listing

To get rid of the default value for strDirectory in Update() and to gain control of whether we want to clear the cache or not, this will use Refresh() instead of Update() in all PVR windows to refresh the directory listing.
[pvr] cleanup: removes forgotten commented code block
[addoncallbacks] check key is non-null before use
Merge pull request #4975 from Memphiz/osx_fix_devicechanged_recursion

[AE/osxsink] - fix possible device changed loop when using passthrough
Merge pull request #4334 from Jalle19/requeststreams

Remove a superfluous call to RequestStreams()
Merge pull request #5032 from jmarshallnz/addon_callbacks_nonnull

[addoncallbacks] check key is non-null before use
fix build when HAL is enabled
Merge pull request #5031 from xhaggi/pvr-window-refresh

[pvr] use Refresh() instead of Update() to refresh directory listing
Move the reference-counting of Begin and End calls from DX and GL source files into GUIFontTTF.cpp.
Convert CGUIFontTTFBase::m_vertex to be managed as a std::vector.

Also retired CGUIFontTTFBase::m_vertex_count and
CGUIFontTTFBase::m_vertex_size because these can be derived from vector
member functions.
CGUIFontTTFBase::RenderCharacter can now append to arbitrary vectors of vertices rather than only CGUIFontTTFBase::m_vertex
Add a cache of font glyph bounding box vertices.

This is implemented as a template because ultimately we will key on different
parameters and store values of different types, depending upon whether we
have a GLES or non-GLES backend, and for GLES, whether or not the currently
applicable transformation matrices permit the use of hardware clipping.
Lay the groundwork for hardware clipping.

For glScissor() to replace CGraphicContext::ClipRect, a necessary condition
is that no shear or rotation is introduced between the coordinate systems
they use; this depends upon the settings of the GUI matrix m_finalTransform
as well as the OpenGL model-view and projection matrices. These all remain
unchanged between paired calls of CGUIShader::OnEnabled and
CGUIShader::OnDisabled, so we scan the matrices in CGUIShader::OnEnabled to
see whether hardware clipping is possible.

Then, in CGUIFontTTFBase::RenderCharacter, we don't apply software clipping
in such cases. However, because vertices arising from multiple
CGUIFontTTFBase::DrawTextInternal calls (each of which often uses a different
clip rectangle) get lumped into the same vector, which only at the end is
passed to OpenGL for rendering, we need to wait a few commits before we can
actually apply hardware clipping. In the meantime, expect to see rendering
errors.
Increase font cache hit rate by keying on the fractional part of m_originX and m_originY *after* they have been through the graphics context's transformation matrix, plus the scale/rotation elements of the matrix, rather than the origin in the original frame of reference plus the complete transformation matrix. All vertices of individual glyph bounding boxes are a constant offset from this position, and when the fractional part of the translation is a match, the rounding of each vertex will be in the same direction; this permits us to calculate the desired vertices from the cached ones simply by adding the integer parts of the translations with no additional rounding steps.

Note that this requires that software clipping is *not* performed.
Rewrite of scrolling text code.

No longer shuffles the string round to minimise the number of characters
before the clipping rectangle; this doesn't save much on rendering time but
does harm the effectiveness of the cache. Now uses a pixel offset into the
string rather than a character + pixel offset, and plots the entire string
every time (execpt when the wrap point is visible, in which case the entire
string is plotted twice).

It also makes motion smoother, because (possibly unintentionally) the
previous code preferred to align the scroll offset with character boundaries.
This would lead to uneven changes of position, especially when the width of
the character currently being scrolled off the edge was only slightly more
than an integral multiple of the scroll increment.