fixed docs

This commit is contained in:
Vladislav Vinogradov
2013-08-20 15:05:49 +04:00
parent f936c1283b
commit cbe437571e
37 changed files with 1013 additions and 998 deletions

View File

@@ -1,6 +1,6 @@
*************************************************
gpucodec. GPU-accelerated Video Encoding/Decoding
*************************************************
***************************************************
cudacodec. CUDA-accelerated Video Encoding/Decoding
***************************************************
.. toctree::
:maxdepth: 1

View File

@@ -5,40 +5,40 @@ Video Decoding
gpucodec::VideoReader
---------------------
cudacodec::VideoReader
----------------------
Video reader interface.
.. ocv:class:: gpucodec::VideoReader
.. ocv:class:: cudacodec::VideoReader
.. note::
* An example on how to use the videoReader class can be found at opencv_source_code/samples/gpu/video_reader.cpp
gpucodec::VideoReader::nextFrame
--------------------------------
cudacodec::VideoReader::nextFrame
---------------------------------
Grabs, decodes and returns the next video frame.
.. ocv:function:: bool gpucodec::VideoReader::nextFrame(OutputArray frame)
.. ocv:function:: bool cudacodec::VideoReader::nextFrame(OutputArray frame)
If no frames has been grabbed (there are no more frames in video file), the methods return ``false`` . The method throws :ocv:class:`Exception` if error occurs.
gpucodec::VideoReader::format
-----------------------------
cudacodec::VideoReader::format
------------------------------
Returns information about video file format.
.. ocv:function:: FormatInfo gpucodec::VideoReader::format() const
.. ocv:function:: FormatInfo cudacodec::VideoReader::format() const
gpucodec::Codec
---------------
Video codecs supported by :ocv:class:`gpucodec::VideoReader` .
cudacodec::Codec
----------------
Video codecs supported by :ocv:class:`cudacodec::VideoReader` .
.. ocv:enum:: gpucodec::Codec
.. ocv:enum:: cudacodec::Codec
.. ocv:emember:: MPEG1 = 0
.. ocv:emember:: MPEG2
@@ -71,11 +71,11 @@ Video codecs supported by :ocv:class:`gpucodec::VideoReader` .
gpucodec::ChromaFormat
----------------------
Chroma formats supported by :ocv:class:`gpucodec::VideoReader` .
cudacodec::ChromaFormat
-----------------------
Chroma formats supported by :ocv:class:`cudacodec::VideoReader` .
.. ocv:enum:: gpucodec::ChromaFormat
.. ocv:enum:: cudacodec::ChromaFormat
.. ocv:emember:: Monochrome = 0
.. ocv:emember:: YUV420
@@ -84,9 +84,9 @@ Chroma formats supported by :ocv:class:`gpucodec::VideoReader` .
gpucodec::FormatInfo
--------------------
.. ocv:struct:: gpucodec::FormatInfo
cudacodec::FormatInfo
---------------------
.. ocv:struct:: cudacodec::FormatInfo
Struct providing information about video file format. ::
@@ -100,24 +100,24 @@ Struct providing information about video file format. ::
gpucodec::createVideoReader
---------------------------
cudacodec::createVideoReader
----------------------------
Creates video reader.
.. ocv:function:: Ptr<VideoReader> gpucodec::createVideoReader(const String& filename)
.. ocv:function:: Ptr<VideoReader> gpucodec::createVideoReader(const Ptr<RawVideoSource>& source)
.. ocv:function:: Ptr<VideoReader> cudacodec::createVideoReader(const String& filename)
.. ocv:function:: Ptr<VideoReader> cudacodec::createVideoReader(const Ptr<RawVideoSource>& source)
:param filename: Name of the input video file.
:param source: RAW video source implemented by user.
FFMPEG is used to read videos. User can implement own demultiplexing with :ocv:class:`gpucodec::RawVideoSource` .
FFMPEG is used to read videos. User can implement own demultiplexing with :ocv:class:`cudacodec::RawVideoSource` .
gpucodec::RawVideoSource
------------------------
.. ocv:class:: gpucodec::RawVideoSource
cudacodec::RawVideoSource
-------------------------
.. ocv:class:: cudacodec::RawVideoSource
Interface for video demultiplexing. ::
@@ -135,11 +135,11 @@ User can implement own demultiplexing by implementing this interface.
gpucodec::RawVideoSource::getNextPacket
---------------------------------------
cudacodec::RawVideoSource::getNextPacket
----------------------------------------
Returns next packet with RAW video frame.
.. ocv:function:: bool gpucodec::VideoSource::getNextPacket(unsigned char** data, int* size, bool* endOfFile) = 0
.. ocv:function:: bool cudacodec::VideoSource::getNextPacket(unsigned char** data, int* size, bool* endOfFile) = 0
:param data: Pointer to frame data.
@@ -149,8 +149,8 @@ Returns next packet with RAW video frame.
gpucodec::RawVideoSource::format
--------------------------------
cudacodec::RawVideoSource::format
---------------------------------
Returns information about video file format.
.. ocv:function:: virtual FormatInfo gpucodec::RawVideoSource::format() const = 0
.. ocv:function:: virtual FormatInfo cudacodec::RawVideoSource::format() const = 0

View File

