Michael Ziegler avatar Michael Ziegler committed 3cdbe4f

rename ffmpegObject struct to ffmpegDecoderObject

Comments (0)

Files changed (1)

myffmpeg/ffmpegmodule.c

 	AVFormatContext *pFormatCtx;
 	AVCodecContext *pCodecCtx;
 	AVStream *pStream;
-} ffmpegObject;
+} ffmpegDecoderObject;
 
 
 
 static PyObject* ffmpeg_decoder_new( PyTypeObject* type, PyObject* args ){
-	ffmpegObject* self;
+	ffmpegDecoderObject* self;
 	
-	self = (ffmpegObject *) type->tp_alloc( type, 0 );
+	self = (ffmpegDecoderObject *) type->tp_alloc( type, 0 );
 	
 	if( self == NULL )
 		return NULL;
 	return (PyObject *)self;
 }
 
-static void ffmpeg_decoder_dealloc( ffmpegObject* self ){
+static void ffmpeg_decoder_dealloc( ffmpegDecoderObject* self ){
 	avcodec_close(self->pCodecCtx);
 	avformat_close_input(&self->pFormatCtx);
 }
 
-static PyObject* ffmpeg_decoder_dump_format( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_dump_format( ffmpegDecoderObject* self ){
 	av_dump_format(self->pFormatCtx, 0, self->infile, 0);
 	Py_RETURN_NONE;
 }
 
-static PyObject* ffmpeg_decoder_get_bitrate( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_bitrate( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "i", self->pCodecCtx->bit_rate );
 }
 
-static PyObject* ffmpeg_decoder_get_samplerate( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_samplerate( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "i", self->pCodecCtx->sample_rate );
 }
 
-static PyObject* ffmpeg_decoder_get_channels( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_channels( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "i", self->pCodecCtx->channels );
 }
 
-static PyObject* ffmpeg_decoder_get_codec( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_codec( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "s", self->pCodecCtx->codec->name );
 }
 
-static PyObject* ffmpeg_decoder_get_duration( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_duration( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "d", self->pFormatCtx->duration / (double)AV_TIME_BASE );
 }
 
-static PyObject* ffmpeg_decoder_get_path( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_path( ffmpegDecoderObject* self ){
 	return Py_BuildValue( "s", self->infile );
 }
 
-static PyObject* ffmpeg_decoder_get_metadata( ffmpegObject* self ){
+static PyObject* ffmpeg_decoder_get_metadata( ffmpegDecoderObject* self ){
 	PyObject* metadict = PyDict_New();
 	AVDictionaryEntry *metaent = NULL;
 	while( (metaent = av_dict_get(self->pFormatCtx->metadata, "", metaent, AV_DICT_IGNORE_SUFFIX)) != NULL ){
 }
 
 
-static PyObject* ffmpeg_decoder_read( ffmpegObject* self, PyObject* args ){
+static PyObject* ffmpeg_decoder_read( ffmpegDecoderObject* self, PyObject* args ){
 	AVPacket avpkt;
 	AVFrame *avfrm;
 	int got_frame;
 }
 
 
-static PyMethodDef ffmpegObject_Methods[] = {
+static PyMethodDef ffmpegDecoderObject_Methods[] = {
 	{ "read",           (PyCFunction)ffmpeg_decoder_read,           METH_NOARGS, "read()\nRead the next frame and return its data." },
 	{ "dump_format",    (PyCFunction)ffmpeg_decoder_dump_format,    METH_NOARGS, "dump_format()\nDump a bit of info about the file to stdout." },
 	{ "get_path",       (PyCFunction)ffmpeg_decoder_get_path,       METH_NOARGS, "get_path()\nReturn the path to the input file." },
 	{ NULL, NULL, 0, NULL }
 };
 
-static PyMemberDef ffmpegObject_Members[] = {
+static PyMemberDef ffmpegDecoderObject_Members[] = {
 	{ NULL }
 };
 
 	PyObject_HEAD_INIT(NULL)
 	0,                         /*ob_size*/
 	"ffmpeg.Decoder",          /*tp_name*/
-	sizeof( ffmpegObject ),    /*tp_basicsize*/
+	sizeof( ffmpegDecoderObject ),    /*tp_basicsize*/
 	0,                         /*tp_itemsize*/
 	(destructor)ffmpeg_decoder_dealloc,/*tp_dealloc*/
 	0,                         /*tp_print*/
 	0,                         /* tp_weaklistoffset */
 	0,                         /* tp_iter */
 	0,                         /* tp_iternext */
-	ffmpegObject_Methods,      /* tp_methods */
-	ffmpegObject_Members,      /* tp_members */
+	ffmpegDecoderObject_Methods,      /* tp_methods */
+	ffmpegDecoderObject_Members,      /* tp_members */
 	0,                         /* tp_getset */
 	0,                         /* tp_base */
 	0,                         /* tp_dict */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.