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:
@@ -56,12 +56,8 @@ public: // XXX for test programs only
|
|||||||
class WriterPlugin : public virtual MediaPlugin {
|
class WriterPlugin : public virtual MediaPlugin {
|
||||||
public:
|
public:
|
||||||
virtual Writer* NewWriter() = 0;
|
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(
|
virtual status_t GetSupportedFileFormats(
|
||||||
media_file_format** _fileFormats,
|
const media_file_format** _fileFormats,
|
||||||
size_t* _count) = 0;
|
size_t* _count) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1185,7 +1185,7 @@ operator<(const media_file_format_id& a, const media_file_format_id& b)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
//! Use this function iterate through available file format writers
|
//! Use this function to iterate through available file format writers.
|
||||||
status_t
|
status_t
|
||||||
get_next_file_format(int32* cookie, media_file_format* mff)
|
get_next_file_format(int32* cookie, media_file_format* mff)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ AddOnManager::_RegisterWriter(WriterPlugin* writer, const entry_ref& ref)
|
|||||||
info.internalID = fNextWriterFormatFamilyID++;
|
info.internalID = fNextWriterFormatFamilyID++;
|
||||||
|
|
||||||
// Get list of support media_file_formats...
|
// Get list of support media_file_formats...
|
||||||
media_file_format* fileFormats = NULL;
|
const media_file_format* fileFormats = NULL;
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
if (writer->GetSupportedFileFormats(&fileFormats, &count) != B_OK) {
|
if (writer->GetSupportedFileFormats(&fileFormats, &count) != B_OK) {
|
||||||
printf("AddOnManager::_RegisterWriter(): "
|
printf("AddOnManager::_RegisterWriter(): "
|
||||||
|
|||||||
Reference in New Issue
Block a user