[Datatype-cvs] mp3/fileformat/pub mp3ff.h,1.14,1.15
ehodge at helixcommunity.org ehodge at helixcommunity.orgUpdate of /cvsroot/datatype/mp3/fileformat/pub In directory cvs-new:/tmp/cvs-serv741/pub Modified Files: mp3ff.h Log Message: Implements IHXMediaBytesToMediaDur interface which is used in progressive-download situation. It translates bytes downloaded so far into a duration (that is the minimum of all the streams' durs at that point in the file). Also can be called to get complete- file's dur. Currently, local file objects are the only ones that access these methods. TODO: Remove prog-down work-around code from CRnMp3Fmt::GetPacket and from statDone and replace stat...etc. with mediaBytesToMediaDur...::ConvertFileOffsetToDur call. If m_ulFileSize != ulFileSize then call UpdateDuration(). Reviewed by: ehyche at real.com Index: mp3ff.h =================================================================== RCS file: /cvsroot/datatype/mp3/fileformat/pub/mp3ff.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- mp3ff.h 24 Jun 2004 06:11:18 -0000 1.14 +++ mp3ff.h 13 Aug 2004 08:51:12 -0000 1.15 @@ -174,6 +174,9 @@ public IHXThreadSafeMethods, public IHXAdvise, public CHXBaseCountingObject +#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) + , public IHXMediaBytesToMediaDur +#endif /* end #if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS). */ { public: CRnMp3Fmt(); @@ -247,6 +250,21 @@ // IHXAdvise methods STDMETHOD(Advise) (THIS_ ULONG32 ulInfo); +#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) + /////////////////////////////////////////////////////////////////////////// + // IHXMediaBytesToMediaDur methods + + STDMETHOD(ConvertFileOffsetToDur) (THIS_ + UINT32 /*IN*/ ulLastReadOffset, + UINT32 /*IN*/ ulFileSize, + REF(UINT32) /*OUT*/ ulREFDuration); + + STDMETHOD(GetFileDuration) (THIS_ + UINT32 /*IN*/ ulFileSize, + REF(UINT32) /*OUT*/ ulREFDur); +#endif /* end #if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS). */ + + /////////////////////////////////////////////////////////////////////////// // IUnknown COM Interface Methods ref: hxcom.h STDMETHOD (QueryInterface ) (THIS_ REFIID ID, void** ppInterfaceObj);