[Datatype-cvs] mp3/fileformat/pub mp3ff.h,1.14,1.15

[Datatype-cvs] mp3/fileformat/pub mp3ff.h,1.14,1.15

ehodge at helixcommunity.org ehodge at helixcommunity.org
Fri Aug 13 01:51:14 PDT 2004


Update 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);




More information about the Datatype-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.