Ring Daemon
16.0.0
Loading...
Searching...
No Matches
media_io_handle.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2004-2025 Savoir-faire Linux Inc.
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __MEDIA_IO_HANDLE_H__
19
#define __MEDIA_IO_HANDLE_H__
20
21
#include "
noncopyable.h
"
22
23
#include <cstdlib>
24
#include <cstdint>
25
#include <vector>
26
27
#ifndef AVFORMAT_AVIO_H
28
struct
AVIOContext;
29
#endif
30
31
typedef
int (*
io_readcallback
)(
void
* opaque, uint8_t* buf,
int
buf_size);
32
typedef
int (*
io_writecallback
)(
void
* opaque, uint8_t* buf,
int
buf_size);
33
typedef
int64_t (*
io_seekcallback
)(
void
* opaque, int64_t offset,
int
whence);
34
35
namespace
jami
{
36
37
class
MediaIOHandle
38
{
39
public
:
40
MediaIOHandle
(std::size_t
buffer_size
,
41
bool
writeable
,
42
io_readcallback
read_cb
,
43
io_writecallback
write_cb
,
44
io_seekcallback
seek_cb
,
45
void
*
opaque
);
46
~MediaIOHandle
();
47
48
AVIOContext
*
getContext
() {
return
ctx_; }
49
50
private
:
51
NON_COPYABLE
(
MediaIOHandle
);
52
AVIOContext
* ctx_;
53
};
54
55
}
// namespace jami
56
57
#endif
// __MEDIA_DECODER_H__
jami::MediaIOHandle
Definition
media_io_handle.h:38
jami::MediaIOHandle::getContext
AVIOContext * getContext()
Definition
media_io_handle.h:48
jami::MediaIOHandle::~MediaIOHandle
~MediaIOHandle()
Definition
media_io_handle.cpp:41
io_seekcallback
int64_t(* io_seekcallback)(void *opaque, int64_t offset, int whence)
Definition
media_io_handle.h:33
io_writecallback
int(* io_writecallback)(void *opaque, uint8_t *buf, int buf_size)
Definition
media_io_handle.h:32
io_readcallback
int(* io_readcallback)(void *opaque, uint8_t *buf, int buf_size)
Definition
media_io_handle.h:31
jami
Definition
account.cpp:61
jami::emitSignal
void emitSignal(Args... args)
Definition
ring_signal.h:64
noncopyable.h
Simple macro to hide class' copy constructor and assignment operator.
NON_COPYABLE
#define NON_COPYABLE(ClassName)
Definition
noncopyable.h:30
src
media
media_io_handle.h
Generated on Thu Jun 19 2025 15:50:37 for Ring Daemon by
1.9.8