Axel!! Since _Thursday_ I am trying to track this down. "MediaPlayer wouldn't

play any more clips." Of course I was searching in my own commits. In the
end, I resorted to binary searching revisions for when this broke. Turns out
it is your change r25793/r25794, in which you forgot to attach the colorspace
to the app_server message. Which of course makes it lock up. Another of those
instances where you think passing data structures between client and app_server
instead of this "protocol" would be the better idea...

* Fixed bitmaps_support_space() retrieving the currently supported overlay
flags for a given color space. This makes MediaPlayer play files again, the
media node connection would time out because of the broken app_server
communication. (I have not tested this change yet, but I will in a minute, on
a different computer.)
* Also retrieve the overlay supported flag for YCbCr colorspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25847 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-06-07 15:14:00 +00:00
parent 5f01a858b2
commit 636427b614
+21 -11
View File
@@ -129,6 +129,23 @@ get_pixel_size_for(color_space space, size_t *pixelChunk, size_t *rowAlignment,
}
static uint32
get_overlay_flags(color_space space)
{
BPrivate::AppServerLink link;
link.StartMessage(AS_GET_BITMAP_SUPPORT_FLAGS);
link.Attach<uint32>((uint32)space);
uint32 flags = 0;
int32 code;
if (link.FlushWithReply(code) == B_OK && code == B_OK) {
if (link.Read<uint32>(&flags) < B_OK)
flags = 0;
}
return flags;
}
bool
bitmaps_support_space(color_space space, uint32 *supportFlags)
{
@@ -142,17 +159,8 @@ bitmaps_support_space(color_space space, uint32 *supportFlags)
case B_CMAP8: case B_GRAY8: case B_GRAY1:
if (supportFlags != NULL) {
*supportFlags = B_VIEWS_SUPPORT_DRAW_BITMAP
| B_BITMAPS_SUPPORT_ATTACHED_VIEWS;
BPrivate::AppServerLink link;
link.StartMessage(AS_GET_BITMAP_SUPPORT_FLAGS);
int32 code;
if (link.FlushWithReply(code) == B_OK && code == B_OK) {
uint32 flags = 0;
if (link.Read<uint32>(&flags) == B_OK)
*supportFlags |= flags;
}
| B_BITMAPS_SUPPORT_ATTACHED_VIEWS
| get_overlay_flags(space);
}
break;
@@ -165,6 +173,8 @@ bitmaps_support_space(color_space space, uint32 *supportFlags)
case B_HSV24: case B_HSV32: case B_HSVA32:
case B_HLS24: case B_HLS32: case B_HLSA32:
case B_CMY24: case B_CMY32: case B_CMYA32: case B_CMYK32:
if (supportFlags != NULL)
*supportFlags = get_overlay_flags(space);
break;
// unsupported
case B_NO_COLOR_SPACE: