RE: Add a library for thumbnail generation based on dtdriver
"Zhao, Halley" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <8FED46E8A9CA574792FC7AACAC38FE7702872618AF@PDSMSX501.ccr.corp.intel.com> |
Thanks Greg. I found that I'd better use hxiids.h directly, since "hxdtdr.h", "hxsrcin.h" will recursively requires more header files. So I try to add IID_IHXDataTypeDriver2 etc in hxiids.h, and IID_IHXSourceInput etc are already there. Index: hxiids.h =================================================================== RCS file: /cvsroot/common/include/hxiids.h,v retrieving revision 1.132.2.13 diff -u -w -r1.132.2.13 hxiids.h --- hxiids.h 23 Jul 2009 20:36:45 -0000 1.132.2.13 +++ hxiids.h 28 Aug 2009 00:59:36 -0000 @@ -2175,5 +2175,11 @@ DEFINE_GUID_ENUM(IID_IHXDRMHTTPSecureClock, 0xa4b6b36e, 0x3e27, 0x4d25, 0xb7, 0x9a, 0x2d, 0xbb, 0xc2, 0x39, 0x64, 0x2c); #endif +#if ( !defined(_HXDTDR_H_) || !defined(HELIX_FEATURE_FULLGUID) ) +DEFINE_GUID(IID_IHXDataTypeDriverResponse, 0x9d65e58d, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +DEFINE_GUID(IID_IHXDataTypeDriver2, 0x9d65e58e, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +DEFINE_GUID(IID_IHXSetClientContext, 0x9d65e58f, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +#endif + #endif /* _HXIIDS_H_ */ -----Original Message----- From: Gregory Wright [mailto:[email protected]] Sent: 2009年8月27日 22:48 To: Zhao, Halley Cc: '[email protected]' Subject: Re: [Helix-client-dev] Add a library for thumbnail generation based on dtdriver ? common-include-hxsrcin_h.diff.txt Index: hxsrcin.h =================================================================== RCS file: /cvsroot/common/include/hxsrcin.h,v retrieving revision 1.6 diff -u -w -r1.6 hxsrcin.h --- hxsrcin.h 12 Nov 2008 13:32:27 -0000 1.6 +++ hxsrcin.h 24 Aug 2009 07:41:08 -0000 @@ -281,4 +281,9 @@ DEFINE_SMART_PTR(IHXSourceInput) DEFINE_SMART_PTR(IHXSourceHandler) +#if ( !defined(_HXSRCIN_H_) || !defined(HELIX_FEATURE_FULLGUID) ) +DEFINE_GUID_ENUM(IID_IHXSourceInput, 0xebf8d220, 0x40f7, 0x11d6, 0xab, 0x3f, 0x0, 0x1, 0x2, 0x51, 0xb3, 0x40) +DEFINE_GUID_ENUM(IID_IHXSourceHandler, 0xb2646da0, 0x410a, 0x11d6, 0xab, 0x3f, 0x0, 0x1, 0x2, 0x51, 0xb3, 0x40) +#endif + #endif // _HXSRCIN_H_ why do you have that code? IID_IHXSourceHandler and IID_IHXSourceHandler is already defined in that file. I also don't understand the double _HXSRCIN_H_ macro. > player/kit/thumbnail That is a good name to check it in under. > 2. Remove gtk dependency for this module, but use gdk-pixbuf only(it > depends on glib-2.0). SetSDKPath("gdk-pixbuf", "/usr/include/ > gtk-2.0") is used in buildrc. I would be good to get rid of all platform dependancies and use some cross platform solution. However, that can wait. The rest looks good. --greg. On Aug 24, 2009, at 2:15 AM, Zhao, Halley wrote: > Hi Greg: > Here is my follow up: > 1. Remove some unused code, and replace ULONG32 to UINT32. > > 2. Remove gtk dependency for this module, but use gdk-pixbuf only(it > depends on glib-2.0). SetSDKPath("gdk-pixbuf", "/usr/include/ > gtk-2.0") is used in buildrc. > > 3. for cross-platform support, only CColourConvert::RGBRaw2PNG is > related. > I add #ifdef _LINUX for Linux platform. > > 4. IID_IHXSourceInput is moved to common/include/hxsrcin.h > > 5. as to player/common/dtdr_service/thumbnail_service; I hadn't > noticed that before. > There is no big difference, but I create a shared library to be used > directly (with additional dependency); and a callback function of > dtdr_mediainfo_callback make the app deal with metadata freely, as > well as above changes to remove gtk dependency. > I had planed to check in it to player/kit/thumbnail since I think it > is a development kit library used by app. > Any suggestion > > > -----Original Message----- > From: Gregory Wright [mailto:[email protected]] > Sent: Wednesday, August 19, 2009 10:25 PM > To: Zhao, Halley > Cc: '[email protected]' > Subject: Re: [Helix-client-dev] Add a library for thumbnail > generation based on dtdriver > > ULONG32 width; > ULONG32 height; > ULONG32 dataLen; > ULONG32 bitsPerPixel; > > ULONG32 is deprecated, please use UINT32 instead. > > //BOOL m_bWriteBinary; > //BOOL m_bShowProgress; > > No need to leave in commented code like that, just remove it. > Also, BOOL is deprecated, please use HXBOOL. > > > > --------------- From the unix.pcf file: --------- > # on gcc we want to turn on all warnings > extra_cflags = "" > using_gcc = 0 > if string.find(platform.cc.cmd, 'gcc') != -1: > using_gcc = 1 > extra_cflags = "-Wall" > > # grab flags from pkgconfig > import shell > import string > > # see if we're using the target gtk version (triggers setting of the > # DISABLE_DEPRECATED flag) > > (exitstatus, gtk_mod_version) = shell.run("pkg-config --modversion gtk > +-2.0") > ------------------------- > > Why do we need GTK stuff if this is a non GUI thumbnail generator? > Just left > over from the old project? It seems this should be made as cross > platform as > we can and not tied to GTK or Qt or whatever, even on linux. I also > don't think > it is proper to mess with the GCC flags in there, you could be using a > different > compiler on differ unix systems. Is that needed? > > I also see that you have GDK includes in other source files. What are > they used for, > just image conversion? Is it cross platform? Does it ship with all > UNIX systems? Is > it a free license? If it is required to use the code then we need to > think about SDK > entries in the build system and stuff like that...<gdk-pixbuf/gdk- > pixbuf.h>. > > > #if ( !defined(_HXSRCIN_H_) || !defined(HELIX_FEATURE_FULLGUID) ) > DEFINE_GUID_ENUM(IID_IHXSourceInput, 0xebf8d220, > 0x40f7, 0x11d6, 0xab, 0x3f, 0x0, 0x1, 0x2, 0x51, 0xb3, 0x40) > DEFINE_GUID_ENUM(IID_IHXSourceHandler, 0xb2646da0, > 0x410a, 0x11d6, 0xab, 0x3f, 0x0, 0x1, 0x2, 0x51, 0xb3, 0x40) > #endif > > it is strange to see that in a project's source tree, those should > generally be defined > in a header file in common/include and then brought into a local > guilds.cpp file. > > > Where are you thinking about checking this is at? player/common/ > dtdr_service/thumbnail_service? > What is the difference between your code and the code that is already > there? > > All changes will need to be checked into 310Atlas and HEAD as well > when > the CR is done. So, you will need to modify the helix.bif and 310atlas > BIF files. > > > --greg. > > > > On Aug 17, 2009, at 2:02 AM, Zhao, Halley wrote: > >> Synopsis: >> Add a new library to create thumbnail based on dtdriver; >> it could extract thumbnail/metadata from media stream. >> >> Overview: >> There use to be some function in hxclientkit to create thumbnail. >> while these function doesn't tight to hxclientkit (only depend >> on dtdriver), >> and the feature is used not limit to Helix player; for example: >> some daemon >> for media discover and file browser could use it, etc. >> so I try to create this separate library to provide simplified >> interface: >> bool GetVideoFrame(const char* uri, const char* file, >> unsigned int position=0 ); >> const char* GetMetaData(const char* uri, >> DtdriverMediainfoProcPtr dtdr_mediainfo_callback); >> >> Files Added: >> |-- thumbnail >> | |-- LICENSE.txt >> | |-- RCSL.txt >> | |-- RPSL.txt >> | |-- Umakefil >> | |-- pub >> | | |-- CHXClientThumbnailUnix.h >> | | `-- hxthumb.h >> | |-- src >> | | |-- CHXClientThumbnailUnix.cpp >> | | |-- hxthumb.cpp >> | | `-- thumbGuids.cpp >> | |-- test >> | | |-- Umakefil >> | | |-- main.cpp >> | | `-- unix.pcf >> | |-- thumbnail.exp >> | `-- unix.pcf >> >> only hxthumb.cpp and thumbGuids.cpp are newly added source files. >> test/main.cpp is a sample to use this library. >> >> Files Modified: >> player/thumbnail/CHXClientThumbnailUnix.cpp >> hxclient_3_4_1_atlas.bif >> >> 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: >> add this library to the bundle package of Helix based player >> Platforms and Profiles Build Verified: >> Set BIF branch -> hxclient_3_4_1_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_4_1_atlas >> 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. >> Files Attached: >> hxclient_3_4_1_atlas.bif.diff.txt, thumbnail.tgz >> ZHAO, Halley (Aihua) >> Email: [email protected] >> Tel: +86(21)61166476 >> iNet: 8821-6476 >> SSG/OTC/Moblin 3W038 Pole: F4 >> >> < >> thumbnail.tgz >>> >> < >> hxclient_3_4_1_atlas.bif.diff.txt >>> _______________________________________________ >> Helix-client-dev mailing list >> [email protected] >> http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev > > <thumbnail.tgz><common-include- > hxsrcin_h.diff.txt><hxclient_3_1_0_atlas.bif.diff.txt> _______________________________________________ Helix-client-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
common-include-hxiids_h.diff.txt
(text/plain, 889 B)
Index: hxiids.h =================================================================== RCS file: /cvsroot/common/include/hxiids.h,v retrieving revision 1.132.2.13 diff -u -w -r1.132.2.13 hxiids.h --- hxiids.h 23 Jul 2009 20:36:45 -0000 1.132.2.13 +++ hxiids.h 28 Aug 2009 00:59:36 -0000 @@ -2175,5 +2175,11 @@ DEFINE_GUID_ENUM(IID_IHXDRMHTTPSecureClock, 0xa4b6b36e, 0x3e27, 0x4d25, 0xb7, 0x9a, 0x2d, 0xbb, 0xc2, 0x39, 0x64, 0x2c); #endif +#if ( !defined(_HXDTDR_H_) || !defined(HELIX_FEATURE_FULLGUID) ) +DEFINE_GUID(IID_IHXDataTypeDriverResponse, 0x9d65e58d, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +DEFINE_GUID(IID_IHXDataTypeDriver2, 0x9d65e58e, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +DEFINE_GUID(IID_IHXSetClientContext, 0x9d65e58f, 0x9b4b, 0x40f2, 0x8f, 0xf0, 0x5c, 0xff, 0x67, 0x3f, 0xb, 0xd3); +#endif + #endif /* _HXIIDS_H_ */