Resolved TODO, make it clear who maintains the allocation of the

media_file_format array (it remains with the plugin itself, as with
DecoderPlugins).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31955 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-07-30 00:11:02 +00:00
parent 0f779d495b
commit 60c85abee5
3 changed files with 3 additions and 7 deletions

View File

@ -56,12 +56,8 @@ 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,
const media_file_format** _fileFormats,
size_t* _count) = 0;
};

View File

@ -1185,7 +1185,7 @@ operator<(const media_file_format_id& a, const media_file_format_id& b)
// #pragma mark -
//! Use this function iterate through available file format writers
//! Use this function to iterate through available file format writers.
status_t
get_next_file_format(int32* cookie, media_file_format* mff)
{

View File

@ -421,7 +421,7 @@ AddOnManager::_RegisterWriter(WriterPlugin* writer, const entry_ref& ref)
info.internalID = fNextWriterFormatFamilyID++;
// Get list of support media_file_formats...
media_file_format* fileFormats = NULL;
const media_file_format* fileFormats = NULL;
size_t count = 0;
if (writer->GetSupportedFileFormats(&fileFormats, &count) != B_OK) {
printf("AddOnManager::_RegisterWriter(): "