CN: Enhance thumbnail generation library
"Zhao, Halley" <[email protected]> Tue, 15 Sep 2009 16:47:46 +0800
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <8FED46E8A9CA574792FC7AACAC38FE77028754DC0C@PDSMSX501.ccr.corp.intel.com> |
Commit to HEAD & hxclient_3_1_0 BR ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Zhao, Halley Sent: 2009年9月14日 14:26 To: '[email protected]' Subject: [Helix-client-dev] Enhance thumbnail generation library Synopsis: 1. Add user data for callback function of metadata tags: GetMediaInfo() 2. Add definition of Helix tags in header file (hxthumb.h). 3. Use Realplayer default installation path (/usr/local/real/RealPlayer) for thumbnail library when $HELIX_THUMB_LIBS or $HELIX_THUMB_LIBS are not set. Overview: Files Added: No file added Files Modified: player/kit/thumbnail/src/CHXClientThumbnailUnix.cpp use Realplayer installation path: /usr/local/real/RealPlayer player/kit/thumbnail/src/hxthumb.cpp player/kit/thumbnail/test/main.cpp Add user data for callback function of metadata tags player/kit/thumbnail/pub/hxthumb.h Add definition of Helix tags in header file (hxthumb.h) Image Size and Heap Use impact (Client -Only): little Platforms and Profiles Affected: platform: linux-2.2-libc6-gcc32-i586 profile: helix-client-all-defines Distribution Libraries Affected: <libhxthumb.so> Distribution library impact and planned action: <None> Platforms and Profiles Build Verified: Set BIF branch -> hxclient_3_1_0_atlas Set Target(s) -> dtdr_thumb_generator Set Profile -> helix-client-all-defines System ID -> linux-2.2-libc6-gcc32-i586 Branch: HEAD/hxclient_3_1_0 Copyright assignment: <MUST be one of the following statements > 2. Intel has signed and delivered a Joint Copyright Assignment to RealNetworks, and received acknowledgment that the agreement was received. ? helix-thumb.pc ? player_kit_thumbnail.diff.txt Index: pub/hxthumb.h =================================================================== RCS file: /cvsroot/player/kit/thumbnail/pub/hxthumb.h,v retrieving revision 1.1.2.1 diff -u -w -r1.1.2.1 hxthumb.h --- pub/hxthumb.h 28 Aug 2009 00:26:59 -0000 1.1.2.1 +++ pub/hxthumb.h 14 Sep 2009 04:57:24 -0000 @@ -49,6 +49,18 @@ #ifndef _HX_THUMBNAIL_H_ #define _HX_THUMBNAIL_H_ + +#define HELIX_TAG_TITLE "Title" +#define HELIX_TAG_AUTHOR "Author" +#define HELIX_TAG_ABSTRACT "Abstract" +#define HELIX_TAG_GENRE "Genre" +#define HELIX_TAG_DURATION "Duration" +#define HELIX_TAG_COPYRIGHT "Copyright" +#define HELIX_TAG_MIMETYPE "MimeType" +#define HELIX_TAG_CHANNELS "NumChannels" +#define HELIX_TAG_BITSPERSAMPLE "SrcBitsPerSample" +#define HELIX_TAG_SAMPLERATE "SampleRate" + typedef enum { eDtdrUnknown, eDtdrInt32, @@ -61,7 +73,7 @@ #endif /* __cplusplus */ int GetVideoFrame(const char* uri, const char* file, unsigned int * pWidth, unsigned int * pHeight, unsigned int position); - const char* GetMetaData(const char* uri, DtdriverMediainfoProcPtr dtdr_mediainfo_callback); + const char* GetMetaData(const char* uri, DtdriverMediainfoProcPtr dtdr_mediainfo_callback, void* user_data); #ifdef __cplusplus } #endif /* __cplusplus */ Index: src/CHXClientThumbnailUnix.cpp =================================================================== RCS file: /cvsroot/player/kit/thumbnail/src/CHXClientThumbnailUnix.cpp,v retrieving revision 1.1.2.1 diff -u -w -r1.1.2.1 CHXClientThumbnailUnix.cpp --- src/CHXClientThumbnailUnix.cpp 28 Aug 2009 00:26:59 -0000 1.1.2.1 +++ src/CHXClientThumbnailUnix.cpp 14 Sep 2009 04:57:24 -0000 @@ -412,7 +412,9 @@ char dllhome[MAX_PATH] = "."; const char* pszHelixLibs = getenv("HELIX_THUMB_LIBS"); if (pszHelixLibs) + { SafeStrCpy(dllhome, pszHelixLibs, MAX_PATH); + } else { pszHelixLibs = getenv("HELIX_LIBS"); @@ -423,7 +425,7 @@ if(!pszHelixLibs || access(dllhome, F_OK)) // HELIX_LIBS isn't set, or, HELIX_LIBS/thumbnail doesn't exist { - SafeStrCpy(dllhome, "/opt/helix/mediaplatform/thumbnail", MAX_PATH); + SafeStrCpy(dllhome, "/usr/local/real/RealPlayer", MAX_PATH); } } Index: src/hxthumb.cpp =================================================================== RCS file: /cvsroot/player/kit/thumbnail/src/hxthumb.cpp,v retrieving revision 1.1.2.1 diff -u -w -r1.1.2.1 hxthumb.cpp --- src/hxthumb.cpp 28 Aug 2009 00:26:59 -0000 1.1.2.1 +++ src/hxthumb.cpp 14 Sep 2009 04:57:24 -0000 @@ -327,7 +327,7 @@ -const char* GetMetaData(const char* uri, DtdriverMediainfoProcPtr dtdr_mediainfo_callback) +const char* GetMetaData(const char* uri, DtdriverMediainfoProcPtr dtdr_mediainfo_callback, void* user_data) { const char* return_value = NULL; bool retcode = false; @@ -352,7 +352,7 @@ return NULL; } - retcode = GetMediaInfo(uri,dtdr_mediainfo_callback, NULL,&return_value); + retcode = GetMediaInfo(uri,dtdr_mediainfo_callback, user_data,&return_value); ReleaseThumbnail(); Index: test/main.cpp =================================================================== RCS file: /cvsroot/player/kit/thumbnail/test/main.cpp,v retrieving revision 1.1.2.1 diff -u -w -r1.1.2.1 main.cpp --- test/main.cpp 28 Aug 2009 00:27:00 -0000 1.1.2.1 +++ test/main.cpp 14 Sep 2009 04:57:24 -0000 @@ -64,7 +64,7 @@ if(argc ==3) { - if(GetMetaData(uri,_dtdr_mediainfo_callback)) + if(GetMetaData(uri,_dtdr_mediainfo_callback,NULL)) return 0; else return -1; ZHAO, Halley (Aihua) Email: [email protected]<BLOCKED::mailto:[email protected]> Tel: +86(21)61166476 iNet: 8821-6476 SSG/OTC/Moblin 3W038 Pole: F4 _______________________________________________ Helix-client-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev