Commit 54b616c4 authored by d.basulto's avatar d.basulto

add code format

parent 6f71c5b6
...@@ -32,6 +32,7 @@ using namespace std; ...@@ -32,6 +32,7 @@ using namespace std;
* @param source streaming url * @param source streaming url
* @param time split recording in segments of time seconds. * @param time split recording in segments of time seconds.
*/ */
StreamRecorder::StreamRecorder(const char* source, int time) StreamRecorder::StreamRecorder(const char* source, int time)
{ {
...@@ -60,9 +61,9 @@ StreamRecorder::StreamRecorder(const char* source, int time) ...@@ -60,9 +61,9 @@ StreamRecorder::StreamRecorder(const char* source, int time)
/** /**
* Connect to the stream * Connect to the stream
* @param uri streaing uri * @return 0 if success
* @return unimplemented
*/ */
int StreamRecorder::connect() int StreamRecorder::connect()
{ {
disconnect(); disconnect();
...@@ -81,8 +82,9 @@ int StreamRecorder::connect() ...@@ -81,8 +82,9 @@ int StreamRecorder::connect()
/** /**
* disconnect from the stream * disconnect from the stream
* @return unimplemented * @return 0 if success
*/ */
int StreamRecorder::disconnect() int StreamRecorder::disconnect()
{ {
gst_element_unlink (streamSrc, audioConvert); gst_element_unlink (streamSrc, audioConvert);
...@@ -96,6 +98,7 @@ int StreamRecorder::disconnect() ...@@ -96,6 +98,7 @@ int StreamRecorder::disconnect()
* Create main pipeline * Create main pipeline
* @return 0 on success else on error * @return 0 on success else on error
*/ */
int StreamRecorder::createMainPipeline() int StreamRecorder::createMainPipeline()
{ {
mainPipeline = gst_pipeline_new("stream-recorder"); mainPipeline = gst_pipeline_new("stream-recorder");
...@@ -152,6 +155,7 @@ int StreamRecorder::createMainPipeline() ...@@ -152,6 +155,7 @@ int StreamRecorder::createMainPipeline()
* @param class instance * @param class instance
* @return False if an error occurs * @return False if an error occurs
*/ */
gboolean StreamRecorder::reconnectURIStream(void* instance) gboolean StreamRecorder::reconnectURIStream(void* instance)
{ {
cout << "Trying to reconnect with the stream..." << endl << endl; cout << "Trying to reconnect with the stream..." << endl << endl;
...@@ -239,12 +243,14 @@ void StreamRecorder::saveBuffer() ...@@ -239,12 +243,14 @@ void StreamRecorder::saveBuffer()
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** /**
* CallBack to link the pads created by uridecodebin * CallBack to link the pads created by uridecodebin
* @param element The uridecodebin element * @param element The uridecodebin element
* @param pad The pad added * @param pad The pad added
* @param data this * @param data this
*/ */
void StreamRecorder::srcNewPad_callback(GstElement *element, GstPad *pad, void *data) void StreamRecorder::srcNewPad_callback(GstElement *element, GstPad *pad, void *data)
{ {
...@@ -339,12 +345,14 @@ int StreamRecorder::filter_handoff_callback(GstElement* filter, GstBuffer* buffe ...@@ -339,12 +345,14 @@ int StreamRecorder::filter_handoff_callback(GstElement* filter, GstBuffer* buffe
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** /**
* Add audio data to audioBuffer * Add audio data to audioBuffer
* @param data Audio data to add * @param data Audio data to add
* @param length Data length * @param length Data length
* @return Bytes writen * @return Bytes writen
*/ */
int StreamRecorder::addToBuffer(unsigned char* data, int length) int StreamRecorder::addToBuffer(unsigned char* data, int length)
{ {
...@@ -399,6 +407,7 @@ int StreamRecorder::addToBuffer(unsigned char* data, int length) ...@@ -399,6 +407,7 @@ int StreamRecorder::addToBuffer(unsigned char* data, int length)
* Save audio data (audioBuffer) in flac format * Save audio data (audioBuffer) in flac format
* @return unimplemented * @return unimplemented
*/ */
int StreamRecorder::compressBuffer() int StreamRecorder::compressBuffer()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment