From 92d809b687861b73e81814008cfafb09ee5d5c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 29 Jul 2009 19:11:32 +0000 Subject: [PATCH] Added interface to WriterPlugin to get all supported media_format_families. Don't yet know if that's the way it's supposed to work... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31933 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/media/WriterPlugin.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/headers/private/media/WriterPlugin.h b/headers/private/media/WriterPlugin.h index e0012f8e1d..ffb9adbb42 100644 --- a/headers/private/media/WriterPlugin.h +++ b/headers/private/media/WriterPlugin.h @@ -12,14 +12,12 @@ class Writer { public: Writer(); virtual ~Writer(); - + virtual status_t SetCopyright(const char* copyright) = 0; virtual status_t CommitHeader() = 0; virtual status_t Flush() = 0; virtual status_t Close() = 0; - virtual void GetFileFormatInfo(media_file_format* mff) = 0; - virtual status_t AllocateCookie(void** cookie) = 0; virtual status_t FreeCookie(void* cookie) = 0; @@ -58,6 +56,14 @@ public: // XXX for test programs only class WriterPlugin : public virtual MediaPlugin { public: virtual Writer* NewWriter() = 0; + // TODO: Perhaps change this interface to make it clear if we + // want the _fileFormats to be allocated! This is used in + // src/servers/media/AddOnManager.cpp:_RegisterWriter() and the + // objects are not freed by that method! + virtual status_t GetSupportedFileFormats( + media_file_format** _fileFormats, + size_t* _count) = 0; + }; } } // namespace BPrivate::media