-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfMP4.cpp
More file actions
24 lines (21 loc) · 731 Bytes
/
fMP4.cpp
File metadata and controls
24 lines (21 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "fMP4.h"
#include "fMP4.hpp"
fMP4Writer fMP4_CreateWriter(DataCallback cb)
{
MP4Writer *fmp4_writer = MP4Writer::Create(cb);
return fmp4_writer;
}
void fMP4_ReleaseWriter(fMP4Writer fmp4_writer)
{
MP4Writer *writer = reinterpret_cast<MP4Writer *>(fmp4_writer);
MP4Writer::Release(writer);
}
bool fMP4_WriteH264Sample(fMP4Writer fmp4_writer,
unsigned char *sample,
unsigned int sample_size,
bool is_key_frame,
unsigned long long int duration)
{
MP4Writer *writer = reinterpret_cast<MP4Writer *>(fmp4_writer);
return writer->WriteH264VideoSample(sample, sample_size, is_key_frame, duration);
}