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

add code format

parent 6f71c5b6
......@@ -32,6 +32,7 @@ using namespace std;
* @param source streaming url
* @param time split recording in segments of time seconds.
*/
StreamRecorder::StreamRecorder(const char* source, int time)
{
......@@ -60,9 +61,9 @@ StreamRecorder::StreamRecorder(const char* source, int time)
/**
* Connect to the stream
* @param uri streaing uri
* @return unimplemented
* @return 0 if success
*/
int StreamRecorder::connect()
{
disconnect();
......@@ -81,8 +82,9 @@ int StreamRecorder::connect()
/**
* disconnect from the stream
* @return unimplemented
* @return 0 if success
*/
int StreamRecorder::disconnect()
{
gst_element_unlink (streamSrc, audioConvert);
......@@ -96,6 +98,7 @@ int StreamRecorder::disconnect()
* Create main pipeline
* @return 0 on success else on error
*/
int StreamRecorder::createMainPipeline()
{
mainPipeline = gst_pipeline_new("stream-recorder");
......@@ -152,6 +155,7 @@ int StreamRecorder::createMainPipeline()
* @param class instance
* @return False if an error occurs
*/
gboolean StreamRecorder::reconnectURIStream(void* instance)
{
cout << "Trying to reconnect with the stream..." << endl << endl;
......@@ -239,12 +243,14 @@ void StreamRecorder::saveBuffer()
}
//------------------------------------------------------------------------------
/**
* CallBack to link the pads created by uridecodebin
* @param element The uridecodebin element
* @param pad The pad added
* @param data this
*/
void StreamRecorder::srcNewPad_callback(GstElement *element, GstPad *pad, void *data)
{
......@@ -339,12 +345,14 @@ int StreamRecorder::filter_handoff_callback(GstElement* filter, GstBuffer* buffe
}
//------------------------------------------------------------------------------
/**
* Add audio data to audioBuffer
* @param data Audio data to add
* @param length Data length
* @return Bytes writen
*/
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
* @return unimplemented
*/
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