Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Includecleanup #17

Open
wants to merge 3 commits into
base: beta1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Media/AlsaAudioSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
*
*/

#include <cstdio>
#include <cstdlib>

#include "AlsaAudioSink.h"


Expand Down
11 changes: 3 additions & 8 deletions src/Media/AlsaAudioSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,14 @@

#pragma once

#include "Codec.h"
#include "Thread.h"
#include "LockedQueue.h"

#include <alsa/asoundlib.h>


#include <vector>

#include "Codec.h"
#include "Element.h"
#include "InPin.h"
#include "IClock.h"
#include "InPin.h"
#include "LockedQueue.h"
#include "Thread.h"



Expand Down
13 changes: 8 additions & 5 deletions src/Media/AmlCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
*
*/

#include "AmlCodec.h"
#include <cstdio>
#include <cstring>

#include "Exception.h"
#include <fcntl.h>
#include <unistd.h>

#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>

#include "AmlCodec.h"
#include "Exception.h"



Expand Down Expand Up @@ -856,4 +859,4 @@ int AmlCodec::WriteData(unsigned char* data, int length)

// This is done unlocked because it blocks
return write(handle, data, length);
}
}
8 changes: 1 addition & 7 deletions src/Media/AmlVideoSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@

#pragma once

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cstring>


#include <cstdio>
#include <vector>

#include "Codec.h"
#include "Element.h"
#include "InPin.h"
#include "Thread.h"
#include "Timer.h"
#include "AmlCodec.h"

Expand Down
4 changes: 3 additions & 1 deletion src/Media/AudioCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
*
*/

#include <cstdio>
#include <cstring>

#include "AudioCodec.h"

#include <algorithm>


void AudioCodecElement::SetupCodec()
Expand Down
7 changes: 1 addition & 6 deletions src/Media/AudioCodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@

#pragma once

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <vector>

#include "Codec.h"
#include "Element.h"
#include "InPin.h"



class AudioCodecElement : public Element
{
const int alsa_channels = 2;
Expand Down
8 changes: 4 additions & 4 deletions src/Media/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

#pragma once

#include "Exception.h"
//#include "Codec.h"
#include <memory>
#include <vector>

extern "C"
{
#include <libavformat/avformat.h>
}

#include <memory>
#include <vector>
#include "Exception.h"



enum class BufferTypeEnum
Expand Down
13 changes: 0 additions & 13 deletions src/Media/Codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,8 @@

#pragma once

//extern "C"
//{
//#include <libavformat/avformat.h>
//#include <libavcodec/avcodec.h>
//}

#include <pthread.h>
#include <queue>
#include <memory>

#include "Exception.h"
#include "Thread.h"
#include "LockedQueue.h"
#include "Buffer.h"



enum class MediaState
Expand Down
5 changes: 4 additions & 1 deletion src/Media/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
*
*/

#include "Element.h"
#include <cstdarg>
#include <cstdio>

#include <sys/time.h>

#include "Element.h"



Expand Down
6 changes: 4 additions & 2 deletions src/Media/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@

#pragma once

#include <memory>
#include <functional>
#include <string>

#include <pthread.h>
#include <sys/time.h>

#include "Codec.h"
#include "InPin.h"
#include "OutPin.h"
#include "WaitCondition.h"



// Push model
//
// source.Execute()
Expand Down
3 changes: 2 additions & 1 deletion src/Media/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

#pragma once

#include <vector>

#include "Mutex.h"
#include "Exception.h"
#include "EventListener.h"

#include <vector>


template<typename T> // where T : EventArgs
Expand Down
4 changes: 3 additions & 1 deletion src/Media/EventListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#pragma once

//#include "Event.h"
#include <functional>
#include <memory>



template<typename T>
Expand Down
5 changes: 3 additions & 2 deletions src/Media/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

#pragma once

#include <exception>
#include <cstdio>
#include <exception>



class Exception : std::exception
Expand Down Expand Up @@ -104,4 +105,4 @@ class InvalidOperationException : Exception
InvalidOperationException(const char* message)
: Exception(message)
{}
};
};
9 changes: 5 additions & 4 deletions src/Media/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*/

#include "Image.h"

*/

#include "Exception.h"
#include "Image.h"



Image::Image(ImageFormatEnum format, int width, int height, int stride, void* data)
Expand Down
1 change: 0 additions & 1 deletion src/Media/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <memory>

#include "Exception.h"


enum class ImageFormatEnum
Expand Down
6 changes: 4 additions & 2 deletions src/Media/InPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
*
*/

#include "InPin.h"
#include <cstdio>
#include <functional>

#include "OutPin.h"
#include "Element.h"
#include "InPin.h"
#include "OutPin.h"

void InPin::WorkThread()
{
Expand Down
12 changes: 8 additions & 4 deletions src/Media/InPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@

#pragma once

#include "Pin.h"
#include "Thread.h"
#include "WaitCondition.h"
#include <memory>

#include "Event.h"
#include "EventArgs.h"
#include "LockedQueue.h"
#include "Thread.h"
#include "Pin.h"
#include "WaitCondition.h"



//class OutPin;
Expand Down Expand Up @@ -147,4 +151,4 @@ class SubtitleInPin : public GenericInPin<SubtitlePinInfo>
}
};

typedef std::shared_ptr<SubtitleInPin> SubtitleInPinSPTR;
typedef std::shared_ptr<SubtitleInPin> SubtitleInPinSPTR;
7 changes: 4 additions & 3 deletions src/Media/LockedQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

#pragma once

#include "Mutex.h"
#include "Exception.h"
#include <queue>

#include <pthread.h>
#include <queue>
#include <unistd.h>

#include "Mutex.h"
#include "Exception.h"



template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions src/Media/MediaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
*/

#include <cstdio>

#include "MediaPlayer.h"


Expand Down
10 changes: 5 additions & 5 deletions src/Media/MediaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

#pragma once

#include "MediaSourceElement.h"
#include <memory>
#include <string>

#include "Compositor.h"
#include "AlsaAudioSink.h"
#include "AmlVideoSink.h"
#include "AudioCodec.h"
#include "MediaSourceElement.h"
#include "SubtitleCodecElement.h"
//#include "Egl.h"
#include "Compositor.h"

#include <string>



Expand Down
3 changes: 3 additions & 0 deletions src/Media/MediaSourceElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
*
*/

#include <cstdio>

#include "MediaSourceElement.h"



void MediaSourceElement::outPin_BufferReturned(void* sender, const EventArgs& args)
{
//printf("MediaSourceElement: outPin_BufferReturned entered.\n");
Expand Down
17 changes: 6 additions & 11 deletions src/Media/MediaSourceElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,20 @@

#pragma once

#include "Codec.h"
#include "Element.h"
#include "OutPin.h"
#include "EventListener.h"


#include <memory>
#include <string>
#include <map>

#include <vector>

extern "C"
{
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/error.h>
}


#include <memory>
#include "Element.h"
#include "OutPin.h"
#include "EventListener.h"
#include "Exception.h"



Expand Down
Loading