From e7933432e96e6d28cf057ea08570962b6b2f32f3 Mon Sep 17 00:00:00 2001 From: Barrett17 Date: Fri, 28 Dec 2018 23:01:02 +0100 Subject: [PATCH] BCodecRoster: Remove MakeFormatFor * I want to introduce a new way for plugins to register for a format. Supporting the old FormatManager is too painful at this point and not worth the effort. --- headers/os/codec/CodecRoster.h | 8 -------- src/kits/codec/CodecRoster.cpp | 10 ---------- src/kits/media/MediaFormats.cpp | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/headers/os/codec/CodecRoster.h b/headers/os/codec/CodecRoster.h index 47ea7c175d..33535d77b9 100644 --- a/headers/os/codec/CodecRoster.h +++ b/headers/os/codec/CodecRoster.h @@ -56,14 +56,6 @@ public: // To choose the API I did a search among the Haiku codebase and // programs for which we have the source available. - // TODO: At some point move all implementations here - - static status_t MakeFormatFor( - const media_format_description* descriptions, - int32 descriptionCount, - media_format& format, uint32 flags, - void* _reserved); - // TODO: media_format_family: really? static status_t GetCodecInfo(media_codec_info* _codecInfo, media_format_family* _formatFamily, diff --git a/src/kits/codec/CodecRoster.cpp b/src/kits/codec/CodecRoster.cpp index 37c47be58e..7e492b8ca4 100644 --- a/src/kits/codec/CodecRoster.cpp +++ b/src/kits/codec/CodecRoster.cpp @@ -269,14 +269,4 @@ BCodecRoster::GetCodecInfo(media_codec_info* codecInfo, } -status_t -BCodecRoster::MakeFormatFor(const media_format_description* descriptions, - int32 descriptionCount, media_format& format, uint32 flags, - void* _reserved) -{ - return FormatManager::GetInstance()->MakeFormatFor(descriptions, - descriptionCount, format, flags, _reserved); -} - - } // namespace BCodecKit diff --git a/src/kits/media/MediaFormats.cpp b/src/kits/media/MediaFormats.cpp index fe87985e98..37c1be4780 100644 --- a/src/kits/media/MediaFormats.cpp +++ b/src/kits/media/MediaFormats.cpp @@ -524,7 +524,7 @@ BMediaFormats::MakeFormatFor(const media_format_description* descriptions, int32 descriptionCount, media_format* format, uint32 flags, void* _reserved) { - return BCodecKit::BCodecRoster::MakeFormatFor(descriptions, + return FormatManager::GetInstance()->MakeFormatFor(descriptions, descriptionCount, *format, flags, _reserved); }