Mercurial > pidgin
annotate src/mediastreamer/msavdecoder.h @ 12323:fc464a0abccc
[gaim-migrate @ 14627]
Function prototypes need to be of the form foo(void); instead of foo(); for function that don't take any arguments. This allows the compiler to detect mistakes were someone passes arguments to such a function.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sun, 04 Dec 2005 18:19:56 +0000 |
| parents | e67993da8a22 |
| children |
| rev | line source |
|---|---|
| 12024 | 1 /* |
| 2 The mediastreamer library aims at providing modular media processing and I/O | |
| 3 for linphone, but also for any telephony application. | |
| 4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org | |
| 5 | |
| 6 This library is free software; you can redistribute it and/or | |
| 7 modify it under the terms of the GNU Lesser General Public | |
| 8 License as published by the Free Software Foundation; either | |
| 9 version 2.1 of the License, or (at your option) any later version. | |
| 10 | |
| 11 This library is distributed in the hope that it will be useful, | |
| 12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 Lesser General Public License for more details. | |
| 15 | |
| 16 You should have received a copy of the GNU Lesser General Public | |
| 17 License along with this library; if not, write to the Free Software | |
| 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 */ | |
| 20 | |
| 21 | |
| 22 #ifndef MSAVDECODER_H | |
| 23 #define MSAVDECODER_H | |
| 24 | |
| 25 #include "msfilter.h" | |
| 26 | |
| 27 | |
| 28 #include <avcodec.h> | |
| 29 | |
| 30 /*this is the class that implements a AVdecoder filter*/ | |
| 31 | |
| 32 #define MSAVDECODER_MAX_INPUTS 1 /* max output per filter*/ | |
| 33 | |
| 34 | |
| 35 struct _MSAVDecoder | |
| 36 { | |
| 37 /* the MSAVDecoder derivates from MSFilter, so the MSFilter object MUST be the first of the MSAVDecoder object | |
| 38 in order to the object mechanism to work*/ | |
| 39 MSFilter filter; | |
| 40 MSQueue *q_inputs[MSAVDECODER_MAX_INPUTS]; | |
| 41 MSQueue *q_outputs[MSAVDECODER_MAX_INPUTS]; | |
| 42 AVCodec *av_codec; /*the AVCodec from which this MSFilter is related */ | |
| 43 AVCodecContext av_context; /* the context of the AVCodec */ | |
| 44 gint av_opened; | |
| 45 int output_pix_fmt; | |
| 46 int width; | |
| 47 int height; | |
| 48 int skip_gob; | |
| 49 unsigned char buf_compressed[100000]; | |
| 50 int buf_size; | |
| 51 MSBuffer *obufwrap; /* alternate buffer, when format change is needed*/ | |
| 52 }; | |
| 53 | |
| 54 typedef struct _MSAVDecoder MSAVDecoder; | |
| 55 | |
| 56 struct _MSAVDecoderClass | |
| 57 { | |
| 58 /* the MSAVDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSAVDecoder class | |
| 59 in order to the class mechanism to work*/ | |
| 60 MSFilterClass parent_class; | |
| 61 }; | |
| 62 | |
| 63 typedef struct _MSAVDecoderClass MSAVDecoderClass; | |
| 64 | |
| 65 /* PUBLIC */ | |
| 66 #define MS_AVDECODER(filter) ((MSAVDecoder*)(filter)) | |
| 67 #define MS_AVDECODER_CLASS(klass) ((MSAVDecoderClass*)(klass)) | |
| 68 | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
69 MSFilter *ms_h263_decoder_new(void); |
|
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
70 MSFilter *ms_mpeg_decoder_new(void); |
|
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
71 MSFilter *ms_mpeg4_decoder_new(void); |
| 12024 | 72 MSFilter * ms_AVdecoder_new_with_codec(enum CodecID codec_id); |
| 73 | |
| 74 gint ms_AVdecoder_set_format(MSAVDecoder *dec, gchar *fmt); | |
| 75 void ms_AVdecoder_set_width(MSAVDecoder *av,gint w); | |
| 76 void ms_AVdecoder_set_height(MSAVDecoder *av,gint h); | |
| 77 | |
| 78 /* FOR INTERNAL USE*/ | |
| 79 void ms_AVdecoder_init(MSAVDecoder *r, AVCodec *codec); | |
| 80 void ms_AVdecoder_uninit(MSAVDecoder *enc); | |
| 81 void ms_AVdecoder_class_init(MSAVDecoderClass *klass); | |
| 82 void ms_AVdecoder_destroy( MSAVDecoder *obj); | |
| 83 void ms_AVdecoder_process(MSAVDecoder *r); | |
| 84 | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
85 void ms_AVCodec_init(void); |
| 12024 | 86 |
| 87 #endif |
