* As suggested by Axel, BMediaTrack::GetCodecInfo() don't anymore say

"Haiku Media Kit: ", as it's given for any caller of a Media Kit API ;-)
* This remove an systematic line feed in the codec pretty name returned;
* Updated MediaPlayer info window text layout to take this change into account.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29836 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2009-03-31 19:16:18 +00:00
parent 6104360c70
commit b60892ce1c
2 changed files with 7 additions and 7 deletions

View File

@ -313,7 +313,7 @@ printf("InfoWin::Update(0x%08lx)\n", which);
status_t err;
// video track format information
if ((which & INFO_VIDEO) && fController->VideoTrackCount() > 0) {
fLabelsView->Insert("Video\n\n\n\n");
fLabelsView->Insert("Video\n\n\n");
BString s;
media_format format;
media_raw_video_format videoFormat;
@ -325,9 +325,9 @@ printf("InfoWin::Update(0x%08lx)\n", which);
media_codec_info mci;
err = fController->GetVideoCodecInfo(&mci);
if (err < B_OK) {
s << "Haiku Media Kit:\n(" << strerror(err) << ")";
s << "Haiku Media Kit: " << strerror(err);
if (format.user_data_type == B_CODEC_TYPE_INFO) {
s << (char *)format.user_data << " not supported";
s << (char *)format.user_data << " (not supported)";
}
} else
s << mci.pretty_name; //<< "(" << mci.short_name << ")";
@ -346,7 +346,7 @@ printf("InfoWin::Update(0x%08lx)\n", which);
// audio track format information
if ((which & INFO_AUDIO) && fController->AudioTrackCount() > 0) {
fLabelsView->Insert("Audio\n\n\n\n");
fLabelsView->Insert("Audio\n\n\n");
BString s;
media_format format;
media_raw_audio_format audioFormat;
@ -360,9 +360,9 @@ printf("InfoWin::Update(0x%08lx)\n", which);
media_codec_info mci;
err = fController->GetAudioCodecInfo(&mci);
if (err < 0) {
s << "Haiku Media Kit:\n(" << strerror(err) << ") ";
s << "Haiku Media Kit: " << strerror(err);
if (format.user_data_type == B_CODEC_TYPE_INFO) {
s << (char *)format.user_data << " not supported";
s << (char *)format.user_data << " (not supported)";
}
} else
s << mci.pretty_name; //<< "(" << mci.short_name << ")";

View File

@ -109,7 +109,7 @@ BMediaTrack::GetCodecInfo(media_codec_info *mci) const
return B_NO_INIT;
*mci = fMCI;
snprintf(mci->pretty_name, sizeof(mci->pretty_name), "Haiku Media Kit:\n%s", fMCI.pretty_name);
strlcpy(mci->pretty_name, fMCI.pretty_name, sizeof(mci->pretty_name));
return B_OK;
}