@@ -5,11 +5,11 @@ Video Encoding
gpucodec::VideoWriter
---------------------
cudacodec::VideoWriter
----------------------
Video writer interface.
.. ocv:class:: gpucodec::VideoWriter
.. ocv:class:: cudacodec::VideoWriter
The implementation uses H264 video codec.
@@ -20,11 +20,11 @@ The implementation uses H264 video codec.
* An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp
gpucodec::VideoWriter::write
----------------------------
cudacodec::VideoWriter::write
-----------------------------
Writes the next video frame.
.. ocv:function:: void gpucodec::VideoWriter::write(InputArray frame, bool lastFrame = false) = 0
.. ocv:function:: void cudacodec::VideoWriter::write(InputArray frame, bool lastFrame = false) = 0
:param frame: The written frame.
@@ -34,14 +34,14 @@ The method write the specified image to video file. The image must have the same
gpucodec::createVideoWriter
---------------------------
cudacodec::createVideoWriter
----------------------------
Creates video writer.
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const String& fileName, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const String& fileName, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const String& fileName, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const String& fileName, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
:param fileName: Name of the output video file. Only AVI file format is supported.
@@ -49,19 +49,19 @@ Creates video writer.
:param fps: Framerate of the created video stream.
:param params: Encoder parameters. See :ocv:struct:`gpucodec::EncoderParams` .
:param params: Encoder parameters. See :ocv:struct:`cudacodec::EncoderParams` .
:param format: Surface format of input frames ( ``SF_UYVY`` , ``SF_YUY2`` , ``SF_YV12`` , ``SF_NV12`` , ``SF_IYUV`` , ``SF_BGR`` or ``SF_GRAY``). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is.
:param encoderCallback: Callbacks for video encoder. See :ocv:class:`gpucodec::EncoderCallBack` . Use it if you want to work with raw video stream.
:param encoderCallback: Callbacks for video encoder. See :ocv:class:`cudacodec::EncoderCallBack` . Use it if you want to work with raw video stream.
The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with :ocv:class:`gpucodec::EncoderCallBack` .
The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with :ocv:class:`cudacodec::EncoderCallBack` .
gpucodec::EncoderParams
-----------------------
.. ocv:struct:: gpucodec::EncoderParams
cudacodec::EncoderParams
------------------------
.. ocv:struct:: cudacodec::EncoderParams
Different parameters for CUDA video encoder. ::
@@ -96,12 +96,12 @@ Different parameters for CUDA video encoder. ::
gpucodec::EncoderParams::EncoderParams
--------------------------------------
cudacodec::EncoderParams::EncoderParams
---------------------------------------
Constructors.
.. ocv:function:: gpucodec::EncoderParams::EncoderParams()
.. ocv:function:: gpucodec::EncoderParams::EncoderParams(const String& configFile)
.. ocv:function:: cudacodec::EncoderParams::EncoderParams()
.. ocv:function:: cudacodec::EncoderParams::EncoderParams(const String& configFile)
:param configFile: Config file name.
@@ -109,29 +109,29 @@ Creates default parameters or reads parameters from config file.
gpucodec::EncoderParams::load
-----------------------------
cudacodec::EncoderParams::load
------------------------------
Reads parameters from config file.
.. ocv:function:: void gpucodec::EncoderParams::load(const String& configFile)
.. ocv:function:: void cudacodec::EncoderParams::load(const String& configFile)
:param configFile: Config file name.
gpucodec::EncoderParams::save
-----------------------------
cudacodec::EncoderParams::save
------------------------------
Saves parameters to config file.
.. ocv:function:: void gpucodec::EncoderParams::save(const String& configFile) const
.. ocv:function:: void cudacodec::EncoderParams::save(const String& configFile) const
:param configFile: Config file name.
gpucodec::EncoderCallBack
-------------------------
.. ocv:class:: gpucodec::EncoderCallBack
cudacodec::EncoderCallBack
--------------------------
.. ocv:class:: cudacodec::EncoderCallBack
Callbacks for CUDA video encoder. ::
@@ -155,38 +155,38 @@ Callbacks for CUDA video encoder. ::
gpucodec::EncoderCallBack::acquireBitStream
-------------------------------------------
cudacodec::EncoderCallBack::acquireBitStream
--------------------------------------------
Callback function to signal the start of bitstream that is to be encoded.
.. ocv:function:: virtual uchar* gpucodec::EncoderCallBack::acquireBitStream(int* bufferSize) = 0
.. ocv:function:: virtual uchar* cudacodec::EncoderCallBack::acquireBitStream(int* bufferSize) = 0
Callback must allocate buffer for CUDA encoder and return pointer to it and it's size.
gpucodec::EncoderCallBack::releaseBitStream
-------------------------------------------
cudacodec::EncoderCallBack::releaseBitStream
--------------------------------------------
Callback function to signal that the encoded bitstream is ready to be written to file.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0
.. ocv:function:: virtual void cudacodec::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0
gpucodec::EncoderCallBack::onBeginFrame
---------------------------------------
cudacodec::EncoderCallBack::onBeginFrame
----------------------------------------
Callback function to signal that the encoding operation on the frame has started.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0
.. ocv:function:: virtual void cudacodec::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame).
gpucodec::EncoderCallBack::onEndFrame
-------------------------------------
cudacodec::EncoderCallBack::onEndFrame
--------------------------------------
Callback function signals that the encoding operation on the frame has finished.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0
.. ocv:function:: virtual void cudacodec::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame).