ref: 87f85fdfb793a840ded7f3148276362c5e2e0430
parent: e8a21effe6c52cb0d3c4789acf68d81c5c6b3964
author: menno <menno>
date: Sat Aug 2 19:08:17 EDT 2003
fixed for latest SDK fixed genre bug
--- a/plugins/foo_mp4/foo_mp4.cpp
+++ b/plugins/foo_mp4/foo_mp4.cpp
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through [email protected].
**
-** $Id: foo_mp4.cpp,v 1.38 2003/07/29 08:20:14 menno Exp $
+** $Id: foo_mp4.cpp,v 1.39 2003/08/02 23:08:17 menno Exp $
**/
#include <mp4.h>
@@ -50,7 +50,7 @@
#endif
DECLARE_COMPONENT_VERSION ("MPEG-4 AAC decoder",
- "$Revision: 1.38 $",
+ "$Revision: 1.39 $",
"Based on FAAD2 v" FAAD2_VERSION "\nCopyright (C) 2002-2003 http://www.audiocoding.com" );
class input_mp4 : public input
@@ -57,12 +57,12 @@
{
public:
- virtual int test_filename(const char * fn,const char * ext)
+ virtual bool test_filename(const char * fn,const char * ext)
{
return (!stricmp(ext,"MP4") || !stricmp(ext,"M4A"));
}
- virtual int open(reader *r, file_info *info, int full_open)
+ virtual bool open(reader *r, file_info *info, unsigned flags)
{
unsigned __int8 *buffer;
unsigned __int32 buffer_size;
@@ -321,7 +321,7 @@
return SET_INFO_SUCCESS;
}
- virtual int seek(double seconds)
+ virtual bool seek(double seconds)
{
MP4Duration duration;
@@ -333,7 +333,7 @@
return 1;
}
- virtual int is_our_content_type(const char *url, const char *type)
+ virtual bool is_our_content_type(const char *url, const char *type)
{
return !stricmp(type, "audio/mp4") || !stricmp(type, "audio/x-mp4");
}
@@ -390,7 +390,7 @@
info->meta_add(pName, val);
}
} else if (memcmp(pName, "gnre", 4) == 0) {
- char *t;
+ char *t = NULL;
MP4GetMetadataGenre(hFile, &t);
info->meta_add("GENRE", t);
} else if (memcmp(pName, "trkn", 4) == 0) {
@@ -552,12 +552,12 @@
{
public:
- virtual int test_filename(const char * fn,const char * ext)
+ virtual bool test_filename(const char * fn,const char * ext)
{
return !stricmp(ext,"AAC");
}
- virtual int open(reader *r, file_info *info, int full_open)
+ virtual bool open(reader *r, file_info *info, unsigned flags)
{
int tagsize = 0, tmp = 0;
int bread = 0;
@@ -796,7 +796,7 @@
return tag_writer::g_run(r,info,"ape") ? SET_INFO_SUCCESS : SET_INFO_FAILURE;
}
- virtual int seek(double seconds)
+ virtual bool seek(double seconds)
{
int i, frames;
int bread;
@@ -847,7 +847,7 @@
}
}
- virtual int is_our_content_type(const char *url, const char *type)
+ virtual bool is_our_content_type(const char *url, const char *type)
{
return !stricmp(type, "audio/aac") || !stricmp(type, "audio/x-aac");
}
--- a/plugins/foo_mp4/foo_mp4.dsp
+++ b/plugins/foo_mp4/foo_mp4.dsp
@@ -92,10 +92,6 @@
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
-SOURCE=.\foobar2000\component_client\component_client.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\foo_mp4.cpp
# End Source File
# End Group
--- a/plugins/foo_mp4/foo_mp4.dsw
+++ b/plugins/foo_mp4/foo_mp4.dsw
@@ -23,11 +23,26 @@
Begin Project Dependency
Project_Dep_Name pfc
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name foobar2000_component_client
+ End Project Dependency
}}}
###############################################################################
Project: "foobar2000_SDK"=.\foobar2000\SDK\foobar2000_SDK.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "foobar2000_component_client"=.\foobar2000\foobar2000_component_client\foobar2000_component_client.dsp - Package Owner=<4>
Package=<5>
{{{