Skip to content

Commit

Permalink
Add player-factory partial headers
Browse files Browse the repository at this point in the history
  • Loading branch information
sundermann committed Aug 7, 2023
1 parent 54e9dbe commit 18d12b9
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/player-factory/abstractplayer.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <boost/shared_ptr.hpp>
#include <player-factory/player.hpp>

namespace mediapipeline {

class AbstractPlayer : public Player {
public:
boost::shared_ptr<Pipeline> getPipeline() const;
};

}
44 changes: 44 additions & 0 deletions include/player-factory/common.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#pragma once

#include <stdint.h>

typedef enum {
MEDIA_CUSTOM_SRC_TYPE_ES = 7
} MEDIA_CUSTOM_SRC_TYPE_T;

typedef struct MEDIA_CUSTOM_CONTENT_INFO {
int32_t mediaTransportType;
int32_t mediaSourceType;
int32_t container;
uint64_t size;
uint32_t videoCodec;
uint32_t audioCodec;
int32_t esCh;
int64_t ptsToDecode;
int32_t restartStreaming;
int32_t separatedPTS;
uint8_t svpVersion;
int32_t preBufferTime;
int32_t useBufferCtrl;
int32_t userBufferCtrl;
int32_t bufferingMinTime;
int32_t bufferingMaxTime;
uint8_t bufferMinPercent;
uint8_t bufferMaxPercent;
uint8_t padding[2];
uint8_t videoDataInfo[104];
uint8_t audioDataInfo[56];
uint16_t unknown;
uint32_t delayOffset;
uint32_t drmType;
char* drmTypeExtension;
char* drmClientID;
uint32_t startBPS;
uint32_t unknown2;
uint32_t unknown3;
int32_t unknown4;
int32_t unknown5;
uint32_t startTime;
uint8_t unknown6[20];
int32_t unknown7;
} MEDIA_CUSTOM_CONTENT_INFO_T;
15 changes: 15 additions & 0 deletions include/player-factory/custompipeline.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <player-factory/common.hpp>
#include <player-factory/pipeline.hpp>

namespace mediapipeline {

class CustomPipeline : public Pipeline {
public:
bool loadSpi_getInfo(MEDIA_CUSTOM_CONTENT_INFO_T* contentInfo);
void sendSegmentEvent();
void setContentInfo(MEDIA_CUSTOM_SRC_TYPE_T srcType, MEDIA_CUSTOM_CONTENT_INFO_T* contentInfo);
};

}
11 changes: 11 additions & 0 deletions include/player-factory/customplayer.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include <player-factory/abstractplayer.hpp>

namespace mediapipeline {

class CustomPlayer : public AbstractPlayer {

};

}
9 changes: 9 additions & 0 deletions include/player-factory/pipeline.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

namespace mediapipeline {

class Pipeline {

};

}
9 changes: 9 additions & 0 deletions include/player-factory/player.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

namespace mediapipeline {

class Player {

};

}
10 changes: 10 additions & 0 deletions include/starfish-media-pipeline/StarfishMediaAPIs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
#include <string>
#include <cstdint>

#include <boost/shared_ptr.hpp>

namespace mediapipeline {
class Player;
}

namespace smp {
class ProgramInfo;
class SourceInfo;
Expand Down Expand Up @@ -63,6 +69,10 @@ class StarfishMediaAPIs
void setExternalContext(GMainContext *);
void unsetExternalContext();
#endif
private:
char unknown[76];
public:
boost::shared_ptr<mediapipeline::Player> player;
private:
// Must include big enough storage size. On some system it has 300 bytes, 4KB here should be fairly enough
char padding[4096];
Expand Down
12 changes: 12 additions & 0 deletions share/pkgconfig/libpf-1.0.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/starfish-media-pipeline

Name: PlayerFactory
Description: player factory library
Version: 1.0.0

Requires:
Libs: -L${libdir} -lpf-1.0
Cflags: -I${includedir}/player-factory

0 comments on commit 18d12b9

Please sign in to comment.