[FFmpeg-devel] NC4600 camera code
nicolas martin
elvadrias
Sat Dec 13 17:22:36 CET 2008
> On Sat, Dec 13, 2008 at 10:51:21AM -0500, nicolas martin wrote:
>>> On Sat, Dec 13, 2008 at 10:01:38AM -0500, nicolas martin wrote:
>>>>> On Sat, Dec 13, 2008 at 08:52:38AM -0500, nicolas martin wrote:
>>>>>
>>>>> If you want to see the patch reviewed and possibly included...
>>>> The patch is attached
>>>>
>>>> --- libavformat/avio.h (revision 16101)
>>>> +++ libavformat/avio.h (working copy)
>>>> @@ -172,6 +172,12 @@
>>>> +#ifdef CONFIG_NC4600_DEMUXER
>>>> + int copied;
>>>> + int paquet_size;
>>>
>>> 'paquet' is not an English word. Did you mean packet?
>> Yes, sorry for the bad traduction, it is fixed.
>>>
>>>
>>>> --- libavformat/aviobuf.c (revision 16101)
>>>> +++ libavformat/aviobuf.c (working copy)
>>>> @@ -417,6 +422,73 @@
>>>>
>>>> +#ifdef CONFIG_NC4600_DEMUXER
>>>> +//this gives the size of the next real data paquet based on the 16
>>>> bytes header of the paquet (i.e those 16 bytes must be trimmed from
>>>> the mpeg4 stream)
>>>
>>> Please try to keep lines below 80 characters.
>> Fixed
>>>
>>>
>>>> +int nc4600_ident_packet(unsigned char *p) {
>>>
>>> Put the opening brace on the next line.
>> Fixed
>>
>> Last patch attached.
>>
>> --- libavformat/raw.c (revision 16101)
>> +++ libavformat/raw.c (working copy)
>> @@ -914,6 +957,20 @@
>>
>> +#ifdef CONFIG_NC4600_DEMUXER
>> +AVInputFormat nc4600_demuxer = {
>> + "nc4600",
>> + NULL_IF_CONFIG_SMALL("special raw MPEG-4 video format"),
>> + 0,
>> + nc4600_mpeg4video_probe, /** probing for MPEG-4 data */
>
> IMO this comment is pointless.
This is actually a copy-paste of the comment made in the M4V demuxer.
Anyway fixed.
>
>
>> --- libavformat/avio.h (revision 16101)
>> +++ libavformat/avio.h (working copy)
>> @@ -273,6 +279,17 @@
>>
>> +#ifdef CONFIG_NC4600_DEMUXER
>
> This #ifdef is unnecessary.
Well it makes the structure grow unnecessary if this muxer is not to
be added.
Besides, maybe there are better ways to achieve my goals without
changing the structure, that's why i put the code between #ifdef.
Still, I removed them !
>
>
>> +/**
>> + * Reads size bytes from ByteIOContext into buf.
>> + * This reads at most 1 packet. If that is not enough fewer bytes
>> will be
>> + * returned.
>> + * Handle special nc4600 cameras packet with 16 bytes header
>
> Handle special nc4600 camera packets with 16 bytes header.
Fixed
>
>
>> --- libavformat/aviobuf.c (revision 16101)
>> +++ libavformat/aviobuf.c (working copy)
>> @@ -417,6 +422,76 @@
>>
>> +#ifdef CONFIG_NC4600_DEMUXER
>> +//this gives the size of the next real data packet based on the 16
>> bytes
>> +//header of the packet (those 16 bytes must be trimmed from the
>> mpeg4 stream)
>
> MPEG-4
Fixed
>
>
>> +#ifndef MIN
>> +#define MIN(x,y) ((x)<(y)?(x):(y))
>> +#endif
>
> Such a macro already exists, it is called FFMIN.
I changed it.
>
>
>> +int nc4600_get_partial_buffer(ByteIOContext *s, unsigned char
>> *buf, int size)
>> +{
>> + int len,t;
>
> A space after the comma will make things more readable..
Fixed.
>
>
> Diego
>
> P.S.: Your mails would be more readable if you would leave an empty
> line
> between the quoted text and your answer.
Nicolas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081213/4b259360/attachment.txt>
-------------- next part --------------
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list