Ocean
Loading...
Searching...
No Matches
DSLiveVideo.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) Meta Platforms, Inc. and affiliates.
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
*/
7
8
#ifndef META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
9
#define META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
10
11
#include "
ocean/media/directshow/DirectShow.h
"
12
#include "
ocean/media/directshow/DSFrameMedium.h
"
13
#include "
ocean/media/directshow/DSLiveMedium.h
"
14
15
#include "
ocean/media/LiveVideo.h
"
16
17
namespace
Ocean
18
{
19
20
namespace
Media
21
{
22
23
namespace
DirectShow
24
{
25
26
/**
27
* This class implements a DirectShow live video object.
28
* @ingroup mediads
29
*/
30
class
OCEAN_MEDIA_DS_EXPORT
DSLiveVideo
:
31
public
virtual
DSFrameMedium
,
32
public
virtual
DSLiveMedium
,
33
public
virtual
LiveVideo
34
{
35
friend
class
DSLibrary
;
36
37
protected
:
38
39
/**
40
* Creates a new live video by a given url.
41
* @param url Url of the live video
42
*/
43
explicit
DSLiveVideo
(
const
std::string&
url
);
44
45
/**
46
* Destructs a DSLiveVideo object.
47
*/
48
~DSLiveVideo
()
override
;
49
50
/**
51
* @see DSGraphObject::buildGraph().
52
*/
53
bool
buildGraph
()
override
;
54
55
/**
56
* @see DSGraphObject::releaseGraph().
57
*/
58
void
releaseGraph
()
override
;
59
60
/**
61
* Creates the DirectShow video source filter.
62
* @return True, if succeeded
63
*/
64
bool
createVideoSourceFilter
();
65
66
/**
67
* Collects the preferred video formats.
68
* @param sortableFrameTypes Resulting frame types sorted by their popularity
69
* @return True, if succeeded
70
*/
71
bool
collectPreferredVideoFormats
(
DSSortableFrameTypes
& sortableFrameTypes);
72
73
/**
74
* Releases the DirectShow video source filter.
75
*/
76
void
releaseVideoSourceFilter
();
77
78
/**
79
* Starts a configuration possibility.
80
* @see ConfigMedium::configuration().
81
*/
82
bool
configuration
(
const
std::string& name,
long
long
data)
override
;
83
84
/**
85
* @see ConfigMedium::configs().
86
*/
87
ConfigNames
configs
()
const override
;
88
89
protected
:
90
91
/// DirectShow video source filter.
92
ScopedIBaseFilter
videoSourceFilter_
;
93
94
/// DirectShow stream config interface.
95
ScopedIAMStreamConfig
videoSourceFilterStreamConfigInterface_
;
96
};
97
98
}
99
100
}
101
102
}
103
104
#endif
// META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
DSFrameMedium.h
DSLiveMedium.h
DirectShow.h
LiveVideo.h
Ocean::Media::ConfigMedium::ConfigNames
Strings ConfigNames
Definition of a vector holding configuration names.
Definition
ConfigMedium.h:44
Ocean::Media::DirectShow::DSFrameMedium::DSSortableFrameTypes
std::vector< DSSortableFrameType > DSSortableFrameTypes
Definition of a vector holding sortable media type objects.
Definition
DSFrameMedium.h:68
Ocean::Media::DirectShow::DSFrameMedium::DSFrameMedium
DSFrameMedium(const std::string &url)
Creates a new frame medium by a given url.
Ocean::Media::DirectShow::DSLiveMedium::DSLiveMedium
DSLiveMedium(const std::string &url)
Creates a new DSLiveMedium object by a given url.
Ocean::Media::DirectShow::DSLiveVideo::~DSLiveVideo
~DSLiveVideo() override
Destructs a DSLiveVideo object.
Ocean::Media::DirectShow::DSLiveVideo::DSLiveVideo
DSLiveVideo(const std::string &url)
Creates a new live video by a given url.
Ocean::Media::DirectShow::DSLiveVideo::videoSourceFilter_
ScopedIBaseFilter videoSourceFilter_
DirectShow video source filter.
Definition
DSLiveVideo.h:92
Ocean::Media::DirectShow::DSLiveVideo::configs
ConfigNames configs() const override
Ocean::Media::DirectShow::DSLiveVideo::createVideoSourceFilter
bool createVideoSourceFilter()
Creates the DirectShow video source filter.
Ocean::Media::DirectShow::DSLiveVideo::buildGraph
bool buildGraph() override
Ocean::Media::DirectShow::DSLiveVideo::videoSourceFilterStreamConfigInterface_
ScopedIAMStreamConfig videoSourceFilterStreamConfigInterface_
DirectShow stream config interface.
Definition
DSLiveVideo.h:95
Ocean::Media::DirectShow::DSLiveVideo::releaseGraph
void releaseGraph() override
Ocean::Media::DirectShow::DSLiveVideo::configuration
bool configuration(const std::string &name, long long data) override
Starts a configuration possibility.
Ocean::Media::DirectShow::DSLiveVideo::DSLibrary
friend class DSLibrary
Definition
DSLiveVideo.h:35
Ocean::Media::DirectShow::DSLiveVideo::releaseVideoSourceFilter
void releaseVideoSourceFilter()
Releases the DirectShow video source filter.
Ocean::Media::DirectShow::DSLiveVideo::collectPreferredVideoFormats
bool collectPreferredVideoFormats(DSSortableFrameTypes &sortableFrameTypes)
Collects the preferred video formats.
Ocean::Media::LiveVideo::LiveVideo
LiveVideo(const std::string &url)
Creates a new live video source by a given url.
Ocean::Media::Medium::url
const std::string & url() const
Returns the url of the medium.
Definition
Medium.h:236
Ocean::Media::DirectShow::ScopedIBaseFilter
ScopeDirectShowObject< IBaseFilter > ScopedIBaseFilter
Definition of a scoped object holding an IBaseFilter object.
Definition
DSObject.h:62
Ocean::Media::DirectShow::ScopedIAMStreamConfig
ScopeDirectShowObject< IAMStreamConfig > ScopedIAMStreamConfig
Definition of a scoped object holding an IAMStreamConfig object.
Definition
DSObject.h:48
Ocean::Media::DirectShow
Namespace of the Media DirectShow library.
Definition
DirectShow.h:24
Ocean::Media
Namespace of the Media library.
Definition
AAudio.h:26
Ocean
The namespace covering the entire Ocean framework.
Definition
Accessor.h:15
impl
ocean
media
directshow
DSLiveVideo.h
Generated on
for Ocean by
1.15.0