[Ffmpeg-devel] [PATCH] ASF Stream bitrate GUID parsing....

Michael Niedermayer michaelni
Wed Jan 10 00:55:10 CET 2007


Hi

On Fri, Jan 05, 2007 at 01:42:40PM -0600, Ryan Martell wrote:
> Hi--
> 
> On Jan 4, 2007, at 9:27 PM, Ryan Martell wrote:
> 
> >Hi...
> >
> >On Jan 4, 2007, at 6:59 PM, Michael Niedermayer wrote:
> >
> >>Hi
> >>
> >>On Thu, Jan 04, 2007 at 04:45:22PM -0600, Ryan Martell wrote:
> >>>Hi--
> >>>
> >>>To support my native mms code, I need to parse the bitrate GUID
> >>>header of the ASF file if it's present.  This small patch adds that
> >>>information to the ASFContext.
> >>>
> >>>A couple of quick notes:
> >>>
> >>>1) The indentation is actually correct now (the block below is
> >>>indented incorrectly) on the lines:
> >>>-       } else if (!memcmp(&g, &extended_content_header, sizeof
> >>>(GUID))) {
> >>>+        } else if (!memcmp(&g, &stream_bitrate_guid, sizeof 
> >>>(GUID))) {
> >>>
> >>>2) I removed:
> >>> ASFStream streams[128];     /* it's max number and it's not that
> >>>big */
> >>>>from the ASFContext, as it was unused (and big).  I replaced it  
> >>>>with
> >>>a 128 uint32_t array, which seems fair.
> 
> Attached is another patch; I couldn't remove streams, as it was used  
> by asf_enc.c, and I the deps aren't quite right, so I didn't catch it  
> until I did a full rebuild.
[...]
> Index: libavformat/asf.h
> ===================================================================
> --- libavformat/asf.h	(revision 7407)
> +++ libavformat/asf.h	(working copy)
> @@ -85,6 +85,7 @@
>      int is_streamed;
>      int asfid2avid[128];        /* conversion table from asf ID 2 AVStream ID */
>      ASFStream streams[128];     /* it's max number and it's not that big */
> +    uint32_t stream_bitrates[128]; /* The above streams is used by asf_enc.c; my bad. this is a fair trade (and much smaller) */
>      /* non streamed additonnal info */

exporting the bitrates like this makes them invissible to the user
application so the user app cannot setup AVStream.discard

AVStream.codec.bit_rate seems like its the more ideal place where this
could be stored


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070110/35b66775/attachment.pgp>



More information about the ffmpeg-devel mailing list