Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.
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
11 changes: 11 additions & 0 deletions bindings/_common/ProxyProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,17 @@ bool ProxyVideoProducer::setRotation(int nRot)
return false;
}

bool ProxyVideoProducer::setChroma(tmedia_chroma_t eChroma)
{
m_eChroma = eChroma;
if (m_pWrappedPlugin) {
TMEDIA_PRODUCER(m_pWrappedPlugin)->video.chroma = eChroma;
return true;
}
return false;
}


bool ProxyVideoProducer::getMirror()const
{
return m_bMirror;
Expand Down
1 change: 1 addition & 0 deletions bindings/_common/ProxyProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class ProxyVideoProducer : public ProxyPlugin
bool setRotation(int nRot);
bool getMirror()const;
bool setMirror(bool bMirror);
bool setChroma(tmedia_chroma_t eChroma);
bool setActualCameraOutputSize(unsigned nWidth, unsigned nHeight);
int push(const void* pBuffer, unsigned nSize);
void setCallback(ProxyVideoProducerCallback* pCallback) { m_pCallback = pCallback; }
Expand Down
4 changes: 2 additions & 2 deletions tinyMEDIA/src/tmedia_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ int tmedia_parse_video_fmtp(const char* fmtp, tmedia_pref_video_size_t pref_vs,
// set default values
best_vs = fmtp_sizes[(sizeof(fmtp_sizes)/sizeof(fmtp_sizes[0])) - 1].pref_vs /* last = lowest resolution */;
ret = tmedia_video_get_size(pref_vs, width, height);
*fps = 15;
*fps = tmedia_defaults_get_video_fps();

if((params = tsk_params_fromstring(fmtp, ";", tsk_true))){
// set real values
Expand All @@ -316,7 +316,7 @@ int tmedia_parse_video_fmtp(const char* fmtp, tmedia_pref_video_size_t pref_vs,
*width= fmtp_sizes[i].width;
*height = fmtp_sizes[i].height;
*fps = atoi(param->value);
*fps = *fps ? 30/(*fps) : 15;
*fps = *fps ? 30/(*fps) : tmedia_defaults_get_video_fps();
ret = 0;
best_vs = fmtp_sizes[i].pref_vs;
// rfc 4629 section 8.2.1: Parameters offered first are the most preferred picture mode to be received.
Expand Down